Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function addDependencies(): Rule {
return addDepsToPackageJson(
{
next: nextVersion,
'@zeit/next-css': zeitNextCss,
'@zeit/next-sass': zeitNextLess,
'@zeit/next-less': zeitNextSass,
'@zeit/next-stylus': zeitNextStylus
},
{}
);
}
function addDependencies(): Rule {
return addDepsToPackageJson(
{
'document-register-element': documentRegisterElementVersion
},
{
'@nrwl/web': nxVersion
}
);
}
'@angular/forms': angularVersion,
'@angular/platform-browser': angularVersion,
'@angular/platform-browser-dynamic': angularVersion,
'@angular/router': angularVersion,
'core-js': '^2.5.4',
rxjs: rxjsVersion,
'zone.js': '^0.9.1'
};
const devDeps = {
'@angular/compiler-cli': angularVersion,
'@angular/language-service': angularVersion,
'@angular-devkit/build-angular': angularDevkitVersion,
codelyzer: '~5.0.1'
};
return addDepsToPackageJson(deps, devDeps);
}
export function addNgRxToPackageJson(): Rule {
return addDepsToPackageJson(
{
'@ngrx/store': ngrxVersion,
'@ngrx/effects': ngrxVersion,
'@ngrx/entity': ngrxVersion,
'@ngrx/router-store': ngrxVersion
},
{
'@ngrx/schematics': ngrxVersion,
'@ngrx/store-devtools': ngrxVersion
}
);
}
function addDependencies(): Rule {
return addDepsToPackageJson(
{
express: expressVersion
},
{
'@types/express': expressTypingsVersion,
'@nrwl/express': nxVersion
}
);
}
export function addUnitTestRunner(
options: Pick
): Rule {
switch (options.unitTestRunner) {
case UnitTestRunner.Karma:
return schematic('karma', {});
case UnitTestRunner.Jest:
return chain([
addDepsToPackageJson(
{},
{
'jest-preset-angular': jestPresetAngularVersion
}
),
(host: Tree) => {
const packageJson = readJsonInTree(host, 'package.json');
if (packageJson.devDependencies['@nrwl/jest']) {
return noop();
}
return externalSchematic(
'@nrwl/jest',
'init',
{},
{
interactive: false
export function addDependencies(): Rule {
return addDepsToPackageJson(
{
react: reactVersion,
'react-dom': reactDomVersion
},
{
'@nrwl/react': nxVersion,
'@types/react': typesReactVersion,
'@types/react-dom': typesReactDomVersion,
'@testing-library/react': testingLibraryReactVersion
}
);
}
export function addDependencies(): Rule {
return addDepsToPackageJson(
{
'@nestjs/common': nestJsVersion,
'@nestjs/core': nestJsVersion,
'@nestjs/platform-express': nestJsVersion,
'reflect-metadata': reflectMetadataVersion
},
{
'@nestjs/schematics': nestJsSchematicsVersion,
'@nestjs/testing': nestJsVersion,
'@nrwl/nest': nxVersion
}
);
}
function addDependencies(): Rule {
return addDepsToPackageJson(
{},
{
'@nrwl/node': nxVersion
}
);
}