@eui/tools 6.2.33 → 6.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +9 -0
  3. package/package.json +1 -1
  4. package/scripts/csdr/cli/constants.js +43 -0
  5. package/scripts/csdr/cli/package-build-backend.js +70 -0
  6. package/scripts/csdr/cli/package-build-frontend.js +300 -0
  7. package/scripts/csdr/cli/package-prompt.js +123 -0
  8. package/scripts/csdr/cli/package.js +21 -438
  9. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/eui-components.ts +3 -3
  10. package/scripts/csdr/cli/skeletons/virtual-remote/15.x/angular-config.json +8 -0
  11. package/scripts/csdr/cli/skeletons/virtual-remote/15.x/dependencies.json +20 -0
  12. package/scripts/csdr/config/config-utils.js +1 -0
  13. package/scripts/csdr/config/global.js +0 -170
  14. package/scripts/csdr/config/packages.js +3 -3
  15. package/scripts/csdr/config/register.js +166 -0
  16. package/scripts/csdr/init/remotes.js +4 -2
  17. package/scripts/index.js +5 -0
  18. package/scripts/csdr/cli/skeletons/package/frontend/assets/i18n/en.json +0 -3
  19. package/scripts/csdr/cli/skeletons/package/frontend/assets/i18n/fr.json +0 -3
  20. package/scripts/csdr/cli/skeletons/package/frontend/gitignore_TO_REPLACE +0 -46
  21. package/scripts/csdr/cli/skeletons/package/frontend/karma.conf.js +0 -7
  22. package/scripts/csdr/cli/skeletons/package/frontend/ng-package.json +0 -7
  23. package/scripts/csdr/cli/skeletons/package/frontend/package.json +0 -4
  24. package/scripts/csdr/cli/skeletons/package/frontend/src/index.ts +0 -7
  25. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/components/cmp1/cmp1.component.html +0 -1
  26. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +0 -25
  27. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/components/cmp1/cmp1.component.ts +0 -14
  28. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/core/module.service.spec.ts.TO_REPLACE +0 -12
  29. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/core/module.service.ts +0 -8
  30. package/scripts/csdr/cli/skeletons/package/frontend/src/lib/module.module.ts +0 -14
  31. package/scripts/csdr/cli/skeletons/package/frontend/src/test.ts.TO_REPLACE +0 -22
  32. package/scripts/csdr/cli/skeletons/package/frontend/tsconfig.lib.json +0 -32
  33. package/scripts/csdr/cli/skeletons/package/frontend/tsconfig.spec.json +0 -17
  34. package/scripts/csdr/cli/skeletons/package/frontend/tslint.json +0 -17
  35. package/scripts/csdr/cli/skeletons/package/frontend-eui14/dependencies-composite.json +0 -3
  36. package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +0 -76
  37. package/scripts/csdr/cli/skeletons/package/frontend-remote/browserslist +0 -10
  38. package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-base.json +0 -2
  39. package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +0 -7
  40. package/scripts/csdr/cli/skeletons/package/frontend-remote/gitignore_TO_REPLACE +0 -64
  41. package/scripts/csdr/cli/skeletons/package/frontend-remote/karma.conf.js +0 -7
  42. package/scripts/csdr/cli/skeletons/package/frontend-remote/package.json_TO_REPLACE +0 -8
  43. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +0 -3
  44. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +0 -6
  45. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +0 -84
  46. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +0 -167
  47. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/reducers/custom-route-serializer.ts +0 -28
  48. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/reducers/index.ts +0 -42
  49. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +0 -54
  50. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/.gitkeep +0 -0
  51. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +0 -1
  52. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +0 -1
  53. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +0 -8
  54. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/index.ts +0 -7
  55. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/modules.ts +0 -12
  56. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/environments/environment.prod.ts +0 -3
  57. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/environments/environment.ts +0 -15
  58. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/favicon.ico +0 -0
  59. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +0 -10
  60. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/main.ts +0 -12
  61. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/polyfills.ts +0 -86
  62. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/test.ts.TO_REPLACE +0 -20
  63. package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +0 -20
  64. package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.spec.json +0 -18
  65. package/scripts/csdr/cli/skeletons/package/frontend-remote/tslint-remote.json +0 -7
  66. package/scripts/csdr/cli/skeletons/package/frontend-remote/tslint.json +0 -17
  67. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui14/angular.json +0 -84
  68. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui14/dependencies-composite.json +0 -8
  69. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui14/src/app/eui-components.ts +0 -9
@@ -61,36 +61,11 @@ module.exports.getCsdrConfig = (full = true) => {
61
61
  }
62
62
 
63
63
 
64
- // const migrateConfig = (euircBaseFile) => {
65
- // tools.logInfo('Upgrading local euirc config to new version');
66
-
67
- // const actualConfig = require(euircBaseFile);
68
- // const updatedConfig = {};
69
-
70
- // updatedConfig.projects = Object.keys(actualConfig.projects);
71
- // updatedConfig.packages = Object.keys(actualConfig.packages)
72
- // .map(p => actualConfig.packages[p])
73
- // .filter((p) => {
74
- // return !p.child;
75
- // })
76
- // .map(p => p.name);
77
-
78
- // tools.writeJsonFileSync(path.join(process.cwd(), '.csdr', '.euirc.json'), updatedConfig);
79
-
80
- // return updatedConfig;
81
- // }
82
-
83
-
84
64
  const getGeneratedConfig = (euircBaseFile) => {
85
65
  // fetching local euirc.json config
86
66
  delete require.cache[euircBaseFile];
87
67
  let configContent = require(euircBaseFile);
88
68
 
89
- // check if actual generated config file contains new version format
90
- // if (!Array.isArray(configContent.projects)) {
91
- // configContent = migrateConfig(euircBaseFile);
92
- // }
93
-
94
69
  // fetching global csdr config
95
70
  const globalConfig = this.getCsdrConfig();
96
71
 
@@ -387,148 +362,3 @@ module.exports.getNotificationMailAddress = (channelName) => {
387
362
  return channelPrefix + config.notification.mail.addressSuffix;
388
363
  }
389
364
 
390
- // Register only applies to non-csdr environment - for eUI default multi-modules app
391
-
392
- module.exports.registerEuiModule = (pkg) => {
393
- if (!tools.isDirExists(path.join(process.cwd(), '.csdr'))) {
394
- const file = path.join(process.cwd(), '.euirc.json');
395
- const content = require(file);
396
- content['packages'][pkg.name] = pkg;
397
- tools.writeJsonFileSync(file, content);
398
- }
399
- }
400
-
401
-
402
-
403
-
404
- // Register new project created
405
-
406
- module.exports.registerCsdrProject = (name, isFullSkeleton) => {
407
-
408
- const csdrConfigProject = {
409
- "name": "@app.name@",
410
- "folder": "apps/@app.name@",
411
- "repository": "app-@app.name@.git",
412
- "build": {
413
- "skipLint": true,
414
- "skipTest": true,
415
- "maxSpaceSize": true
416
- },
417
- "packages": [
418
- ],
419
- "csdrSkeleton": true
420
- };
421
-
422
- const csdrConfigProjectFullSkeleton = {
423
- "name": "@app.name@",
424
- "folder": "apps/@app.name@",
425
- "repository": "app-@app.name@.git",
426
- "build": {
427
- "skipLint": true,
428
- "skipTest": true,
429
- "maxSpaceSize": true
430
- },
431
- "packages": [
432
- ],
433
- "csdrFullSkeleton": true
434
- };
435
-
436
-
437
- // inserting new project into root config
438
- let projectDef;
439
- if (isFullSkeleton) {
440
- projectDef = JSON.stringify(csdrConfigProjectFullSkeleton);
441
- } else {
442
- projectDef = JSON.stringify(csdrConfigProject);
443
- }
444
- const replaceModule = tools.replaceAll(projectDef, '@app.name@', name);
445
-
446
- let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-apps.json');
447
- let jsonFile = require(file);
448
- jsonFile[name] = JSON.parse(replaceModule);
449
- tools.writeJsonFileSync(file, jsonFile);
450
-
451
- // inserting project entry into local config
452
- this.updateConfig(name, null);
453
- }
454
-
455
-
456
-
457
-
458
- // Register newly created package
459
-
460
- module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName) => {
461
-
462
- const csdrConfigPackage = {
463
- "name": "@module.full.name@",
464
- "npmPkg": "@module.npmPkg.name@",
465
- "deps": [
466
- ],
467
- "repository": "@module.repo.name@",
468
- "teams": [
469
- "all-frontend"
470
- ]
471
- };
472
-
473
- const csdrConfigRemotePackage = {
474
- "name": "@module.full.name@",
475
- "npmPkg": "@module.npmPkg.name@",
476
- "deps": [
477
- ],
478
- "repository": "@module.repo.name@",
479
- "element": true,
480
- "remote": true,
481
- "hostAppName": "my-workplace",
482
- "teams": [
483
- "all-frontend"
484
- ],
485
- "build": {
486
- "compiledTranslations": true,
487
- "translationScopes": "eui,csdr,cc,mywp",
488
- "skipLint": true,
489
- "skipTest": true,
490
- "sonarScanner": false,
491
- "envTargetActive": true
492
- },
493
- "release": {
494
- "team": "cc-ui-rm"
495
- },
496
- "slack": {
497
- "channel": "csdr-timeline-mwp-remotes-cc"
498
- },
499
- "externalSources": {
500
- "npmPkg": "@module.rootPkg.scope@/@module.rootPkg.name@",
501
- "folder": "assets/remote-sources"
502
- }
503
- }
504
-
505
- // inserting package in root config
506
- let packageDef;
507
-
508
- if (isRemote) {
509
- packageDef = JSON.stringify(csdrConfigRemotePackage);
510
-
511
- } else {
512
- packageDef = JSON.stringify(csdrConfigPackage);
513
- }
514
-
515
- let replaceModule = tools.replaceAll(packageDef, '@module.full.name@', pkg.name);
516
- replaceModule = tools.replaceAll(replaceModule, '@module.repo.name@', pkg.repoName);
517
- replaceModule = tools.replaceAll(replaceModule, '@module.npmPkg.name@', pkg.npmPkgName);
518
- replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.scope@', rootPkgScope);
519
- replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.name@', rootPkgName);
520
-
521
- let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json');
522
- let jsonFile = require(file);
523
- jsonFile[pkg.name] = JSON.parse(replaceModule);
524
-
525
- tools.writeJsonFileSync(file, jsonFile);
526
-
527
- // inserting project entry into local config
528
- const packages = [];
529
- packages.push(pkg.name);
530
- this.updateConfig(null, packages);
531
- }
532
-
533
-
534
-
@@ -32,7 +32,7 @@ module.exports.getCsdrPackagesFull = (flattenChildren = true) => {
32
32
  try {
33
33
  outputPackages.push(this.getPackage(p, true));
34
34
  } catch (e) {
35
- tools.logWarning(`Package: ${p} is in local config but not found in global... should be cleaned up`);
35
+ tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
36
36
  console.log(e);
37
37
  }
38
38
  })
@@ -48,7 +48,7 @@ const getPackages = module.exports.getPackages = () => {
48
48
  try {
49
49
  outputPackages.push(this.getPackage(p));
50
50
  } catch (e) {
51
- tools.logWarning(`Package: ${p} is in local config but not found in global... should be cleaned up`);
51
+ tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
52
52
  console.log(e);
53
53
  }
54
54
  })
@@ -111,7 +111,7 @@ module.exports.getPackage = (pkgName, fromCsdrConfig, optional) => {
111
111
 
112
112
 
113
113
  if (!pkg && !optional) {
114
- tools.logError(`Package ${pkgName} cannot be found in your local installation, mount it with:`);
114
+ tools.logInfo(`Package ${pkgName} cannot be found in your local installation, mount it with:`);
115
115
  tools.logInfo(`npm run init -- --pkg ${pkgName} --pkgOnly`);
116
116
  throw 'PACKAGE_NOT_FOUND';
117
117
  }
@@ -0,0 +1,166 @@
1
+ 'use strict';
2
+
3
+ // GLOBAL
4
+ const path = require('path');
5
+
6
+ // LOCAL
7
+ const tools = require('../../utils/tools');
8
+
9
+ // INNER MODULES
10
+ const innerGlobal = require('./global');
11
+
12
+
13
+ // Register new project created
14
+
15
+ module.exports.registerCsdrProject = (name, isFullSkeleton) => {
16
+
17
+ const csdrConfigProject = {
18
+ "name": "@app.name@",
19
+ "folder": "apps/@app.name@",
20
+ "repository": "app-@app.name@.git",
21
+ "build": {
22
+ "skipLint": true,
23
+ "skipTest": true,
24
+ "maxSpaceSize": true
25
+ },
26
+ "packages": [
27
+ ],
28
+ "csdrSkeleton": true
29
+ };
30
+
31
+ const csdrConfigProjectFullSkeleton = {
32
+ "name": "@app.name@",
33
+ "folder": "apps/@app.name@",
34
+ "repository": "app-@app.name@.git",
35
+ "build": {
36
+ "skipLint": true,
37
+ "skipTest": true,
38
+ "maxSpaceSize": true
39
+ },
40
+ "packages": [
41
+ ],
42
+ "csdrFullSkeleton": true
43
+ };
44
+
45
+
46
+ // inserting new project into root config
47
+ let projectDef;
48
+ if (isFullSkeleton) {
49
+ projectDef = JSON.stringify(csdrConfigProjectFullSkeleton);
50
+ } else {
51
+ projectDef = JSON.stringify(csdrConfigProject);
52
+ }
53
+ const replaceModule = tools.replaceAll(projectDef, '@app.name@', name);
54
+
55
+ let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-apps.json');
56
+ let jsonFile = require(file);
57
+ jsonFile[name] = JSON.parse(replaceModule);
58
+ tools.writeJsonFileSync(file, jsonFile);
59
+
60
+ // inserting project entry into local config
61
+ innerGlobal.updateConfig(name, null);
62
+ }
63
+
64
+
65
+
66
+
67
+ // Register newly created package
68
+
69
+ module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName, euiVersionNumber) => {
70
+
71
+ const csdrConfigPackage = {
72
+ "name": "@module.full.name@",
73
+ "npmPkg": "@module.npmPkg.name@",
74
+ "deps": [
75
+ ],
76
+ "repository": "@module.repo.name@",
77
+ "teams": [
78
+ "all-frontend"
79
+ ]
80
+ };
81
+
82
+ const csdrConfigRemotePackage = {
83
+ "name": "@module.full.name@",
84
+ "npmPkg": "@module.npmPkg.name@",
85
+ "deps": [
86
+ ],
87
+ "repository": "@module.repo.name@",
88
+ "element": true,
89
+ "remote": true,
90
+ "hostAppName": "my-workplace",
91
+ "teams": [
92
+ "all-frontend"
93
+ ],
94
+ "build": {
95
+ "compiledTranslations": true,
96
+ "translationScopes": "eui,csdr,cc,mywp",
97
+ "skipLint": true,
98
+ "skipTest": true,
99
+ "sonarScanner": false,
100
+ "envTargetActive": true
101
+ },
102
+ "release": {
103
+ "team": "cc-ui-rm"
104
+ },
105
+ "slack": {
106
+ "channel": "csdr-timeline-mwp-remotes-cc"
107
+ },
108
+ "externalSources": {
109
+ "npmPkg": "@module.rootPkg.scope@/@module.rootPkg.name@",
110
+ "folder": "assets/remote-sources"
111
+ }
112
+ }
113
+
114
+ const csdrConfigRemotePackageV15 = {
115
+ "npmPkg": "@module.npmPkg.name@",
116
+ "euiVersion": "15.x",
117
+ "build": {
118
+ "compiledTranslations": true,
119
+ "translationScopes": "eui,csdr,cc,mywp"
120
+ },
121
+ "release": {
122
+ "team": "cc-ui-rm"
123
+ },
124
+ "slack": {
125
+ "channel": "csdr-timeline-mwp-remotes-cc"
126
+ },
127
+ "externalSources": {
128
+ "npmPkg": "@module.rootPkg.scope@/@module.rootPkg.name@",
129
+ "folder": "assets/remote-sources"
130
+ }
131
+ }
132
+
133
+
134
+ // inserting package in root config
135
+ let packageDef;
136
+
137
+ if (isRemote) {
138
+ if (euiVersionNumber >= 15) {
139
+ packageDef = JSON.stringify(csdrConfigRemotePackageV15);
140
+ } else {
141
+ packageDef = JSON.stringify(csdrConfigRemotePackage);
142
+ }
143
+ } else {
144
+ packageDef = JSON.stringify(csdrConfigPackage);
145
+ }
146
+
147
+ let replaceModule = tools.replaceAll(packageDef, '@module.full.name@', pkg.name);
148
+ replaceModule = tools.replaceAll(replaceModule, '@module.repo.name@', pkg.repoName);
149
+ replaceModule = tools.replaceAll(replaceModule, '@module.npmPkg.name@', pkg.npmPkgName);
150
+ replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.scope@', rootPkgScope);
151
+ replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.name@', rootPkgName);
152
+
153
+ let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json');
154
+ if (isRemote && euiVersionNumber >= 15) {
155
+ file = path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json');
156
+ }
157
+ let jsonFile = require(file);
158
+ jsonFile[pkg.name] = JSON.parse(replaceModule);
159
+
160
+ tools.writeJsonFileSync(file, jsonFile);
161
+
162
+ // inserting project entry into local config
163
+ const packages = [];
164
+ packages.push(pkg.name);
165
+ innerGlobal.updateConfig(null, packages);
166
+ }
@@ -36,14 +36,16 @@ const cloneRemotesConfig = module.exports.cloneRemotesConfig = () => {
36
36
 
37
37
 
38
38
 
39
- module.exports.generateVirtualRemote = (remoteName) => {
39
+ module.exports.generateVirtualRemote = (remoteName, cloneRemotesConfig = true) => {
40
40
  tools.logTitle('Generating virtual remote');
41
41
 
42
42
  return Promise.resolve()
43
43
 
44
44
  // clone remotes config if first init
45
45
  .then(() => {
46
- return cloneRemotesConfig();
46
+ if (cloneRemotesConfig) {
47
+ return cloneRemotesConfig();
48
+ }
47
49
  })
48
50
 
49
51
  .then(() => {
package/scripts/index.js CHANGED
@@ -81,6 +81,10 @@ module.exports.auditUtils = require('./csdr/audit/audit-utils');
81
81
  module.exports.cliUtils = require('./csdr/cli/cli-utils');
82
82
  module.exports.cliApp = require('./csdr/cli/app');
83
83
  module.exports.cliPackage = require('./csdr/cli/package');
84
+ module.exports.cliPackageBackend = require('./csdr/cli/package-build-backend');
85
+ module.exports.cliPackageFrontend = require('./csdr/cli/package-build-frontend');
86
+ module.exports.cliPackagePrompt = require('./csdr/cli/package-prompt');
87
+ module.exports.cliPackageConstants = require('./csdr/cli/constants');
84
88
 
85
89
  // csdr - config
86
90
  module.exports.configAngular = require('./csdr/config/angular');
@@ -89,6 +93,7 @@ module.exports.configGlobal = require('./csdr/config/global');
89
93
  module.exports.configInit = require('./csdr/config/init');
90
94
  module.exports.configPackages = require('./csdr/config/packages');
91
95
  module.exports.configProjects = require('./csdr/config/projects');
96
+ module.exports.configRegister = require('./csdr/config/register');
92
97
  module.exports.configSync = require('./csdr/config/sync');
93
98
 
94
99
  // csdr -init
@@ -1,3 +0,0 @@
1
- {
2
- "@module.name@.KEY": "english text"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "@module.name@.KEY": "texte en français"
3
- }
@@ -1,46 +0,0 @@
1
- # See http://help.github.com/ignore-files/ for more about ignoring files.
2
-
3
- # compiled output
4
- **/node_modules
5
- **/target
6
- **/build
7
- **/dist
8
- **/out-tsc
9
- **/tmp
10
- **/test/reports
11
-
12
- # IDEs and editors
13
- /.idea
14
- .project
15
- .classpath
16
- .c9/
17
- *.launch
18
- .settings/
19
- *.sublime-workspace
20
-
21
- # IDE - VSCode
22
- .vscode/*
23
- !.vscode/settings.json
24
- !.vscode/tasks.json
25
- !.vscode/launch.json
26
- !.vscode/extensions.json
27
-
28
- # misc
29
- /.sass-cache
30
- /connect.lock
31
- /coverage
32
- /libpeerconnection.log
33
- npm-debug.log
34
- testem.log
35
- /typings
36
- yarn-error.log
37
-
38
- # e2e
39
- /e2e/*.js
40
- /e2e/*.map
41
- **/src/**/*.js
42
- **/src/**/*.map
43
-
44
- # System Files
45
- .DS_Store
46
- Thumbs.db
@@ -1,7 +0,0 @@
1
- const karmaConfig = require('@eui/tools/karma/karma.conf.pkg');
2
-
3
- module.exports = function (config) {
4
- config.set(
5
- karmaConfig.get(config, '@module.full.name@', {})
6
- );
7
- };
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "./dist",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- {
2
- "name": "@module.scope@/@module.name@",
3
- "version": "1.0.0"
4
- }
@@ -1,7 +0,0 @@
1
- /*
2
- * Public API Surface of module
3
- */
4
-
5
- export * from './lib/core/module.service';
6
- export * from './lib/components/cmp1/cmp1.component';
7
- export * from './lib/module.module';
@@ -1 +0,0 @@
1
- Hello from <strong>@module.name@-cmp1</strong>
@@ -1,25 +0,0 @@
1
- import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { Cmp1Component } from './cmp1.component';
4
-
5
- describe('ModuleComponent', () => {
6
- let component: Cmp1Component;
7
- let fixture: ComponentFixture<Cmp1Component>;
8
-
9
- beforeEach(async(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [Cmp1Component],
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(Cmp1Component);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,14 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: '@module.scope.string@-cmp1-component',
5
- templateUrl: './cmp1.component.html',
6
- })
7
- export class Cmp1Component implements OnInit {
8
-
9
- constructor() { }
10
-
11
- ngOnInit() {
12
- }
13
-
14
- }
@@ -1,12 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { ModuleService } from './module.service';
4
-
5
- describe('ModuleService', () => {
6
- beforeEach(() => TestBed.configureTestingModule({}));
7
-
8
- it('should be created', () => {
9
- const service: ModuleService = TestBed.get(ModuleService);
10
- expect(service).toBeTruthy();
11
- });
12
- });
@@ -1,8 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
-
3
- @Injectable({
4
- providedIn: 'root',
5
- })
6
- export class ModuleService {
7
- constructor() { }
8
- }
@@ -1,14 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { Cmp1Component } from './components/cmp1/cmp1.component';
3
-
4
- @NgModule({
5
- declarations: [
6
- Cmp1Component,
7
- ],
8
- imports: [
9
- ],
10
- exports: [
11
- Cmp1Component,
12
- ],
13
- })
14
- export class ModuleModule { }
@@ -1,22 +0,0 @@
1
- // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
-
3
- import 'core-js/es7/reflect';
4
- import 'zone.js/dist/zone';
5
- import 'zone.js/dist/zone-testing';
6
- import { getTestBed } from '@angular/core/testing';
7
- import {
8
- BrowserDynamicTestingModule,
9
- platformBrowserDynamicTesting
10
- } from '@angular/platform-browser-dynamic/testing';
11
-
12
- declare const require: any;
13
-
14
- // First, initialize the Angular testing environment.
15
- getTestBed().initTestEnvironment(
16
- BrowserDynamicTestingModule,
17
- platformBrowserDynamicTesting()
18
- );
19
- // Then we find all the tests.
20
- const context = require.context('./', true, /\.spec\.ts$/);
21
- // And load the modules.
22
- context.keys().map(context);
@@ -1,32 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.build.json",
3
- "compilerOptions": {
4
- "outDir": "./out-tsc/lib",
5
- "target": "es2015",
6
- "module": "es2015",
7
- "moduleResolution": "node",
8
- "declaration": true,
9
- "sourceMap": true,
10
- "inlineSources": true,
11
- "emitDecoratorMetadata": true,
12
- "experimentalDecorators": true,
13
- "importHelpers": true,
14
- "types": [],
15
- "lib": [
16
- "dom",
17
- "es2018"
18
- ]
19
- },
20
- "angularCompilerOptions": {
21
- "annotateForClosureCompiler": true,
22
- "skipTemplateCodegen": true,
23
- "strictMetadataEmit": true,
24
- "fullTemplateTypeCheck": true,
25
- "strictInjectionParameters": true,
26
- "enableResourceInlining": true
27
- },
28
- "exclude": [
29
- "src/test.ts",
30
- "**/*.spec.ts"
31
- ]
32
- }
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.build.json",
3
- "compilerOptions": {
4
- "outDir": "./out-tsc/spec",
5
- "types": [
6
- "jasmine",
7
- "node"
8
- ]
9
- },
10
- "files": [
11
- "src/test.ts"
12
- ],
13
- "include": [
14
- "**/*.spec.ts",
15
- "**/*.d.ts"
16
- ]
17
- }
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "../../tslint.json",
3
- "rules": {
4
- "directive-selector": [
5
- true,
6
- "attribute",
7
- "@module.scope.string@",
8
- "camelCase"
9
- ],
10
- "component-selector": [
11
- true,
12
- "element",
13
- "@module.scope.string@",
14
- "kebab-case"
15
- ]
16
- }
17
- }