Skip to content

Commit

Permalink
move Demo.* to Example.*
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Aug 25, 2015
1 parent 43fd2e3 commit b722012
Show file tree
Hide file tree
Showing 48 changed files with 1,921 additions and 1,548 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ matter-doc-theme
build/matter-dev.js
build/matter-dev.min.js
demo/js/lib/matter-dev.js
demo/js/Examples.js
test/browser/diffs
test/node/diffs
15 changes: 13 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ module.exports = function(grunt) {
dest: 'build/<%= buildName %>.js'
}
},
concat: {
examples: {
src: 'examples/**/*.js',
dest: 'demo/js/Examples.js'
}
},
copy: {
demo: {
src: 'build/<%= buildName %>.js',
Expand All @@ -48,7 +54,7 @@ module.exports = function(grunt) {
options: {
jshintrc: '.jshintrc'
},
all: ['src/**/*.js', 'demo/js/*.js', 'test/browser/TestDemo.js', 'test/node/TestDemo.js', '!src/module/*']
all: ['src/**/*.js', 'demo/js/*.js', 'examples/*.js', 'test/browser/TestDemo.js', 'test/node/TestDemo.js', '!src/module/*', '!demo/js/Examples.js']
},
connect: {
watch: {
Expand Down Expand Up @@ -76,6 +82,10 @@ module.exports = function(grunt) {
},
demo: {
files: ['build/matter.js', 'demo/js/**/*.html', 'demo/js/**/*.js', 'demo/css/**/*.css']
},
examples: {
files: ['examples/**/*.js'],
tasks: ['concat:examples']
}
},
yuidoc: {
Expand Down Expand Up @@ -131,6 +141,7 @@ module.exports = function(grunt) {
});

grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
Expand All @@ -140,7 +151,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-shell');

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

Expand Down
1 change: 1 addition & 0 deletions demo/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<!-- matter demo code -->
<link rel="stylesheet" href="./css/style.css" type="text/css">
<script type="text/javascript" src="./js/Examples.js"></script>
<script type="text/javascript" src="./js/Demo.js"></script>

<title>Matter.js Demo (Dev. Build)</title>
Expand Down
Loading

0 comments on commit b722012

Please sign in to comment.