Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added node modules and Grunt task for bundling theme

  • Loading branch information...
commit 473d674140f82467629840e1122ca8d929862498 1 parent 663fb69
@jordanbsanders jordanbsanders authored
Showing with 39 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +32 −0 Gruntfile.js
  3. +3 −0  package.json
View
4 .gitignore
@@ -4,6 +4,10 @@
.sass-cache/*
css/*.map
+# bundling output
+dist/*
+dist
+
# Node Modules (use `npm install` to generate these)
node_modules/*
View
32 Gruntfile.js
@@ -8,6 +8,34 @@ module.exports = function(grunt) {
buildType: 'Build',
pkg: grunt.file.readJSON('package.json'),
+ clean: ['dist/', 'build/'],
+
+ compress: {
+ main: {
+ options: {
+ archive: 'linen.zip'
+ },
+ expand: true,
+ cwd: 'dist/',
+ src: ['**/*'],
+ dest: 'build/'
+ }
+ },
+
+ copy: {
+ main: {
+ files: [
+ {expand: true, src: ['css/**'], dest: 'dist/'},
+ {expand: true, src: ['fonts/**'], dest: 'dist/'},
+ {expand: true, src: ['images/**'], dest: 'dist/'},
+ {expand: true, src: ['js/**'], dest: 'dist/'},
+ {expand: true, src: ['partials/**'], dest: 'dist/'},
+ {expand: true, src: ['scss/**'], dest: 'dist/'},
+ {expand: true, src: ['*', '!.gitignore', '!.DS_Store'], dest: 'dist/'},
+ ]
+ }
+ },
+
sass: {
admin: {
options : {
@@ -29,8 +57,12 @@ module.exports = function(grunt) {
}
});
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-compress');
+ grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass:admin']);
+ grunt.registerTask('bundle', ['clean', 'copy', 'compress']);
};
View
3  package.json
@@ -3,6 +3,9 @@
"version": "0.0.1",
"devDependencies": {
"grunt": "~0.4.1",
+ "grunt-contrib-clean": "~0.5.0",
+ "grunt-contrib-compress": "~0.5.1",
+ "grunt-contrib-copy": "~0.4.1",
"grunt-contrib-sass": "~0.5.0",
"grunt-contrib-watch": "~0.5.0",
"grunt-contrib-uglify": "~0.2.2"

0 comments on commit 473d674

Please sign in to comment.
Something went wrong with that request. Please try again.