Skip to content

Commit 243fa5c

Browse files
committed
updating the packages names to accomodate the windows max length
1 parent 2be130f commit 243fa5c

11 files changed

Lines changed: 25 additions & 18 deletions

File tree

.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"src/templates/uiBundles/reactbasic/**/*",
7171
"src/templates/project/reactinternalapp/**/*",
7272
"src/templates/project/reactexternalapp/**/*",
73-
"src/templates/project/angularinternalapp/**/*",
74-
"src/templates/project/angularexternalapp/**/*"
73+
"src/templates/project/angularintapp/**/*",
74+
"src/templates/project/angularextapp/**/*"
7575
]
7676
}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ src/templates/uiBundles/
6767
# ignore project templates copied from npm during build (copy-templates)
6868
src/templates/project/reactinternalapp/
6969
src/templates/project/reactexternalapp/
70-
src/templates/project/angularinternalapp/
71-
src/templates/project/angularexternalapp/
70+
src/templates/project/angularintapp/
71+
src/templates/project/angularextapp/

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@salesforce/dev-config": "^4.3.3",
2626
"@salesforce/dev-scripts": "^11.0.2",
2727
"@salesforce/prettier-config": "^0.0.4",
28-
"@salesforce/ui-bundle-template-app-angular-template-b2e": "^11.30.0",
29-
"@salesforce/ui-bundle-template-app-angular-template-b2x": "^11.30.0",
28+
"@salesforce/ui-bundle-template-app-angular-template-b2e": "^11.31.12",
29+
"@salesforce/ui-bundle-template-app-angular-template-b2x": "^11.31.12",
3030
"@salesforce/ui-bundle-template-app-react-template-b2e": "^10.24.0",
3131
"@salesforce/ui-bundle-template-app-react-template-b2x": "^10.12.2",
3232
"@salesforce/ui-bundle-template-base-angular-app": "^11.31.9",
@@ -69,6 +69,7 @@
6969
},
7070
"scripts": {
7171
"build": "yarn run clean:lib && yarn compile && yarn build:copy-templates && yarn build:templates",
72+
"build:angular": "yarn run clean:lib && yarn compile && TEMPLATE_FILTER=angular yarn build:copy-templates && yarn build:templates",
7273
"build:templates": "node scripts/build-templates",
7374
"build:copy-templates": "node scripts/copy-templates",
7475
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output",
@@ -86,5 +87,10 @@
8687
},
8788
"publishConfig": {
8889
"access": "public"
90+
},
91+
"resolutions": {
92+
"@salesforce/ui-bundle-template-app-angular-template-b2e": "portal:/Users/tsingla/AFSWorkspace/webapps/packages/template/app/angularintapp",
93+
"@salesforce/ui-bundle-template-app-angular-template-b2x": "portal:/Users/tsingla/AFSWorkspace/webapps/packages/template/app/angularextapp",
94+
"@salesforce/ui-bundle-template-base-angular-app": "portal:/Users/tsingla/AFSWorkspace/webapps/packages/template/base-app/base-angular-app"
8995
}
9096
}

scripts/copy-templates.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ const TEMPLATES = [
100100
{
101101
packageName: '@salesforce/ui-bundle-template-app-angular-template-b2x',
102102
getSourceDir: (packageDir) => path.join(packageDir, 'dist'),
103-
destSubpath: 'project/angularexternalapp',
104-
appFolderInNpm: 'angularexternalapp',
103+
destSubpath: 'project/angularextapp',
104+
appFolderInNpm: 'angularextapp',
105105
},
106106
{
107107
packageName: '@salesforce/ui-bundle-template-app-angular-template-b2e',
108108
getSourceDir: (packageDir) => path.join(packageDir, 'dist'),
109-
destSubpath: 'project/angularinternalapp',
110-
appFolderInNpm: 'angularinternalapp',
109+
destSubpath: 'project/angularintapp',
110+
appFolderInNpm: 'angularintapp',
111111
},
112112
];
113113

src/generators/projectGenerator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { CreateUtil } from '../utils';
99
import { GeneratorContext, ProjectOptions } from '../utils/types';
1010
import {
1111
BUILT_IN_FULL_TEMPLATES,
12+
FULL_TEMPLATE_DEFAULT_NAMES,
1213
generateBuiltInFullTemplate,
1314
renderEjsFile,
1415
} from '../utils/uiBundleTemplateUtils';
@@ -635,7 +636,7 @@ export default class ProjectGenerator extends BaseGenerator<ProjectOptions> {
635636

636637
if (BUILT_IN_FULL_TEMPLATES.has(template)) {
637638
await generateBuiltInFullTemplate(template, projectname, {
638-
templateDir: this.templatePath(template),
639+
templateDir: this.templatePath(FULL_TEMPLATE_DEFAULT_NAMES[template]?.base ?? template),
639640
projectDir: path.join(this.outputdir, projectname),
640641
defaultpackagedir,
641642
ns,

src/utils/uiBundleTemplateUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ export const FULL_TEMPLATE_DEFAULT_NAMES: Record<
102102
withSuffix: 'reactexternalapp1',
103103
},
104104
angularinternalapp: {
105-
base: 'angularinternalapp',
106-
withSuffix: 'angularinternalapp1',
105+
base: 'angularintapp',
106+
withSuffix: 'angularintapp1',
107107
},
108108
angularexternalapp: {
109-
base: 'angularexternalapp',
110-
withSuffix: 'angularexternalapp1',
109+
base: 'angularextapp',
110+
withSuffix: 'angularextapp1',
111111
},
112112
};
113113

test/fixtures/project-templates/project/angularexternalapp/sample.txt renamed to test/fixtures/project-templates/project/angularextapp/sample.txt

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
angularintapp

test/fixtures/project-templates/project/angularinternalapp/sample.txt renamed to test/fixtures/project-templates/project/angularintapp/sample.txt

File renamed without changes.

test/fixtures/project-templates/project/angularinternalapp/appname.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)