Last active
February 17, 2021 02:50
-
-
Save frankyonnetti/8652410 to your computer and use it in GitHub Desktop.
Grunt #node #grunt
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
// Type `npm install` from this directory | |
module.exports = function(grunt) { | |
'use strict'; | |
// Project configuration | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { | |
dist: { | |
options: { | |
//config: 'config.rb', | |
sassDir: 'sass', | |
cssDir: 'css', | |
sourcemap: true | |
} | |
} | |
}, | |
jshint: { | |
src: ['js/*.js'] | |
}, | |
watch: { | |
options: { | |
livereload: true | |
}, | |
sass: { | |
files: ['sass/*.scss', 'sass/**/*.scss'], | |
tasks: ['compass', 'notify:sass'], | |
options: { | |
livereload: false | |
}, | |
}, | |
js: { | |
files: ['js/*.js'], | |
tasks: ['jshint', 'notify:js'] | |
}, | |
// php: { | |
// files: ['templates/*.php'] | |
// }, | |
css: { | |
files: ['css/*.css'] | |
}, | |
}, | |
notify: { | |
js: { | |
options: { | |
//title: 'Task Complete', // optional | |
message: 'JSHint finished, no errors!' //required | |
} | |
}, | |
sass: { | |
options: { | |
//title: 'Task Complete', // optional | |
message: 'SASS/Compass finished compiling!' //required | |
} | |
}, | |
} | |
}); // end jSON | |
// Load plugins | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-notify'); | |
// Default task(s) | |
grunt.registerTask('default', ['compass', 'watch']); | |
}; |
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
{ | |
"name": "THEME_NAME", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "latest", | |
"grunt-contrib-compass": "latest", | |
"grunt-contrib-watch": "latest", | |
"grunt-contrib-jshint": "latest", | |
"grunt-notify": "latest" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment