Skip to content

Commit

Permalink
Merge branch 'runner-improve' into browserify
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Aug 13, 2015
2 parents 00251e5 + a80fbc1 commit 9e3438f
Show file tree
Hide file tree
Showing 99 changed files with 1,404,906 additions and 505 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ matter-doc-theme
build/matter-dev.js
build/matter-dev.min.js
demo/js/lib/matter-dev.js
test/browser/diffs
15 changes: 14 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : false, // Prohibit trailing whitespaces.
"white" : false, // Check against strict whitespace and indentation rules.
"indent" : 4 // Specify indentation spacing
"indent" : 4, // Specify indentation spacing

// variables
"undef": true,
"-W079": true, // Silence redefinition errors (they are false positives).
"predef": [
"Matter", "window", "document", "Element", "MatterTools", "PIXI", "phantom", "module",
"$", "Image", "navigator", "setTimeout", "decomp", "HTMLElement", "require",
"Body", "Composite", "World", "Contact", "Detector", "Grid",
"Pairs", "Pair", "Resolver", "SAT", "Constraint", "MouseConstraint",
"Common", "Engine", "Mouse", "Sleeping", "Bodies", "Composites",
"Axes", "Bounds", "Vector", "Vertices", "Render", "RenderPixi",
"Events", "Query", "Runner", "Svg", "Metrics"
]
}
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.idea
node_modules
npm-debug.log
doc
matter-doc-theme
build/matter-dev.js
build/matter-dev.min.js
demo/js/lib/matter-dev.js
demo/js/lib/matter-dev.js
test/browser/diffs
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
language: node_js
sudo: false
node_js:
- "0.10"
before_install: npm install -g grunt-cli
install: npm install
before_script: grunt
before_install:
- npm install -g grunt-cli
- mkdir travis-phantomjs
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs:$PATH
install: npm install
36 changes: 34 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = function(grunt) {
options: {
jshintrc: '.jshintrc'
},
all: ['src/**/*.js', 'demo/js/*.js', '!src/module/*']
all: ['src/**/*.js', 'demo/js/*.js', 'test/browser/TestDemo.js', '!src/module/*']
},
connect: {
watch: {
Expand All @@ -54,6 +54,11 @@ module.exports = function(grunt) {
open: 'http://localhost:9000/demo/dev.html',
livereload: 9001
}
},
serve: {
options: {
port: 8000
}
}
},
watch: {
Expand Down Expand Up @@ -95,6 +100,19 @@ module.exports = function(grunt) {
src: 'build/<%= buildName %>.js',
dest: 'build/<%= buildName %>.js'
}
},
shell: {
testDemo: {
command: function(arg) {
arg = arg ? ' --' + arg : '';
return 'phantomjs test/browser/TestDemo.js' + arg;
},
options: {
execOptions: {
timeout: 1000 * 60
}
}
}
}
});

Expand All @@ -106,11 +124,25 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-shell');

grunt.registerTask('default', ['test', 'build']);
grunt.registerTask('test', ['jshint']);
grunt.registerTask('test', ['build:dev', 'connect:serve', 'jshint', 'test:demo']);
grunt.registerTask('dev', ['build:dev', 'connect:watch', 'watch']);

grunt.registerTask('test:demo', function() {
var updateAll = grunt.option('updateAll'),
diff = grunt.option('diff');

if (updateAll) {
grunt.task.run('shell:testDemo:updateAll');
} else if (diff) {
grunt.task.run('shell:testDemo:diff');
} else {
grunt.task.run('shell:testDemo');
}
});

grunt.registerTask('build', function(mode) {
var isDev = (mode === 'dev'),
isRelease = (mode === 'release'),
Expand Down
Loading

0 comments on commit 9e3438f

Please sign in to comment.