mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 20:09:09 +08:00
parent
dfa22687b5
commit
91488f31da
@ -8,6 +8,7 @@ var fs = require("fs"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
sass = require("gulp-sass"),
|
||||
autoprefixer = require("gulp-autoprefixer"),
|
||||
minify = require("gulp-minify-css"),
|
||||
typescript = require("gulp-typescript"),
|
||||
@ -123,7 +124,7 @@ function createAssetGroupTask(assetGroup, doRebuild) {
|
||||
function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".less" && ext !== ".css")
|
||||
if (ext !== ".less" && ext !== ".scss" && ext !== ".css")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
@ -138,6 +139,7 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", sass()))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
|
||||
// TODO: Start using below whenever gulp-header supports sourcemaps.
|
||||
|
@ -11,6 +11,7 @@
|
||||
"gulp-plumber": "1.0.1",
|
||||
"gulp-sourcemaps": "1.6.0",
|
||||
"gulp-less": "3.0.3",
|
||||
"gulp-sass": "2.3.1",
|
||||
"gulp-autoprefixer": "2.2.0",
|
||||
"gulp-minify-css": "1.2.1",
|
||||
"gulp-typescript": "2.9.2",
|
||||
|
Loading…
Reference in New Issue
Block a user