Skip to content

Commit

Permalink
Add Grunt/QUnit based build and test system. I may revert all of this…
Browse files Browse the repository at this point in the history
… and switch back to Closure.
  • Loading branch information
bnkuhn committed Jul 18, 2013
1 parent cd3ee8f commit 37b65d6
Show file tree
Hide file tree
Showing 29 changed files with 13,085 additions and 494 deletions.
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# ==============================================================================
# Misc system junk
# ==============================================================================

.DS_Store
._*
.Spotlight-V100
.Trashes
.com.apple.*
Thumbs.db
Desktop.ini

# ==============================================================================
# Projects/IDE files
# ==============================================================================

# Sublime Text
*.sublime-project
*.sublime-workspace

# VIM
.*.sw[a-z]
*.un~
Session.vim

# TextMate
*.tmproj
*.tmproject
tmtags

# Eclipse
.project
.metadata

# ==============================================================================
# Temp generated code
# ==============================================================================

*.py[co]
.coverage

# ==============================================================================
# Logs and dumps
# ==============================================================================

npm-debug.log

# ==============================================================================
# Build system output
# ==============================================================================

# npm/node
.lock-wscript
node_modules/
node_modules/**/build/
node_modules/.bin/

# coverage/etc
scratch/

.anvil-cache
.build-cache/
build-out/
build-gen/
build-bin/
77 changes: 77 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* Copyright 2013 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = function(grunt) {

grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

concat: {
options: {
separator: '\n'
},
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.raw.js'
}
},

uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
},
dist: {
files: {
'dist/<%= pkg.name %>.js': ['<%= concat.dist.dest %>']
}
}
},

qunit: {
files: ['test/index.html']
},

jshint: {
//files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
files: ['gruntfile.js', 'src/**/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},

watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'qunit']
}

});

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');

grunt.registerTask('test', ['jshint', 'concat', 'qunit']);
grunt.registerTask('default', ['jshint', 'concat', 'qunit', 'uglify']);
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2013 Google Inc. All Rights Reserved.
Copyright 2012 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TODO(bkuhn): More docs.

## License

Copyright 2013 Google Inc. All Rights Reserved.
Copyright 2012 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions dist/data-layer-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 37b65d6

Please sign in to comment.