Last active
August 29, 2015 14:15
-
-
Save dehuszar/c4e0abcd50c8c8e731c1 to your computer and use it in GitHub Desktop.
Barebones Stylus Change Watcher
This file contains 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) { | |
grunt.initConfig({ | |
watch: { | |
css: { | |
files: '**/*.styl', | |
tasks: ['stylus'], | |
options: { | |
livereload: true | |
} | |
} | |
}, | |
stylus: { | |
compile: { | |
options: { | |
paths: ['/home/dehuszar/Development/v2.margueriteallen.com/wp-content/themes/mda-v2'] | |
}, | |
files: { | |
'/home/dehuszar/Development/v2.margueriteallen.com/wp-content/themes/mda-v2/app.css': '/home/dehuszar/Development/v2.margueriteallen.com/wp-content/themes/mda-v2/app.styl' | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-stylus'); | |
// Default task(s). | |
grunt.registerTask('default', ['stylus']); | |
} |
This file contains 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
/* in a new project folder, run the following: | |
* npm init | |
* npm install -g grunt-cli (if it's a new environment) | |
* npm install grunt --save-dev | |
* npm install grunt-contrib-stylus (or whatever pre-processor you need) | |
* npm install grunt-contrib-watch | |
*/ | |
{ | |
"name": "mda-resume-site", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "^0.4.5", | |
"grunt-contrib-stylus": "^0.20.0", | |
"grunt-contrib-watch": "^0.6.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment