@smapiot/pilet-template-angular 0.15.0-beta.4609 → 0.15.0-beta.4612
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.
package/lib/index.js
CHANGED
|
@@ -1069,10 +1069,12 @@ var require_utils2 = __commonJS({
|
|
|
1069
1069
|
const absPath = path_1.posix.join(targetDir, fileName);
|
|
1070
1070
|
const path = (0, path_1.isAbsolute)(absPath) ? (0, path_1.relative)(root2, absPath) : absPath;
|
|
1071
1071
|
(0, log_1.log)("verbose", `Adding "source" to package.json: "${path}"`);
|
|
1072
|
-
return
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1072
|
+
return {
|
|
1073
|
+
languages: ["ts", "js"],
|
|
1074
|
+
name: "package.json",
|
|
1075
|
+
content: JSON.stringify({ source: path }),
|
|
1076
|
+
target: "<root>/package.json"
|
|
1077
|
+
};
|
|
1076
1078
|
}
|
|
1077
1079
|
exports.getPackageJsonWithSource = getPackageJsonWithSource;
|
|
1078
1080
|
function getPiralInstance2(root2, sourceName) {
|
|
@@ -1195,10 +1197,8 @@ var require_factory = __commonJS({
|
|
|
1195
1197
|
src,
|
|
1196
1198
|
mocks
|
|
1197
1199
|
});
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
(0, utils_1.getPackageJsonWithSource)(data.projectRoot, data.src, `index${data.extension}`)
|
|
1201
|
-
]);
|
|
1200
|
+
const defaultSource = (0, utils_1.getPackageJsonWithSource)(data.projectRoot, data.src, `index${data.extension}`);
|
|
1201
|
+
const files = yield Promise.all([...sources, defaultSource].map((source) => (0, template_1.getFileFromTemplate)(sourceDir, source, data)));
|
|
1202
1202
|
return (0, merge_1.mergeFiles)(files);
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
@@ -1302,7 +1302,6 @@ function getStandalonePackageJson(cliVersion, ngVersion) {
|
|
|
1302
1302
|
importmap: {
|
|
1303
1303
|
imports: {
|
|
1304
1304
|
"@angular/animations": ".",
|
|
1305
|
-
"@angular/cli": ".",
|
|
1306
1305
|
"@angular/common": ".",
|
|
1307
1306
|
"@angular/compiler": ".",
|
|
1308
1307
|
"@angular/core": ".",
|
|
@@ -1314,7 +1313,6 @@ function getStandalonePackageJson(cliVersion, ngVersion) {
|
|
|
1314
1313
|
},
|
|
1315
1314
|
dependencies: {
|
|
1316
1315
|
"@angular/animations": ngVersion,
|
|
1317
|
-
"@angular/cli": ngVersion,
|
|
1318
1316
|
"@angular/common": ngVersion,
|
|
1319
1317
|
"@angular/compiler": ngVersion,
|
|
1320
1318
|
"@angular/core": ngVersion,
|
|
@@ -1328,6 +1326,7 @@ function getStandalonePackageJson(cliVersion, ngVersion) {
|
|
|
1328
1326
|
},
|
|
1329
1327
|
devDependencies: {
|
|
1330
1328
|
"@angular/compiler-cli": ngVersion,
|
|
1329
|
+
"@angular/cli": ngVersion,
|
|
1331
1330
|
"@ngtools/webpack": ngVersion,
|
|
1332
1331
|
"copy-webpack-plugin": "^10",
|
|
1333
1332
|
"html-loader": "^3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smapiot/pilet-template-angular",
|
|
3
|
-
"version": "0.15.0-beta.
|
|
3
|
+
"version": "0.15.0-beta.4612",
|
|
4
4
|
"description": "Official scaffolding template for pilets: 'angular'.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral-cli",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@smapiot/template-utils": "0.15.0-beta.
|
|
57
|
+
"@smapiot/template-utils": "0.15.0-beta.4612"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "db607eec793052dc290cad47c373b08848ad8703"
|
|
60
60
|
}
|
package/src/helpers.ts
CHANGED
|
@@ -28,7 +28,6 @@ export function getStandalonePackageJson(cliVersion: string, ngVersion: string)
|
|
|
28
28
|
importmap: {
|
|
29
29
|
imports: {
|
|
30
30
|
'@angular/animations': '.',
|
|
31
|
-
'@angular/cli': '.',
|
|
32
31
|
'@angular/common': '.',
|
|
33
32
|
'@angular/compiler': '.',
|
|
34
33
|
'@angular/core': '.',
|
|
@@ -40,7 +39,6 @@ export function getStandalonePackageJson(cliVersion: string, ngVersion: string)
|
|
|
40
39
|
},
|
|
41
40
|
dependencies: {
|
|
42
41
|
'@angular/animations': ngVersion,
|
|
43
|
-
'@angular/cli': ngVersion,
|
|
44
42
|
'@angular/common': ngVersion,
|
|
45
43
|
'@angular/compiler': ngVersion,
|
|
46
44
|
'@angular/core': ngVersion,
|
|
@@ -54,6 +52,7 @@ export function getStandalonePackageJson(cliVersion: string, ngVersion: string)
|
|
|
54
52
|
},
|
|
55
53
|
devDependencies: {
|
|
56
54
|
'@angular/compiler-cli': ngVersion,
|
|
55
|
+
'@angular/cli': ngVersion,
|
|
57
56
|
'@ngtools/webpack': ngVersion,
|
|
58
57
|
'copy-webpack-plugin': '^10',
|
|
59
58
|
'html-loader': '^3',
|
|
@@ -5,9 +5,9 @@ import { SharedModule } from 'piral-ng/common';
|
|
|
5
5
|
import { PageComponent } from './page.component';
|
|
6
6
|
|
|
7
7
|
@NgModule({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
bootstrap: [PageComponent],
|
|
9
|
+
declarations: [PageComponent],
|
|
10
|
+
exports: [PageComponent],
|
|
11
|
+
imports: [BrowserModule, SharedModule]
|
|
12
12
|
})
|
|
13
13
|
export class AppModule {}
|
package/templates/index.jsx.ejs
CHANGED
package/templates/index.tsx.ejs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
<% if (standalone) { -%>
|
|
2
|
+
import '@angular/compiler';
|
|
3
3
|
import { defineNgModule, fromNg } from 'piral-ng/convert';
|
|
4
4
|
<% } -%>
|
|
5
5
|
import { AppModule } from './app/app.module';
|
|
@@ -8,18 +8,18 @@ import type { PiletApi } from '<%- sourceName %>';
|
|
|
8
8
|
|
|
9
9
|
export function setup(app: PiletApi) {
|
|
10
10
|
<% if (standalone) { -%>
|
|
11
|
-
|
|
11
|
+
defineNgModule(AppModule, {
|
|
12
12
|
// remove the following if you actually want to enable zone.js
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
ngZone: 'noop',
|
|
14
|
+
});
|
|
15
15
|
|
|
16
|
-
app.registerPage('/sample',
|
|
16
|
+
app.registerPage('/sample', fromNg(PageComponent));
|
|
17
17
|
<% } else { -%>
|
|
18
|
-
|
|
18
|
+
app.defineNgModule(AppModule, {
|
|
19
19
|
// remove the following if you actually want to enable zone.js
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
ngZone: 'noop',
|
|
21
|
+
});
|
|
22
22
|
|
|
23
|
-
app.registerPage('/sample', fromNg(PageComponent));
|
|
23
|
+
app.registerPage('/sample', app.fromNg(PageComponent));
|
|
24
24
|
<% } -%>
|
|
25
25
|
}
|