Skip to content

Commit

Permalink
prefix, minify, fix stat command for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
okor committed May 5, 2015
1 parent a258b96 commit 8e13a91
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 42 deletions.
16 changes: 14 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,23 @@ module.exports = function(grunt) {

sass: {
dist: {
options: {
outputStyle: 'compressed'
},
files: {
'tmp/justice.css': 'src/scss/justice.scss'
}
}
},

autoprefixer: {
dist: {
files: {
'tmp/justice.css': 'tmp/justice.css'
},
},
},

css2js: {
main: {
src: 'tmp/justice.css',
Expand Down Expand Up @@ -79,7 +90,7 @@ module.exports = function(grunt) {
stderr: true
},
logSize: {
command: 'echo `git rev-parse --short HEAD && date +"%m/%d/%y %T:%S" && stat -c%s build/justice.min.js && echo "bytes"` >> log/size-log.txt'
command: 'echo `git rev-parse --short HEAD && date +"%m/%d/%y %T:%S" && stat -f%z build/justice.min.js && echo "bytes"` >> log/size-log.txt'
}
},

Expand All @@ -89,11 +100,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-css2js');
grunt.loadNpmTasks('grunt-includes');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-shell');

grunt.registerTask('build', ['clean', 'sass', 'css2js:main', 'includes:js', 'uglify:min', 'uglify:minMapped', 'shell:logSize']);
grunt.registerTask('build', ['clean', 'sass', 'autoprefixer', 'css2js:main', 'includes:js', 'uglify:min', 'uglify:minMapped', 'shell:logSize']);
grunt.registerTask('default', ['build', 'watch']);
};
2 changes: 1 addition & 1 deletion build/justice.mapped.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8e13a91

Please sign in to comment.