mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-08 19:45:08 +00:00
Removed optional chaining operators to support Node v12
Set the version on .nvmrc to 12
This commit is contained in:
parent
e3821da077
commit
0ac967a945
|
@ -72,13 +72,17 @@ function generateThemesObject(themes)
|
||||||
return _.map(_.cloneDeep(themes), (value, key) =>
|
return _.map(_.cloneDeep(themes), (value, key) =>
|
||||||
{
|
{
|
||||||
const theme = normalizeTheme(value);
|
const theme = normalizeTheme(value);
|
||||||
|
const primary = (theme && theme.primary && theme.primary.DEFAULT) ? theme.primary.DEFAULT : normalizedDefaultTheme.primary.DEFAULT;
|
||||||
|
const accent = (theme && theme.accent && theme.accent.DEFAULT) ? theme.accent.DEFAULT : normalizedDefaultTheme.accent.DEFAULT;
|
||||||
|
const warn = (theme && theme.warn && theme.warn.DEFAULT) ? theme.warn.DEFAULT : normalizedDefaultTheme.warn.DEFAULT;
|
||||||
|
|
||||||
return _.fromPairs([
|
return _.fromPairs([
|
||||||
[
|
[
|
||||||
key,
|
key,
|
||||||
{
|
{
|
||||||
primary: theme?.primary?.DEFAULT ?? normalizedDefaultTheme.primary.DEFAULT,
|
primary,
|
||||||
accent : theme?.accent?.DEFAULT ?? normalizedDefaultTheme.accent.DEFAULT,
|
accent,
|
||||||
warn : theme?.warn?.DEFAULT ?? normalizedDefaultTheme.warn.DEFAULT
|
warn
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -78,7 +78,7 @@ const config = {
|
||||||
// development and production, we will decide whether to purge or not
|
// development and production, we will decide whether to purge or not
|
||||||
// by looking at the process arguments. If there is a "build" argument
|
// by looking at the process arguments. If there is a "build" argument
|
||||||
// with the "ng" command then we will enable the purge.
|
// with the "ng" command then we will enable the purge.
|
||||||
enabled: process?.argv?.find(arg => arg.includes('ng')) && process?.argv?.indexOf('build') !== -1,
|
enabled: process && process.argv && process.argv.find(arg => arg.includes('ng')) && process.argv.indexOf('build') !== -1,
|
||||||
content: ['./src/**/*.{html,scss,ts}'],
|
content: ['./src/**/*.{html,scss,ts}'],
|
||||||
options: {
|
options: {
|
||||||
safelist: {
|
safelist: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user