Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function main() {
// cleanup dist
del.sync(join(process.cwd(), '/dist'));
del.sync(join(process.cwd(), '/node_modules/ngx-color'));
await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/common/package.json'))
.build();
// put it in node modules so the path resolves
// proper path support eventually
copySync(
join(process.cwd(), '/dist/common'),
join(process.cwd(), '/node_modules/ngx-color'),
);
copySync(
join(process.cwd(), '/dist/common'),
join(process.cwd(), '/dist/packages-dist'),
);
// build each package
for (const m of MODULE_NAMES) {
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as path from 'path';
import { ngPackagr } from 'ng-packagr';
ngPackagr()
.forProject(path.resolve(__dirname, 'package.json'))
.withTsConfig(path.resolve(__dirname, 'tsconfig-custom.json'))
.build();
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as path from 'path';
import { ngPackagr } from 'ng-packagr';
ngPackagr()
.forProject(path.resolve(__dirname, 'package.json'))
.withTsConfig(path.resolve(__dirname, 'tsconfig-custom.json'))
.build();
.forProject(join(process.cwd(), 'src/lib/core/package.json'))
.build();
// put it in node modules so the path resolves
// proper path support eventually
copySync(
join(process.cwd(), '/dist/core'),
join(process.cwd(), '/node_modules/angulartics2'),
);
copySync(
join(process.cwd(), '/dist/core'),
join(process.cwd(), '/dist/packages-dist'),
);
for (const m of CORE_MODULE_NAMES) {
await ngPackagr()
.forProject(join(process.cwd(), `src/lib/${m}/package.json`))
.build();
}
// build each provider
for (const m of MODULE_NAMES) {
await ngPackagr()
.forProject(join(process.cwd(), `src/lib/providers/${m}/package.json`))
.build();
}
copySync('README.md', join(process.cwd(), 'dist/packages-dist/README.md'));
copySync('LICENSE', join(process.cwd(), 'dist/packages-dist/LICENSE'));
}
async function main() {
// cleanup dist
rimraf.sync(join(process.cwd(), '/dist'));
rimraf.sync(join(process.cwd(), '/node_modules/angulartics2'));
await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/core/package.json'))
.build();
// put it in node modules so the path resolves
// proper path support eventually
copySync(
join(process.cwd(), '/dist/core'),
join(process.cwd(), '/node_modules/angulartics2'),
);
copySync(
join(process.cwd(), '/dist/core'),
join(process.cwd(), '/dist/packages-dist'),
);
for (const m of CORE_MODULE_NAMES) {
await ngPackagr()
async function main() {
// cleanup dist
del.sync(join(process.cwd(), '/dist'));
del.sync(join(process.cwd(), '/node_modules/@ctrl/ngx-emoji-mart'));
// make emoi
await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/emoji/package.json'))
.build();
// put it in node modules so the path resolves
// proper path support eventually
copySync(
join(process.cwd(), '/dist/emoji'),
join(process.cwd(), '/node_modules/@ctrl/ngx-emoji-mart/ngx-emoji'),
);
copySync(
join(process.cwd(), '/dist/emoji'),
join(process.cwd(), '/dist/packages-dist/ngx-emoji'),
);
await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/picker/package.json'))
async function buildPackage(): Promise {
try {
await ngPackagr()
.forProject(join(__dirname, '../src/package.json'))
.withTsConfig(join(__dirname, '../src/tsconfig.lib.json'))
.build();
} catch (e) {
console.log(e);
}
}
import { ngPackagr } from 'ng-packagr';
import { root } from './helpers';
ngPackagr()
.forProject(root(`./packages/@ngx-cache/${process.argv[2]}/ng-package.json`))
.withTsConfig(root('./tools/build/tsconfig.package.json'))
.build()
.catch(() => (process.exitCode = 1));
import { ngPackagr } from 'ng-packagr';
import { root } from './helpers';
ngPackagr()
.forProject(root(`./packages/@ngx-config/${process.argv[2]}/ng-package.json`))
.withTsConfig(root('./tools/build/tsconfig.package.json'))
.build()
.catch(() => (process.exitCode = 1));