Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ts.ScriptTarget.Latest,
true
);
const effectsName = `${stringUtils.classify(`${options.name}Effects`)}`;
const effectsModuleImport = insertImport(
source,
modulePath,
'EffectsModule',
'@ngrx/effects'
);
const effectsPath =
`/${options.path}/` +
(options.flat ? '' : stringUtils.dasherize(options.name) + '/') +
(options.group ? 'effects/' : '') +
stringUtils.dasherize(options.name) +
'.effects';
const relativePath = buildRelativePath(modulePath, effectsPath);
const effectsImport = insertImport(
source,
modulePath,
effectsName,
relativePath
);
const effectsSetup = options.minimal ? `[]` : `[${effectsName}]`;
const [effectsNgModuleImport] = addImportToModule(
source,
modulePath,
`EffectsModule.forRoot(${effectsSetup})`,
);
const effectsName = `${stringUtils.classify(`${options.name}Effects`)}`;
const effectsModuleImport = insertImport(
source,
modulePath,
'EffectsModule',
'@ngrx/effects'
);
const effectsPath =
`/${options.path}/` +
(options.flat ? '' : stringUtils.dasherize(options.name) + '/') +
(options.group ? 'effects/' : '') +
stringUtils.dasherize(options.name) +
'.effects';
const relativePath = buildRelativePath(modulePath, effectsPath);
const effectsImport = insertImport(
source,
modulePath,
effectsName,
relativePath
);
const effectsSetup = options.minimal ? `[]` : `[${effectsName}]`;
const [effectsNgModuleImport] = addImportToModule(
source,
modulePath,
`EffectsModule.forRoot(${effectsSetup})`,
relativePath
);