Skip to content

Commit 5d7e5db

Browse files
Hank Ehlymgechev
Hank Ehly
authored andcommitted
Specify ENABLE_SCSS setting via environment variable (#1603)
* 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
1 parent 5010350 commit 5d7e5db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/config/seed.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,11 @@ export class SeedConfig {
282282
VERSION_NODE = '4.0.0';
283283

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

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

0 commit comments

Comments
 (0)