build: switch to dart-sass (#12370)

* Switches to dart-sass in order to be consistent with the Bazel output. That way we can identify potential issues with the SASS output (e.g. demo-app) before we at some point make the full-switch.
* Also speeds-up the project installs because libsass bindings are no longer needed (trade-off with compilation time though; but pretty minimal due to our amount of Sass files)
This commit is contained in:
Paul Gschwendtner
2018-07-29 06:49:04 +02:00
committed by mmalerba
parent 5963d14bdd
commit e07400354a
3 changed files with 102 additions and 24 deletions
+98 -20
View File
@@ -6053,12 +6053,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6073,17 +6075,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6200,7 +6205,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -6212,6 +6218,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6226,6 +6233,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -6233,12 +6241,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -6257,6 +6267,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -6337,7 +6348,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -6349,6 +6361,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -6470,6 +6483,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -9078,6 +9092,74 @@
"through2": "^2.0.0"
}
},
"gulp-dart-sass": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/gulp-dart-sass/-/gulp-dart-sass-0.9.0.tgz",
"integrity": "sha512-WlWU9nm0ZIOedXDapeFPAIzAdb1I2ShsI/jve4WzXD4yvWy94kYm42wuD8sqPpe3TeixKzqKzg1YwesTPTU/UA==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
"lodash.clonedeep": "^4.3.2",
"plugin-error": "^1.0.1",
"replace-ext": "^1.0.0",
"sass": "^1.3.2",
"strip-ansi": "^4.0.0",
"through2": "^2.0.0",
"vinyl-sourcemaps-apply": "^0.2.0"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
},
"supports-color": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"gulp-dom": {
"version": "0.9.17",
"resolved": "https://registry.npmjs.org/gulp-dom/-/gulp-dom-0.9.17.tgz",
@@ -9425,19 +9507,6 @@
"integrity": "sha512-nEuZB7/9i0IZ8AXORTizl2QLP9tcC9uWc/s329zElBLJw1CfOhmMXBxwVlCRKjDyrWuhVP0uBKl61KeQ32TiCg==",
"dev": true
},
"gulp-sass": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-3.2.1.tgz",
"integrity": "sha512-UATbRpSDsyXCnpYSPBUEvdvtSEzksJs7/oQ0CujIpzKqKrO6vlnYwhX2UTsGrf4rNLwqlSSaM271It0uHYvJ3Q==",
"dev": true,
"requires": {
"gulp-util": "^3.0",
"lodash.clonedeep": "^4.3.2",
"node-sass": "^4.8.3",
"through2": "^2.0.0",
"vinyl-sourcemaps-apply": "^0.2.0"
}
},
"gulp-transform": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/gulp-transform/-/gulp-transform-2.0.0.tgz",
@@ -16129,6 +16198,15 @@
}
}
},
"sass": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.10.1.tgz",
"integrity": "sha512-tmDf4uHAifn3WHydSn7BZY1Q39zdXdfjDlzYYgN/CuwwYWVVOBhFCKeF3QUdJNP9LvSXl6lSft0YRhYSRLc5dA==",
"dev": true,
"requires": {
"chokidar": "^2.0.0"
}
},
"sass-graph": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz",
+2 -2
View File
@@ -84,6 +84,7 @@
"gulp-cli": "^1.3.0",
"gulp-connect": "^5.0.0",
"gulp-conventional-changelog": "^1.1.3",
"gulp-dart-sass": "^0.9.0",
"gulp-dom": "^0.9.17",
"gulp-flatten": "^0.3.1",
"gulp-highlight-files": "^0.0.5",
@@ -91,7 +92,6 @@
"gulp-if": "^2.0.2",
"gulp-markdown": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-transform": "^2.0.0",
"gulp-util": "^3.0.8",
"hammerjs": "^2.0.8",
@@ -111,7 +111,6 @@
"minimatch": "^3.0.4",
"minimist": "^1.2.0",
"moment": "^2.18.1",
"node-sass": "^4.5.3",
"parse5": "^5.0.0",
"protractor": "^5.2.0",
"request": "^2.83.0",
@@ -120,6 +119,7 @@
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-node-resolve": "^3.0.3",
"run-sequence": "^1.2.2",
"sass": "^1.10.1",
"scss-bundle": "^2.0.1-beta.7",
"selenium-webdriver": "^3.6.0",
"sorcery": "^0.10.0",
+2 -2
View File
@@ -2,7 +2,7 @@ import {src, dest} from 'gulp';
import {join} from 'path';
// These imports lack of type definitions.
const gulpSass = require('gulp-sass');
const gulpDartSass = require('gulp-dart-sass');
const gulpIf = require('gulp-if');
const gulpCleanCss = require('gulp-clean-css');
@@ -10,7 +10,7 @@ const gulpCleanCss = require('gulp-clean-css');
export function buildScssTask(outputDir: string, sourceDir: string, minifyOutput = false) {
return () => {
return src(join(sourceDir, '**/*.scss'))
.pipe(gulpSass().on('error', gulpSass.logError))
.pipe(gulpDartSass.sync().on('error', gulpDartSass.logError))
.pipe(gulpIf(minifyOutput, gulpCleanCss()))
.pipe(dest(outputDir));
};