Created
September 8, 2014 18:03
-
-
Save rc1/24775d545fce194412d4 to your computer and use it in GitHub Desktop.
Grunt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "music-to-move-to", | |
| "version": "0.1.0", | |
| "description": "", | |
| "main": "app.musictomoveto.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "repository": { | |
| "type": "git", | |
| "url": "[email protected]:theworkers/music-to-move-to.git" | |
| }, | |
| "author": "rc1", | |
| "license": "MIT", | |
| "private": true, | |
| "devDependencies": { | |
| "grunt": "^0.4.5", | |
| "grunt-bump": "0.0.15", | |
| "grunt-contrib-concat": "^0.5.0", | |
| "grunt-contrib-less": "^0.11.4", | |
| "grunt-contrib-uglify": "^0.5.1", | |
| "grunt-contrib-watch": "^0.6.1", | |
| "grunt-docco": "^0.3.3" | |
| }, | |
| "dependencies": { | |
| "connect-jade": "0.0.4", | |
| "express": "^4.8.7", | |
| "serve-static": "^1.5.3", | |
| "vimeo-api": "^1.0.1", | |
| "w-js": "^4.28.0" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function( grunt ) { | |
| // # Project configuration. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON( 'package.json' ), | |
| // ## Documentation | |
| docco: { | |
| 'all': { | |
| src: [ 'app.musictomoveto.js', 'public/js/main.js', 'libs/*.js', 'Gruntfile.js' ], | |
| options: { | |
| output: 'docs' | |
| } | |
| } | |
| }, | |
| // // ## Concat | |
| // concat : { | |
| // // 'client' : { | |
| // // src : client.files, | |
| // // dest : 'build/W.js' | |
| // // } | |
| // }, | |
| // ## Ugilfy | |
| uglify: { | |
| options: { | |
| mangle: false, | |
| sourceMap: true | |
| }, | |
| 'all': { | |
| files: { | |
| 'public/js/main.min.js' : [ 'public/js/main.js' ] | |
| } | |
| } | |
| }, | |
| // ## Less | |
| less: { | |
| 'all': { | |
| options: { | |
| sourceMap: true, | |
| sourceMapBasepath: 'public/css/' | |
| }, | |
| files: { | |
| 'public/css/style.css' : [ 'public/css/reset.less', 'public/css/type.less', 'public/css/layout.less' ] | |
| } | |
| } | |
| }, | |
| // ## Bump | |
| bump: { | |
| options: { | |
| files: [ 'package.json' ], | |
| updateConfigs: [], | |
| commit: true, | |
| commitMessage: 'Release v%VERSION%', | |
| commitFiles: [ 'package.json' ], // '-a' for all files | |
| createTag: true, | |
| tagName: 'v%VERSION%', | |
| tagMessage: 'Version %VERSION%', | |
| push: false, | |
| pushTo: 'upstream', | |
| gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe' | |
| } | |
| }, | |
| // ## Watching | |
| watch: { | |
| // For live reload add `script( src="//localhost:35729/livereload.js" )` | |
| 'scripts': { | |
| files: 'public/**/*.js', | |
| tasks: [ 'minify' ], | |
| options: { | |
| livereload: true | |
| } | |
| }, | |
| 'less': { | |
| files: 'public/**/*.less', | |
| tasks: [ 'less' ], | |
| options: { | |
| livereload: true | |
| } | |
| } | |
| } | |
| }); | |
| // # Task Names | |
| grunt.registerTask( 'docs', [ 'docco' ] ); | |
| grunt.registerTask( 'build', [ 'minify', 'less' ] ); | |
| grunt.registerTask( 'minify', [ 'uglify' ] ); | |
| grunt.registerTask( 'all', [ 'build', 'minify', 'docs' ] ); | |
| // # Default Grunt | |
| grunt.registerTask( 'default', [ 'build' ] ); | |
| // # Load Tasks | |
| grunt.loadNpmTasks( 'grunt-docco' ); | |
| grunt.loadNpmTasks( 'grunt-contrib-concat' ); | |
| grunt.loadNpmTasks( 'grunt-contrib-uglify' ); | |
| grunt.loadNpmTasks( 'grunt-bump' ); // bump:minor | |
| grunt.loadNpmTasks( 'grunt-contrib-less' ); | |
| grunt.loadNpmTasks( 'grunt-contrib-watch' ); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment