Skip to content

Instantly share code, notes, and snippets.

@chrsgrffth
Created December 27, 2014 07:39
Show Gist options
  • Save chrsgrffth/f510fc06c7c89a7a7558 to your computer and use it in GitHub Desktop.
Save chrsgrffth/f510fc06c7c89a7a7558 to your computer and use it in GitHub Desktop.
Gruntfile
fs = require 'fs'
module.exports = (grunt) ->
grunt.initConfig
concurrent:
start:
tasks: ['nodemon', 'watch']
options:
logConcurrentOutput: true
nodemon:
dev:
script: 'server.coffee'
options:
env:
NODE_ENV: 'development'
ignore: ['node_modules/**', 'public/**']
ext: 'coffee, ejs, yml'
callback: (nodemon) ->
delay = () ->
fs.writeFileSync('.rebooted', 'rebooted')
setTimeout(delay,1000)
sass:
dist:
files:
'public/stylesheets/style.css': 'public/stylesheets/scss/style.scss'
watch:
css:
files: ['public/stylesheets/scss/**']
tasks: ['sass']
public:
files: ['public/**']
server:
files: ['.rebooted']
# Load deps.
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-nodemon'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-watch'
# Register tasks.
grunt.registerTask 'default', ['sass', 'concurrent']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment