Skip to content

Commit 0a97610

Browse files
committed
Added grunt SASS task to build compresses skin css to dist
1 parent 4c05012 commit 0a97610

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

Gruntfile.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,28 @@ module.exports = function(grunt) {
6666
}
6767
},
6868

69+
sass: {
70+
options: {
71+
outputStyle: 'compressed'
72+
},
73+
"blue.monday": {
74+
options: {
75+
banner: '/*! Blue Monday Skin for jPlayer <%= pkg.version %> ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
76+
},
77+
files: {
78+
'dist/skin/blue.monday/jplayer.blue.monday.min.css': ['src/skin/blue.monday/jplayer.blue.monday.scss']
79+
}
80+
},
81+
"pink.flag": {
82+
options: {
83+
banner: '/*! Pink Flag Skin for jPlayer <%= pkg.version %> ~ (c) 2009-<%= grunt.template.today("yyyy") %> <%= pkg.organization %> ~ <%= pkg.license %> License */\n'
84+
},
85+
files: {
86+
'dist/skin/pink.flag/jplayer.pink.flag.min.css': ['src/skin/pink.flag/jplayer.pink.flag.scss']
87+
}
88+
}
89+
},
90+
6991
jshint: {
7092

7193
test: {
@@ -101,12 +123,14 @@ module.exports = function(grunt) {
101123
grunt.loadNpmTasks('grunt-contrib-jshint');
102124
grunt.loadNpmTasks('grunt-contrib-concat');
103125
grunt.loadNpmTasks('grunt-contrib-uglify');
126+
grunt.loadNpmTasks('grunt-sass');
104127
grunt.loadNpmTasks('grunt-mxmlc');
105128

106129
grunt.registerTask('default', ['test', 'build']);
107130

108131
grunt.registerTask('test', ['jshint']);
109-
grunt.registerTask('build', ['js', 'swf']);
132+
grunt.registerTask('build', ['js', 'swf', 'css']);
110133
grunt.registerTask('js', ['concat', 'uglify']);
111134
grunt.registerTask('swf', ['mxmlc']);
135+
grunt.registerTask('css', ['sass']);
112136
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"grunt-contrib-concat": "~0.5.0",
4040
"grunt-contrib-jshint": "~0.10.0",
4141
"grunt-contrib-uglify": "~0.6.0",
42-
"grunt-mxmlc": "~0.5.2"
42+
"grunt-mxmlc": "~0.5.2",
43+
"grunt-sass": "^0.17.0"
4344
}
4445
}

0 commit comments

Comments
 (0)