Created
October 19, 2013 08:24
-
-
Save morishin/7053058 to your computer and use it in GitHub Desktop.
Gruntfile Example
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 = (grunt)-> | |
grunt.initConfig | |
pkg: grunt.file.readJSON 'package.json' | |
jade: | |
options: | |
pretty: true | |
compile: | |
files:[ | |
expand: true | |
cwd: 'src/jade/' | |
src: '*.jade' | |
dest: 'dest/' | |
ext: '.html'] | |
coffee: | |
compile: | |
expand: true | |
flatten: false | |
cwd: 'src/coffee' | |
src: '*.coffee' | |
dest: 'dest/js/' | |
ext: '.js' | |
options: | |
bare: true | |
join: true | |
stylus: | |
options: | |
compress: false | |
compile: | |
files:[ | |
expand: true | |
cwd: 'src/stylus/' | |
src: '*.styl' | |
dest: 'dest/css/' | |
ext: '.css'] | |
shell: | |
rsync: | |
command: 'rsync -av <LOCAL_PROJECT_PATH>/dest/ --exclude ".DS_Store" -e "ssh -p <PORT_NUMBER>" <USER_NAME>@<IP_ADDRESS>:/usr/share/nginx/html/<REMOTE_PROJECT_PATH>' | |
watch: | |
jade: | |
files: 'src/jade/*.jade' | |
tasks: ['jade'] | |
coffee: | |
files: 'src/coffee/*.coffee' | |
tasks: ['coffee'] | |
stylus: | |
files: 'src/stylus/*.styl' | |
tasks: ['stylus'] | |
grunt.loadNpmTasks 'grunt-contrib-jade' | |
grunt.loadNpmTasks 'grunt-contrib-coffee' | |
grunt.loadNpmTasks 'grunt-contrib-stylus' | |
grunt.loadNpmTasks 'grunt-contrib-watch' | |
grunt.loadNpmTasks 'grunt-shell' | |
grunt.registerTask 'default', ['watch'] | |
grunt.registerTask 'deploy', ['shell:rsync'] | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment