Created
July 27, 2012 06:42
-
-
Save sapegin/3186513 to your computer and use it in GitHub Desktop.
Gruntfile for Wordpress theme
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
| /** | |
| How to build this project? | |
| 1. Install Grunt: | |
| npm install grunt -g | |
| mkdir node_modules | |
| npm install grunt-stylus | |
| 2. Build: | |
| grunt | |
| */ | |
| /*global module:false*/ | |
| module.exports = function(grunt) { | |
| 'use strict'; | |
| // Project configuration. | |
| grunt.initConfig({ | |
| meta: { | |
| banner: "/*! Author: Artem Sapegin, http://sapegin.me, <%= grunt.template.today('yyyy') %> */" | |
| }, | |
| lint: { | |
| files: [ | |
| 'grunt.js', | |
| 'js/*.js', | |
| 'js/mylibs/**/*.js' | |
| ] | |
| }, | |
| concat: { | |
| dist: { | |
| src: [ | |
| 'js/libs/jquery.mousewheel.js', | |
| 'js/mylibs/jquery.contentscroller.js', | |
| 'js/utils.js', | |
| 'js/main.js' | |
| ], | |
| dest: 'build/scripts.js' | |
| } | |
| }, | |
| min: { | |
| dist: { | |
| src: ['<banner:meta.banner>', '<config:concat.dist.dest>'], | |
| dest: 'build/scripts.min.js' | |
| } | |
| }, | |
| stylus: { | |
| compile: { | |
| files: { | |
| 'style.css': 'styles/index.styl' | |
| }, | |
| options: { | |
| 'compress': true, | |
| 'include css': true, | |
| 'paths': ['styles'] | |
| } | |
| } | |
| }, | |
| watch: { | |
| files: 'styles/**', | |
| tasks: 'stylus' | |
| }, | |
| jshint: { | |
| options: { | |
| browser: true, | |
| white: false, | |
| smarttabs: true, | |
| eqeqeq: true, | |
| immed: true, | |
| latedef: true, | |
| newcap: true, | |
| undef: true, | |
| jquery: true | |
| }, | |
| globals: { | |
| Modernizr: true, | |
| jQuery: true | |
| } | |
| }, | |
| uglify: {} | |
| }); | |
| grunt.loadNpmTasks('grunt-stylus'); | |
| // Default task. | |
| grunt.registerTask('default', 'lint stylus concat min'); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment