Skip to content

Commit

Permalink
build: switch to dart-sass (#12370)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
devversion authored and mmalerba committed Jul 29, 2018
1 parent 5963d14 commit e074003
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 24 deletions.
118 changes: 98 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
"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",
"gulp-htmlmin": "^3.0.0",
"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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions tools/package-tools/gulp/build-scss-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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');

/** Create a gulp task that builds SCSS files. */
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));
};
Expand Down

0 comments on commit e074003

Please sign in to comment.