1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 09:56:51 +01:00

prepare compilation via grunt

This commit is contained in:
Matthias Kretschmann 2014-07-12 02:07:09 +02:00
parent aadeb2e5c3
commit b9640e20dd
2 changed files with 17 additions and 14 deletions

View File

@ -7,7 +7,7 @@ module.exports = function(grunt){
site: '_site', site: '_site',
build: '_build', build: '_build',
assets: { assets: {
less: 'assets/less', stylus: 'assets/styl',
css: 'assets/css', css: 'assets/css',
js: 'assets/js', js: 'assets/js',
img: 'assets/img', img: 'assets/img',
@ -62,12 +62,15 @@ module.exports = function(grunt){
} }
}, },
// less // Stylus
less: { stylus: {
production: { compile: {
options: {
include css: true
}
files: { files: {
'<%= config.site %>/<%= config.assets.css %>/kremalicious3.min.css' : '<%= config.src %>/<%= config.assets.less %>/kremalicious3.less', '<%= config.site %>/<%= config.assets.css %>/kremalicious3.min.css' : '<%= config.src %>/<%= config.assets.stylus %>/kremalicious3.styl',
'<%= config.site %>/<%= config.assets.css %>/poststyle-2300.min.css' : '<%= config.src %>/<%= config.assets.less %>/poststyle-2300.less' '<%= config.site %>/<%= config.assets.css %>/poststyle-2300.min.css' : '<%= config.src %>/<%= config.assets.stylus %>/poststyle-2300.styl'
}, },
}, },
}, },
@ -162,9 +165,9 @@ module.exports = function(grunt){
options: { options: {
livereload: true livereload: true
}, },
less: { stylus: {
files: ['<%= config.src %>/<%= config.assets.less %>/*.less'], files: ['<%= config.src %>/<%= config.assets.stylus %>/*.styl'],
tasks: ['less','cmq','cssmin'] tasks: ['stylus','cmq','cssmin']
}, },
js: { js: {
files: ['<%= config.src %>/<%= config.assets.js %>/*.js'], files: ['<%= config.src %>/<%= config.assets.js %>/*.js'],
@ -181,7 +184,7 @@ module.exports = function(grunt){
'<%= config.src %>/_posts/**', '<%= config.src %>/_posts/**',
'<%= config.src %>/_drafts/**' '<%= config.src %>/_drafts/**'
], ],
tasks: ['jekyll:development', 'less', 'cmq', 'cssmin', 'uglify'] tasks: ['jekyll:development', 'stylus', 'cmq', 'cssmin', 'uglify']
}, },
}, },
@ -253,7 +256,7 @@ module.exports = function(grunt){
// Default Task, assets only // Default Task, assets only
grunt.registerTask('default', [ grunt.registerTask('default', [
'less', 'stylus',
'cmq', 'cmq',
'cssmin', 'cssmin',
'uglify', 'uglify',
@ -266,7 +269,7 @@ module.exports = function(grunt){
'clean:site', 'clean:site',
'jekyll:development', 'jekyll:development',
'rsync:copy_media', 'rsync:copy_media',
'less', 'stylus',
'cmq', 'cmq',
'cssmin', 'cssmin',
'uglify', 'uglify',
@ -279,7 +282,7 @@ module.exports = function(grunt){
'clean', 'clean',
'jekyll:production', 'jekyll:production',
'rsync:copy_media', 'rsync:copy_media',
'less', 'stylus',
'cmq', 'cmq',
'cssmin', 'cssmin',
'uglify', 'uglify',

View File

@ -44,7 +44,7 @@ redcarpet:
source: ./_src source: ./_src
destination: ./_site destination: ./_site
exclude: ['less', 'app.js'] exclude: ['styl', 'app.js']
keep_files: ['media', 'gen'] keep_files: ['media', 'gen']