Last active
February 22, 2016 01:05
-
-
Save danielpataki/65e0766134f875fe0553 to your computer and use it in GitHub Desktop.
Using Grunt For WordPress Development
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
npm install -g grunt-cli |
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({ | |
pkg: grunt.file.readJSON('package.json') | |
}); | |
grunt.registerTask('default', [] ); | |
}; |
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
cssmin: { | |
target: { | |
files: [{ | |
expand: true, | |
cwd: './', | |
src: 'styles.css', | |
dest: './', | |
ext: '.min.css' | |
}] | |
} | |
} |
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": "wordpress-grunt-test", | |
"version": "1.0.0", | |
"devDependencies": { | |
"grunt": "~0.4.5" | |
} | |
} |
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
grunt.loadNpmTasks('grunt-contrib-sass'); |
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
npm install grunt-contrib-sass --save-dev |
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.loadNpmTasks('grunt-contrib-sass'); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
files: [{ | |
expand: true, | |
cwd: 'styles', | |
src: ['styles.scss'], | |
dest: './', | |
ext: '.css' | |
}] | |
} | |
} | |
}); | |
grunt.registerTask('default', ['sass'] ); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment