Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates for grunt v0.4

  • Loading branch information...
commit b3b2795ff71a90598f7b5a88548c2caee18b719a 1 parent d392927
@joelfillmore joelfillmore authored
Showing with 73 additions and 63 deletions.
  1. +0 −59 grunt.js
  2. +63 −0 gruntfile.js
  3. +10 −4 package.json
View
59 grunt.js
@@ -1,59 +0,0 @@
-/*global module:false*/
-module.exports = function(grunt) {
-
- // Project configuration.
- grunt.initConfig({
- pkg: '<json:package.json>',
- meta: {
- banner: '/*! <%= pkg.title %> | <%= pkg.homepage %> | ' +
- '<%= grunt.template.today("yyyy-mm-dd") %> */'
- },
- lint: {
- files: [
- 'PxLoader.js',
- 'PxLoaderImage.js',
- 'PxLoaderSound.js',
- 'PxLoaderVideo.js',
- ]
- },
- concat: {
- dist: {
- src: [ '<banner>', '<config:lint.files>' ],
- dest: '<%= pkg.name %>.js'
- },
- },
- min: {
- dist: {
- src: [ '<banner>', '<config:lint.files>' ],
- dest: '<%= pkg.name %>.min.js'
- },
- },
- watch: {
- cj: {
- files: '<config:lint.files>',
- tasks: 'concat min'
- }
- },
- jshint: {
- options: {
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- boss: true,
- eqnull: true,
- browser: true
- },
- globals: {
- }
- },
- uglify: {}
- });
-
- grunt.registerTask('default', 'lint concat min');
-
-};
View
63 gruntfile.js
@@ -0,0 +1,63 @@
+/*global module:false*/
+module.exports = function(grunt) {
+
+ var srcFiles = [
+ 'PxLoader.js',
+ 'PxLoaderImage.js',
+ 'PxLoaderSound.js',
+ 'PxLoaderVideo.js'
+ ];
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ concat: {
+ dist: {
+ src: ['<banner>'].concat(srcFiles),
+ dest: '<%= pkg.name %>.js'
+ }
+ },
+ jshint: {
+ files: ['gruntfile.js'].concat(srcFiles),
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+ browser: true,
+ globals: {}
+ }
+ },
+ watch: {
+ cj: {
+ files: ['<%= jshint.files %>'],
+ tasks: ['jshint', 'concat', 'uglfiy']
+ }
+ },
+ uglify: {
+ options: {
+ banner: '/*! <%= pkg.title %> | <%= pkg.homepage %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n'
+ },
+ dist: {
+ src: ['<%= concat.dist.dest %>'],
+ dest: '<%= pkg.name %>.min.js'
+ }
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-contrib-clean');
+
+ grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
+
+};
View
14 package.json
@@ -6,9 +6,15 @@
"name": "Pixel Lab",
"url": "http://thinkpixellab.com"
},
- "dependencies": {},
- "devDependencies": {
- "grunt": "latest"
+ "dependencies": {
+ "grunt": "~0.4.0",
+ "grunt-contrib-uglify": "~0.1.2",
+ "grunt-contrib-jshint": "~0.2.0",
+ "grunt-contrib-watch": "~0.3.1",
+ "grunt-contrib-concat": "~0.1.3",
+ "grunt-contrib-copy": "~0.4.0",
+ "grunt-contrib-clean": "~0.4.0"
},
+ "devDependencies": {},
"keywords": []
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.