append api to lib name
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Load all .d.ts files from the dist/libs folder
|
||||
// and replace all imports from @umbraco-cms/backoffice with relative imports
|
||||
// Example: import { Foo } from '@umbraco-cms/backoffice/element' -> import { Foo } from './element'
|
||||
// Example: import { Foo } from '@umbraco-cms/backoffice/element-api' -> import { Foo } from './element'
|
||||
// This is needed because the d.ts files are not in the same folder as the source files
|
||||
// and the absolute paths are not valid when the d.ts files are copied to the dist folder
|
||||
// This is only used when building the d.ts files.
|
||||
@@ -35,8 +35,7 @@ try {
|
||||
}
|
||||
|
||||
// Transform all .d.ts files and copy all other files to the output folder
|
||||
libs.forEach(lib => {
|
||||
|
||||
libs.forEach((lib) => {
|
||||
if (lib.endsWith('.js') === false && lib.endsWith('.js.map') === false) return;
|
||||
|
||||
console.log(`Transforming ${lib}`);
|
||||
@@ -55,5 +54,4 @@ libs.forEach(lib => {
|
||||
writeFileSync(dtsFile, code, 'utf8');
|
||||
|
||||
cpSync(dtsFile, `${outputDir}/${lib}`, { recursive: true });
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user