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 main() {
// make common
await build({
project: join(process.cwd(), 'src/lib/package.json'),
});
copySync('README.md', join(process.cwd(), 'dist/README.md'));
copySync('LICENSE', join(process.cwd(), 'dist/LICENSE'));
}
async function main() {
// cleanup dist
rimraf.sync(join(process.cwd(), '/dist'));
// build packages
await build({
project: join(process.cwd(), 'src/lib/package.json'),
});
// copy everything else
copySync('README.md', join(process.cwd(), 'dist/README.md'));
copySync('LICENSE', join(process.cwd(), 'dist/LICENSE'));
copySync(
join(process.cwd(), 'src/lib/toastr-bs4-alert.scss'),
join(process.cwd(), 'dist/toastr-bs4-alert.scss'),
);
copySync(
join(process.cwd(), 'src/lib/toastr.css'),
join(process.cwd(), 'dist/toastr.css'),
);
copySync(
join(process.cwd(), 'src/lib/toastr-old.css'),
async function main() {
// build package
await build({
project: join(process.cwd(), 'src/lib/package.json'),
});
// copy everything else
copySync('README.md', join(process.cwd(), 'dist/README.md'));
copySync('LICENSE', join(process.cwd(), 'dist/LICENSE'));
}
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);
}
}