diff options
Diffstat (limited to 'sources/css/tyrian/Gruntfile.js')
-rw-r--r-- | sources/css/tyrian/Gruntfile.js | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/sources/css/tyrian/Gruntfile.js b/sources/css/tyrian/Gruntfile.js index 486e614..035e5b4 100644 --- a/sources/css/tyrian/Gruntfile.js +++ b/sources/css/tyrian/Gruntfile.js @@ -12,7 +12,7 @@ module.exports = function(grunt) { }, files: { "dist/tyrian.css": "less/tyrian.less" - } + } }, minify: { options: { @@ -39,12 +39,20 @@ module.exports = function(grunt) { {expand: true, flatten: true, src: ['dist/tyrian.css'], dest: 'dist/'} ] } - }, - sed: { + }, + 'string-replace': { inject_variables: { - path: '../bootstrap/less/bootstrap.less', - pattern: /@import "variables\.less";$/m, - replacement: '@import "variables.less"; @import "../../tyrian/bootstrap/variables-tyrian.less";' + options: { + patterns: [ + { + match: /@import "variables\.less";$/m, + replacement: '@import "variables.less"; @import "../../tyrian/bootstrap/variables-tyrian.less";' + } + ] + }, + files: [ + {expand: true, flatten: true, src: ['../bootstrap/less/bootstrap.less'], dest: '../bootstrap/less/'} + ] } }, shell: { @@ -61,13 +69,13 @@ module.exports = function(grunt) { }); grunt.loadNpmTasks("grunt-contrib-less"); - grunt.loadNpmTasks("grunt-replace"); - grunt.loadNpmTasks("grunt-sed"); + grunt.loadNpmTasks("grunt-replace-regex"); + grunt.loadNpmTasks("grunt-string-replace"); grunt.loadNpmTasks("grunt-shell"); grunt.registerTask("compile", ["less:compile", "replace:compile"]); grunt.registerTask("compress", ["less:minify"]); - grunt.registerTask("bootstrap", ["sed:inject_variables", "shell:build_bootstrap"]); + grunt.registerTask("bootstrap", ["string-replace:inject_variables", "shell:build_bootstrap"]); grunt.registerTask("dist", ["bootstrap", "compile", "compress"]); grunt.registerTask("default", ["dist"]); |