diff --git a/.gitignore b/.gitignore index b54edf37..b785b0e8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,14 @@ # nodejs local installs node_modules +npm-debug.log # sublime text stuff (the -project should actually be shared, but then we'd have to share the same disk location) *.sublime-project *.sublime-workspace # git stackdumps -*.stackdump \ No newline at end of file +*.stackdump + +# builds +build \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 15a6ad5f..5765de14 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,56 +5,77 @@ * - run a grunt target defined in Gruntfiles.js, ex: 'grunt lint' * * Note: The 'ghost' grunt task have special deps on CasperJS and phantomjs. - * For now, It's configured to run only on TravisCI where these deps are + * For now, It's configured to run only on TravisCI where these deps are * correctly defined. - * If you run this task locally, it may require some env set up first. + * If you run this task locally, it may require some env set up first. */ -module.exports = function(grunt) { - grunt.initConfig({ - jshint: { - /*options: { +module.exports = function (grunt) { + grunt.initConfig({ + jshint : { + /*options: { "evil": true, "asi": true, "smarttabs": true, "eqnull": true },*/ - files: [ - 'Gruntfile.js', - 'package.json', - 'js/**/*.js', - '!js/lib/**/*.js' // Exclude lib folder (note the leading !) - ] - }, - connect: { - www: { - options: { - base: '.', - port: 4545 - } - } - }, - ghost: { - dist: { - filesSrc: ['tests/integration/casperjs/*_test.js'], - options: { - args: { - baseUrl: 'http://localhost:' + - '<%= connect.www.options.port %>/' - }, - direct: false, - logLevel: 'error', - printCommand: false, - printFilePaths: true - } - } - } - }); + files : [ + 'Gruntfile.js', + 'package.json', + 'js/**/*.js', + '!js/lib/**/*.js' // Exclude lib folder (note the leading !) + ] + }, + connect : { + www : { + options : { + base : '.', + port : 4545 + } + } + }, + ghost : { + dist : { + filesSrc : ['tests/integration/casperjs/*_test.js'], + options : { + args : { + baseUrl : 'http://localhost:' + '<%= connect.www.options.port %>/' + }, + direct : false, + logLevel : 'error', + printCommand : false, + printFilePaths : true + } + } + }, + concat : { + options : { + separator : ';', + }, + dist : { + src : require('./script-load-list.js').scripts, + dest : 'build/piskel-packaged.js', + }, + }, + uglify : { + options : { + mangle : true + }, + my_target : { + files : { + 'build/piskel-packaged-min.js' : ['build/piskel-packaged.js'] + } + } + } + }); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-ghost'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-ghost'); - grunt.registerTask('lint', ['jshint']); - grunt.registerTask('test', ['jshint', 'connect', 'ghost']); + grunt.registerTask('default', ['jshint', 'concat', 'uglify']); + grunt.registerTask('lint', ['jshint']); + grunt.registerTask('test', ['jshint', 'connect', 'ghost']); }; diff --git a/all.html b/all.html deleted file mode 100644 index 85471c58..00000000 --- a/all.html +++ /dev/null @@ -1,39 +0,0 @@ - - -
-