Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"lib": {
"entryFile": "public-api.ts",
"flatModuleFile": "{{{moduleFileName}}}"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"name": "@cds/angular/{{{moduleDirectory}}}",
"ngPackage": {
"lib": {
"entryFile": "public-api.ts",
"flatModuleFile": "{{{moduleFileName}}}"
}
}
"name": "@cds/angular/{{{moduleDirectory}}}"
}
4 changes: 4 additions & 0 deletions projects/angular/scripts/core-ng-module-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const directiveTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/directive.
const moduleTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/module.ts.mustache', 'utf8');
const indexTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/index.ts.mustache', 'utf8');
const packageTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/package.json.mustache', 'utf8');
const ngPackageTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/ng-package.json.mustache', 'utf8');
const publicAPITemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/public-api.ts.mustache', 'utf8');
const rootIndexTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/root-index.ts.mustache', 'utf8');
const rootModuleTemplate = fs.readFileSync(MUSTACHE_TEMPLTATE_PATH + '/root-module.ts.mustache', 'utf8');
Expand All @@ -41,6 +42,7 @@ function createEntryPoints(modules) {
const indexFilePath = path.resolve(TARGET_PATH, path.join(moduleDirectory, 'index.ts'));
const publicAPIFilePath = path.resolve(TARGET_PATH, path.join(moduleDirectory, 'public-api.ts'));
const packageFilePath = path.resolve(TARGET_PATH, path.join(moduleDirectory, 'package.json'));
const ngPackageFilePath = path.resolve(TARGET_PATH, path.join(moduleDirectory, 'ng-package.json'));
const moduleClassName = createModuleClassName(module);
const directives = elements.map(element => createDirective(element, module));

Expand All @@ -50,6 +52,7 @@ function createEntryPoints(modules) {
moduleFilePath,
moduleClassName,
packageFilePath,
ngPackageFilePath,
indexFilePath,
publicAPIFilePath,
directives,
Expand All @@ -76,6 +79,7 @@ function writeComponentSubModules(modules) {
writeToDisk(module.moduleFilePath, `${licenseHeader}${Mustache.render(moduleTemplate, module)}`);
writeToDisk(module.indexFilePath, `${licenseHeader}${Mustache.render(indexTemplate, module)}`);
writeToDisk(module.packageFilePath, Mustache.render(packageTemplate, module));
writeToDisk(module.ngPackageFilePath, Mustache.render(ngPackageTemplate, module));
writeToDisk(module.publicAPIFilePath, `${licenseHeader}${Mustache.render(publicAPITemplate)}`);
module.directives.forEach(directive =>
writeToDisk(directive.directiveFilePath, `${licenseHeader}${Mustache.render(directiveTemplate, directive)}`)
Expand Down