Skip to content

Commit

Permalink
Specify ENABLE_SCSS setting via environment variable (#1603)
Browse files Browse the repository at this point in the history
* Allow ENABLE_SCSS flag to be set via ENV variable

Some npm run-scripts contain multiple gulp comman-
ds (ex. e2e.ci). Multiple gulp commands may refer-
ence the ENABLE_SCSS setting; however, '--scss' is
only appended to the final command:

    gulp ... && gulp ... && gulp ... "--scss"

This results in a build error.

To provide each command in an npm run-script the
correct ENABLE_SCSS setting, set the ENABLE_SCSS
setting using an environment variable rather than
a command-line argument.

BREAKING CHANGES
1. The '--scss' no longer has any effect
2. To enable SASS support via the command line,
   one must prefix their run-script command with
   ENABLE_SCSS=1 or ENABLE_SCSS=true.

* Keep '--scss' flag for backwards compatibility
  • Loading branch information
Hank Ehly authored and mgechev committed Nov 9, 2016
1 parent 5010350 commit 5d7e5db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/config/seed.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ export class SeedConfig {
VERSION_NODE = '4.0.0';

/**
* The flag to enable handling of SCSS files
* The default value is false. Override with the '--scss' flag.
* Enable SCSS stylesheet compilation.
* Set ENABLE_SCSS environment variable to 'true' or '1'
* @type {boolean}
*/
ENABLE_SCSS = argv['scss'] || false;
ENABLE_SCSS = ['true', '1'].indexOf(`${process.env.ENABLE_SCSS}`.toLowerCase()) !== -1 || argv['scss'] || false;

/**
* The list of NPM dependcies to be injected in the `index.html`.
Expand Down

0 comments on commit 5d7e5db

Please sign in to comment.