@ng-atomic/executors 0.0.0-PLACEHOLDER
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/README.md +11 -0
- package/executors.json +52 -0
- package/package.json +15 -0
- package/src/deploy/impl.d.ts +5 -0
- package/src/deploy/impl.js +22 -0
- package/src/deploy/impl.js.map +1 -0
- package/src/deploy/schema.d.ts +14 -0
- package/src/deploy/schema.js +3 -0
- package/src/deploy/schema.js.map +1 -0
- package/src/deploy/schema.json +60 -0
- package/src/elements/browser/compat.d.ts +2 -0
- package/src/elements/browser/compat.js +5 -0
- package/src/elements/browser/compat.js.map +1 -0
- package/src/elements/browser/impl.d.ts +5 -0
- package/src/elements/browser/impl.js +12 -0
- package/src/elements/browser/impl.js.map +1 -0
- package/src/elements/browser/schema.json +501 -0
- package/src/elements/dev-server/impl.d.ts +7 -0
- package/src/elements/dev-server/impl.js +24 -0
- package/src/elements/dev-server/impl.js.map +1 -0
- package/src/elements/dev-server/schema.json +106 -0
- package/src/elements/utils.d.ts +8 -0
- package/src/elements/utils.js +15 -0
- package/src/elements/utils.js.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +7 -0
- package/src/index.js.map +1 -0
- package/src/package/compat.d.ts +2 -0
- package/src/package/compat.js +6 -0
- package/src/package/compat.js.map +1 -0
- package/src/package/impl.d.ts +16 -0
- package/src/package/impl.js +64 -0
- package/src/package/impl.js.map +1 -0
- package/src/package/schema.json +53 -0
package/README.md
ADDED
package/executors.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"executors": {
|
|
4
|
+
"deploy": {
|
|
5
|
+
"implementation": "./src/deploy/impl",
|
|
6
|
+
"schema": "./src/deploy/schema.json",
|
|
7
|
+
"description": "Deploy a project"
|
|
8
|
+
},
|
|
9
|
+
"elements": {
|
|
10
|
+
"implementation": "./src/elements/browser/impl",
|
|
11
|
+
"schema": "./src/elements/browser/schema.json",
|
|
12
|
+
"description": "Build a project using TypeScript."
|
|
13
|
+
},
|
|
14
|
+
"elements-dev-server": {
|
|
15
|
+
"implementation": "./src/elements/dev-server/impl",
|
|
16
|
+
"schema": "./src/elements/dev-server/schema.json",
|
|
17
|
+
"description": "Build a project using TypeScript."
|
|
18
|
+
},
|
|
19
|
+
"package": {
|
|
20
|
+
"implementation": "./src/package/package.impl",
|
|
21
|
+
"schema": "./src/package/schema.json",
|
|
22
|
+
"description": "Build a project using TypeScript."
|
|
23
|
+
},
|
|
24
|
+
"storybook": {
|
|
25
|
+
"implementation": "./src/storybook/storybook.impl",
|
|
26
|
+
"schema": "./src/storybook/schema.json",
|
|
27
|
+
"description": "Build a project using TypeScript."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"builders": {
|
|
31
|
+
"deploy": {
|
|
32
|
+
"implementation": "./src/deploy/impl",
|
|
33
|
+
"schema": "./src/deploy/schema.json",
|
|
34
|
+
"description": "Deploy a project"
|
|
35
|
+
},
|
|
36
|
+
"elements": {
|
|
37
|
+
"implementation": "./src/elements/browser/impl",
|
|
38
|
+
"schema": "./src/elements/browser/schema.json",
|
|
39
|
+
"description": "Build a project using TypeScript."
|
|
40
|
+
},
|
|
41
|
+
"elements-dev-server": {
|
|
42
|
+
"implementation": "./src/elements/dev-server/impl",
|
|
43
|
+
"schema": "./src/elements/dev-server/schema.json",
|
|
44
|
+
"description": "Build a project using TypeScript."
|
|
45
|
+
},
|
|
46
|
+
"storybook": {
|
|
47
|
+
"implementation": "./src/storybook/elements.impl",
|
|
48
|
+
"schema": "./src/storybook/schema.json",
|
|
49
|
+
"description": "Build a project using TypeScript."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ng-atomic/executors",
|
|
3
|
+
"version": "0.0.0-PLACEHOLDER",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"builders": "./executors.json",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"dependencies": {},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"rxjs": "7.5.0",
|
|
11
|
+
"@nrwl/angular": "14.8.6",
|
|
12
|
+
"rxjs-for-await": "^1.0.0",
|
|
13
|
+
"tslib": "^2.0.0"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
2
|
+
import { Schema } from './schema';
|
|
3
|
+
export declare function executeDeploy(options: Schema, context: BuilderContext): Promise<BuilderOutput>;
|
|
4
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeDeploy = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const architect_1 = require("@angular-devkit/architect");
|
|
6
|
+
const engine_1 = require("angular-cli-ghpages/engine/engine");
|
|
7
|
+
function executeDeploy(options, context) {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
try {
|
|
10
|
+
yield (0, engine_1.run)(options.outputPath, options, context.logger);
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
context.logger.error('❌ An error occurred when trying to deploy:');
|
|
14
|
+
context.logger.error(e.message);
|
|
15
|
+
return { success: false };
|
|
16
|
+
}
|
|
17
|
+
return { success: true };
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.executeDeploy = executeDeploy;
|
|
21
|
+
exports.default = (0, architect_1.createBuilder)(executeDeploy);
|
|
22
|
+
//# sourceMappingURL=impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../packages/@ng-atomic/executors/src/deploy/impl.ts"],"names":[],"mappings":";;;;AAAA,yDAAyF;AACzF,8DAAwD;AAGxD,SAAsB,aAAa,CAAC,OAAe,EAAE,OAAuB;;QAC1E,IAAI;YACF,MAAM,IAAA,YAAG,EAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;SACxD;QAAC,OAAO,CAAM,EAAE;YACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;YACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;SAC3B;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CAAA;AAVD,sCAUC;AAED,kBAAe,IAAA,yBAAa,EAAM,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Schema {
|
|
2
|
+
baseHref?: string;
|
|
3
|
+
outputPath: string;
|
|
4
|
+
noBuild: boolean;
|
|
5
|
+
repo?: string;
|
|
6
|
+
message: string;
|
|
7
|
+
branch: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
noSilent: boolean;
|
|
11
|
+
noDotfiles: boolean;
|
|
12
|
+
cname?: string;
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../../packages/@ng-atomic/executors/src/deploy/schema.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "Schema",
|
|
3
|
+
"title": "schema",
|
|
4
|
+
"description": "Deployment of Angular CLI applications to GitHub pages (angular-cli-ghpages)",
|
|
5
|
+
"properties": {
|
|
6
|
+
"baseHref": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Base url for the application being built. Same as `ng build --base-href=/XXX/`."
|
|
9
|
+
},
|
|
10
|
+
"outputPath": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"noBuild": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": false,
|
|
16
|
+
"description": "Skip build process during deployment."
|
|
17
|
+
},
|
|
18
|
+
"repo": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Provide the repository URL. If no value is provided, the `origin` remote of the current working directory is used."
|
|
21
|
+
},
|
|
22
|
+
"message": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The commit message.",
|
|
25
|
+
"default": "Auto-generated commit [ci skip]"
|
|
26
|
+
},
|
|
27
|
+
"branch": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The git branch to push your pages to.",
|
|
30
|
+
"default": "gh-pages"
|
|
31
|
+
},
|
|
32
|
+
"name": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The git user-name which is associated with this commit."
|
|
35
|
+
},
|
|
36
|
+
"email": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The git user-email which is associated with this commit."
|
|
39
|
+
},
|
|
40
|
+
"noSilent": {
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"description": "Logging is in silent mode by default. Execute with --no-silent to enable extended console logging. Keep this untouched if the repository URL or other information passed to git commands is sensitive!",
|
|
43
|
+
"default": false
|
|
44
|
+
},
|
|
45
|
+
"noDotfiles": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"description": "Includes dotfiles by default. Execute with --no-dotfiles to ignore files starting with `.`.",
|
|
48
|
+
"default": false
|
|
49
|
+
},
|
|
50
|
+
"cname": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Generate a CNAME file for the specified domain."
|
|
53
|
+
},
|
|
54
|
+
"dryRun": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "For testing: Run through without making any changes. Execute with --dry-run and nothing will happen.",
|
|
57
|
+
"default": false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../../packages/@ng-atomic/executors/src/elements/browser/compat.ts"],"names":[],"mappings":";;AAEA,iCAA+C;AAE/C,kBAAe,4BAAqB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BuilderOutput } from "@angular-devkit/architect";
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare function executeBrowserBuilder(options: any, context: any): Observable<BuilderOutput>;
|
|
4
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeBrowserBuilder = void 0;
|
|
4
|
+
const build_angular_1 = require("@angular-devkit/build-angular");
|
|
5
|
+
const architect_1 = require("@angular-devkit/architect");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
function executeBrowserBuilder(options, context) {
|
|
8
|
+
return (0, build_angular_1.executeBrowserBuilder)(options, context, (0, utils_1.transformsFactory)(options));
|
|
9
|
+
}
|
|
10
|
+
exports.executeBrowserBuilder = executeBrowserBuilder;
|
|
11
|
+
exports.default = (0, architect_1.createBuilder)(executeBrowserBuilder);
|
|
12
|
+
//# sourceMappingURL=impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../../packages/@ng-atomic/executors/src/elements/browser/impl.ts"],"names":[],"mappings":";;;AAAA,iEAAgG;AAChG,yDAAyE;AAEzE,oCAA6C;AAE7C,SAAgB,qBAAqB,CAAC,OAAY,EAAE,OAAY;IAC9D,OAAO,IAAA,qCAAsB,EAAC,OAAO,EAAE,OAAO,EAAE,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC,CAAC;AAC9E,CAAC;AAFD,sDAEC;AAED,kBAAe,IAAA,yBAAa,EAAM,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Webpack browser schema for Build Facade.",
|
|
4
|
+
"description": "Browser target options",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"assets": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"description": "List of static application assets.",
|
|
10
|
+
"default": [],
|
|
11
|
+
"items": {
|
|
12
|
+
"$ref": "#/definitions/assetPattern"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"main": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The full path for the main entry point to the app, relative to the current workspace."
|
|
18
|
+
},
|
|
19
|
+
"polyfills": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The full path for the polyfills file, relative to the current workspace."
|
|
22
|
+
},
|
|
23
|
+
"tsConfig": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"description": "Global scripts to be included in the build.",
|
|
29
|
+
"type": "array",
|
|
30
|
+
"default": [],
|
|
31
|
+
"items": {
|
|
32
|
+
"oneOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"input": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The file to include.",
|
|
39
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
40
|
+
},
|
|
41
|
+
"bundleName": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[\\w\\-.]*$",
|
|
44
|
+
"description": "The bundle name for this extra entry point."
|
|
45
|
+
},
|
|
46
|
+
"inject": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
49
|
+
"default": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["input"]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The file to include.",
|
|
58
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"styles": {
|
|
64
|
+
"description": "Global styles to be included in the build.",
|
|
65
|
+
"type": "array",
|
|
66
|
+
"default": [],
|
|
67
|
+
"items": {
|
|
68
|
+
"oneOf": [
|
|
69
|
+
{
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"input": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "The file to include.",
|
|
75
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
76
|
+
},
|
|
77
|
+
"bundleName": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^[\\w\\-.]*$",
|
|
80
|
+
"description": "The bundle name for this extra entry point."
|
|
81
|
+
},
|
|
82
|
+
"inject": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
85
|
+
"default": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["input"]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "The file to include.",
|
|
94
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"inlineStyleLanguage": {
|
|
100
|
+
"description": "The stylesheet language to use for the application's inline component styles.",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"default": "css",
|
|
103
|
+
"enum": ["css", "less", "sass", "scss"]
|
|
104
|
+
},
|
|
105
|
+
"stylePreprocessorOptions": {
|
|
106
|
+
"description": "Options to pass to style preprocessors.",
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"includePaths": {
|
|
110
|
+
"description": "Paths to include. Paths will be resolved to workspace root.",
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"default": []
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"optimization": {
|
|
121
|
+
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
|
|
122
|
+
"x-user-analytics": 16,
|
|
123
|
+
"default": true,
|
|
124
|
+
"oneOf": [
|
|
125
|
+
{
|
|
126
|
+
"type": "object",
|
|
127
|
+
"properties": {
|
|
128
|
+
"scripts": {
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"description": "Enables optimization of the scripts output.",
|
|
131
|
+
"default": true
|
|
132
|
+
},
|
|
133
|
+
"styles": {
|
|
134
|
+
"description": "Enables optimization of the styles output.",
|
|
135
|
+
"default": true,
|
|
136
|
+
"oneOf": [
|
|
137
|
+
{
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"minify": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
|
|
143
|
+
"default": true
|
|
144
|
+
},
|
|
145
|
+
"inlineCritical": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"description": "Extract and inline critical CSS definitions to improve first paint time.",
|
|
148
|
+
"default": true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"additionalProperties": false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "boolean"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"fonts": {
|
|
159
|
+
"description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
|
160
|
+
"default": true,
|
|
161
|
+
"oneOf": [
|
|
162
|
+
{
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"inline": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
|
168
|
+
"default": true
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "boolean"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"additionalProperties": false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"fileReplacements": {
|
|
187
|
+
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"$ref": "#/definitions/fileReplacement"
|
|
191
|
+
},
|
|
192
|
+
"default": []
|
|
193
|
+
},
|
|
194
|
+
"outputPath": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
|
|
197
|
+
},
|
|
198
|
+
"resourcesOutputPath": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "The path where style resources will be placed, relative to outputPath."
|
|
201
|
+
},
|
|
202
|
+
"aot": {
|
|
203
|
+
"type": "boolean",
|
|
204
|
+
"description": "Build using Ahead of Time compilation.",
|
|
205
|
+
"x-user-analytics": 13,
|
|
206
|
+
"default": true
|
|
207
|
+
},
|
|
208
|
+
"sourceMap": {
|
|
209
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
|
210
|
+
"default": false,
|
|
211
|
+
"oneOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"scripts": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"description": "Output source maps for all scripts.",
|
|
218
|
+
"default": true
|
|
219
|
+
},
|
|
220
|
+
"styles": {
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"description": "Output source maps for all styles.",
|
|
223
|
+
"default": true
|
|
224
|
+
},
|
|
225
|
+
"hidden": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"description": "Output source maps used for error reporting tools.",
|
|
228
|
+
"default": false
|
|
229
|
+
},
|
|
230
|
+
"vendor": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"description": "Resolve vendor packages source maps.",
|
|
233
|
+
"default": false
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"additionalProperties": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "boolean"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"vendorChunk": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"description": "Generate a seperate bundle containing only vendor libraries. This option should only used for development.",
|
|
246
|
+
"default": false
|
|
247
|
+
},
|
|
248
|
+
"commonChunk": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "Generate a seperate bundle containing code used across multiple bundles.",
|
|
251
|
+
"default": true
|
|
252
|
+
},
|
|
253
|
+
"baseHref": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "Base url for the application being built."
|
|
256
|
+
},
|
|
257
|
+
"deployUrl": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"description": "URL where files will be deployed.",
|
|
260
|
+
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
261
|
+
},
|
|
262
|
+
"verbose": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"description": "Adds more details to output logging.",
|
|
265
|
+
"default": false
|
|
266
|
+
},
|
|
267
|
+
"progress": {
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"description": "Log progress to the console while building.",
|
|
270
|
+
"default": true
|
|
271
|
+
},
|
|
272
|
+
"i18nMissingTranslation": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "How to handle missing translations for i18n.",
|
|
275
|
+
"enum": ["warning", "error", "ignore"],
|
|
276
|
+
"default": "warning"
|
|
277
|
+
},
|
|
278
|
+
"i18nDuplicateTranslation": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "How to handle duplicate translations for i18n.",
|
|
281
|
+
"enum": ["warning", "error", "ignore"],
|
|
282
|
+
"default": "warning"
|
|
283
|
+
},
|
|
284
|
+
"localize": {
|
|
285
|
+
"description": "Translate the bundles in one or more locales.",
|
|
286
|
+
"oneOf": [
|
|
287
|
+
{
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"description": "Translate all locales."
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"type": "array",
|
|
293
|
+
"description": "List of locales ID's to translate.",
|
|
294
|
+
"minItems": 1,
|
|
295
|
+
"items": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"watch": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"description": "Run build when files change.",
|
|
305
|
+
"default": false
|
|
306
|
+
},
|
|
307
|
+
"outputHashing": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "Define the output filename cache-busting hashing mode.",
|
|
310
|
+
"default": "none",
|
|
311
|
+
"enum": ["none", "all", "media", "bundles"]
|
|
312
|
+
},
|
|
313
|
+
"poll": {
|
|
314
|
+
"type": "number",
|
|
315
|
+
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
316
|
+
},
|
|
317
|
+
"deleteOutputPath": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"description": "Delete the output path before building.",
|
|
320
|
+
"default": true
|
|
321
|
+
},
|
|
322
|
+
"preserveSymlinks": {
|
|
323
|
+
"type": "boolean",
|
|
324
|
+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
|
325
|
+
},
|
|
326
|
+
"extractLicenses": {
|
|
327
|
+
"type": "boolean",
|
|
328
|
+
"description": "Extract all licenses in a separate file.",
|
|
329
|
+
"default": true
|
|
330
|
+
},
|
|
331
|
+
"buildOptimizer": {
|
|
332
|
+
"type": "boolean",
|
|
333
|
+
"description": "Enables advanced build optimizations when using the 'aot' option.",
|
|
334
|
+
"default": true
|
|
335
|
+
},
|
|
336
|
+
"namedChunks": {
|
|
337
|
+
"type": "boolean",
|
|
338
|
+
"description": "Use file name for lazy loaded chunks.",
|
|
339
|
+
"default": false
|
|
340
|
+
},
|
|
341
|
+
"subresourceIntegrity": {
|
|
342
|
+
"type": "boolean",
|
|
343
|
+
"description": "Enables the use of subresource integrity validation.",
|
|
344
|
+
"default": false
|
|
345
|
+
},
|
|
346
|
+
"serviceWorker": {
|
|
347
|
+
"type": "boolean",
|
|
348
|
+
"description": "Generates a service worker config for production builds.",
|
|
349
|
+
"default": false
|
|
350
|
+
},
|
|
351
|
+
"ngswConfigPath": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Path to ngsw-config.json."
|
|
354
|
+
},
|
|
355
|
+
"statsJson": {
|
|
356
|
+
"type": "boolean",
|
|
357
|
+
"description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
|
|
358
|
+
"default": false
|
|
359
|
+
},
|
|
360
|
+
"budgets": {
|
|
361
|
+
"description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
|
|
362
|
+
"type": "array",
|
|
363
|
+
"items": {
|
|
364
|
+
"$ref": "#/definitions/budget"
|
|
365
|
+
},
|
|
366
|
+
"default": []
|
|
367
|
+
},
|
|
368
|
+
"webWorkerTsConfig": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"description": "TypeScript configuration for Web Worker modules."
|
|
371
|
+
},
|
|
372
|
+
"allowedCommonJsDependencies": {
|
|
373
|
+
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"default": []
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"additionalProperties": false,
|
|
382
|
+
"required": ["outputPath", "main", "tsConfig"],
|
|
383
|
+
"definitions": {
|
|
384
|
+
"assetPattern": {
|
|
385
|
+
"oneOf": [
|
|
386
|
+
{
|
|
387
|
+
"type": "object",
|
|
388
|
+
"properties": {
|
|
389
|
+
"followSymlinks": {
|
|
390
|
+
"type": "boolean",
|
|
391
|
+
"default": false,
|
|
392
|
+
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
|
393
|
+
},
|
|
394
|
+
"glob": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"description": "The pattern to match."
|
|
397
|
+
},
|
|
398
|
+
"input": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
401
|
+
},
|
|
402
|
+
"ignore": {
|
|
403
|
+
"description": "An array of globs to ignore.",
|
|
404
|
+
"type": "array",
|
|
405
|
+
"items": {
|
|
406
|
+
"type": "string"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"output": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"description": "Absolute path within the output."
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"additionalProperties": false,
|
|
415
|
+
"required": ["glob", "input", "output"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"type": "string"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"fileReplacement": {
|
|
423
|
+
"oneOf": [
|
|
424
|
+
{
|
|
425
|
+
"type": "object",
|
|
426
|
+
"properties": {
|
|
427
|
+
"src": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
430
|
+
},
|
|
431
|
+
"replaceWith": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"additionalProperties": false,
|
|
437
|
+
"required": ["src", "replaceWith"]
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"type": "object",
|
|
441
|
+
"properties": {
|
|
442
|
+
"replace": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
445
|
+
},
|
|
446
|
+
"with": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"additionalProperties": false,
|
|
452
|
+
"required": ["replace", "with"]
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"budget": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"type": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"description": "The type of budget.",
|
|
462
|
+
"enum": ["all", "allScript", "any", "anyScript", "anyComponentStyle", "bundle", "initial"]
|
|
463
|
+
},
|
|
464
|
+
"name": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"description": "The name of the bundle."
|
|
467
|
+
},
|
|
468
|
+
"baseline": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"description": "The baseline size for comparison."
|
|
471
|
+
},
|
|
472
|
+
"maximumWarning": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"description": "The maximum threshold for warning relative to the baseline."
|
|
475
|
+
},
|
|
476
|
+
"maximumError": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"description": "The maximum threshold for error relative to the baseline."
|
|
479
|
+
},
|
|
480
|
+
"minimumWarning": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"description": "The minimum threshold for warning relative to the baseline."
|
|
483
|
+
},
|
|
484
|
+
"minimumError": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"description": "The minimum threshold for error relative to the baseline."
|
|
487
|
+
},
|
|
488
|
+
"warning": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"description": "The threshold for warning relative to the baseline (min & max)."
|
|
491
|
+
},
|
|
492
|
+
"error": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"description": "The threshold for error relative to the baseline (min & max)."
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"additionalProperties": false,
|
|
498
|
+
"required": ["type"]
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { executeDevServerBuilder } from "@angular-devkit/build-angular";
|
|
2
|
+
import { BuilderContext, BuilderOutput } from "@angular-devkit/architect";
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare function run(options: any, context: BuilderContext, executeBuilder: typeof executeDevServerBuilder): Observable<BuilderOutput>;
|
|
5
|
+
export declare function _executeDevServerBuilder(options: any, context: BuilderContext): Observable<BuilderOutput>;
|
|
6
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._executeDevServerBuilder = exports.run = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const build_angular_1 = require("@angular-devkit/build-angular");
|
|
6
|
+
const architect_1 = require("@angular-devkit/architect");
|
|
7
|
+
const rxjs_1 = require("rxjs");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const architect_2 = require("@angular-devkit/architect");
|
|
10
|
+
function run(options, context, executeBuilder) {
|
|
11
|
+
const browserTarget = (0, architect_2.targetFromTargetString)(options.browserTarget);
|
|
12
|
+
const setup = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
const rawBrowserOptions = (yield context.getTargetOptions(browserTarget));
|
|
14
|
+
console.debug('rawBrowserOptions:', rawBrowserOptions);
|
|
15
|
+
});
|
|
16
|
+
return (0, rxjs_1.from)(setup()).pipe((0, rxjs_1.switchMap)(() => executeBuilder(options, context, (0, utils_1.transformsFactory)(options)).pipe((0, rxjs_1.map)(output => output))));
|
|
17
|
+
}
|
|
18
|
+
exports.run = run;
|
|
19
|
+
function _executeDevServerBuilder(options, context) {
|
|
20
|
+
return run(options, context, build_angular_1.executeDevServerBuilder);
|
|
21
|
+
}
|
|
22
|
+
exports._executeDevServerBuilder = _executeDevServerBuilder;
|
|
23
|
+
exports.default = (0, architect_1.createBuilder)(_executeDevServerBuilder);
|
|
24
|
+
//# sourceMappingURL=impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../../packages/@ng-atomic/executors/src/elements/dev-server/impl.ts"],"names":[],"mappings":";;;;AAAA,iEAAwE;AACxE,yDAAyF;AACzF,+BAAwD;AACxD,oCAA6C;AAC7C,yDAAmE;AAEnE,SAAgB,GAAG,CACjB,OAAY,EACZ,OAAuB,EACvB,cAA8C;IAE9C,MAAM,aAAa,GAAG,IAAA,kCAAsB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEpE,MAAM,KAAK,GAAG,GAAS,EAAE;QACvB,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC1E,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;IACzD,CAAC,CAAA,CAAC;IAEF,OAAO,IAAA,WAAI,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CACvB,IAAA,gBAAS,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAG,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAChF,IAAA,UAAG,EAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CACtB,CAAC,CACH,CAAC;AACJ,CAAC;AAjBD,kBAiBC;AAED,SAAgB,wBAAwB,CACtC,OAAY,EACZ,OAAuB;IAEvB,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,uCAAuB,CAAC,CAAC;AACxD,CAAC;AALD,4DAKC;AAED,kBAAe,IAAA,yBAAa,EAAM,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Dev Server Target",
|
|
4
|
+
"description": "Dev Server target options for Build Facade.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"browserTarget": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
|
10
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
11
|
+
},
|
|
12
|
+
"port": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"description": "Port to listen on.",
|
|
15
|
+
"default": 4200
|
|
16
|
+
},
|
|
17
|
+
"host": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Host to listen on.",
|
|
20
|
+
"default": "localhost"
|
|
21
|
+
},
|
|
22
|
+
"proxyConfig": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server."
|
|
25
|
+
},
|
|
26
|
+
"ssl": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Serve using HTTPS.",
|
|
29
|
+
"default": false
|
|
30
|
+
},
|
|
31
|
+
"sslKey": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "SSL key to use for serving HTTPS."
|
|
34
|
+
},
|
|
35
|
+
"sslCert": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "SSL certificate to use for serving HTTPS."
|
|
38
|
+
},
|
|
39
|
+
"headers": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"description": "Custom HTTP headers to be added to all responses.",
|
|
42
|
+
"propertyNames": {
|
|
43
|
+
"pattern": "^[-_A-Za-z0-9]+$"
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"open": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"description": "Opens the url in default browser.",
|
|
52
|
+
"default": false,
|
|
53
|
+
"alias": "o"
|
|
54
|
+
},
|
|
55
|
+
"verbose": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"description": "Adds more details to output logging."
|
|
58
|
+
},
|
|
59
|
+
"liveReload": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Whether to reload the page on change, using live-reload.",
|
|
62
|
+
"default": true
|
|
63
|
+
},
|
|
64
|
+
"publicHost": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
|
|
67
|
+
},
|
|
68
|
+
"allowedHosts": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "List of hosts that are allowed to access the dev server.",
|
|
71
|
+
"default": [],
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"servePath": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "The pathname where the application will be served."
|
|
79
|
+
},
|
|
80
|
+
"disableHostCheck": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"description": "Don't verify connected clients are part of allowed hosts.",
|
|
83
|
+
"default": false
|
|
84
|
+
},
|
|
85
|
+
"hmr": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Enable hot module replacement.",
|
|
88
|
+
"default": false
|
|
89
|
+
},
|
|
90
|
+
"watch": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Rebuild on change.",
|
|
93
|
+
"default": true
|
|
94
|
+
},
|
|
95
|
+
"poll": {
|
|
96
|
+
"type": "number",
|
|
97
|
+
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
98
|
+
},
|
|
99
|
+
"publicPath": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": ""
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["browserTarget"]
|
|
106
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecutionTransformer } from "@angular-devkit/build-angular";
|
|
2
|
+
import { Configuration } from "webpack";
|
|
3
|
+
export interface Transforms {
|
|
4
|
+
webpackConfiguration: ExecutionTransformer<Configuration>;
|
|
5
|
+
}
|
|
6
|
+
export declare const transformsFactory: (options: any) => {
|
|
7
|
+
webpackConfiguration: (config: any) => any;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformsFactory = void 0;
|
|
4
|
+
const transformsFactory = (options) => ({
|
|
5
|
+
webpackConfiguration: (config) => {
|
|
6
|
+
var _a;
|
|
7
|
+
delete config.entry['polyfills'];
|
|
8
|
+
delete config.optimization.runtimeChunk;
|
|
9
|
+
delete config.optimization.splitChunks;
|
|
10
|
+
config.output.publicPath = (_a = options.publicPath) !== null && _a !== void 0 ? _a : `http://${options.host}:${options.port}/`;
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.transformsFactory = transformsFactory;
|
|
15
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../packages/@ng-atomic/executors/src/elements/utils.ts"],"names":[],"mappings":";;;AAOO,MAAM,iBAAiB,GAAG,CAAC,OAAY,EAAE,EAAE,CAAC,CAAC;IAClD,oBAAoB,EAAE,CAAC,MAAW,EAAE,EAAE;;QACpC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC;QACxC,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC;QACvC,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,UAAU,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC;QAC3F,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC;AARU,QAAA,iBAAiB,qBAQ3B"}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./deploy/impl"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./elements/dev-server/impl"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./package/impl"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@ng-atomic/executors/src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,qEAA2C;AAC3C,yDAA+B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const impl_1 = require("./impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(impl_1.packageExecutor);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/@ng-atomic/executors/src/package/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AACjD,iCAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,sBAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
+
import { DependentBuildableProjectNode } from '@nrwl/workspace/src/utilities/buildable-libs-utils';
|
|
3
|
+
import type { NgPackagr } from 'ng-packagr';
|
|
4
|
+
import type { BuildAngularLibraryExecutorOptions } from './schema';
|
|
5
|
+
/**
|
|
6
|
+
* Creates an executor function that executes the library build of an Angular
|
|
7
|
+
* package using ng-packagr.
|
|
8
|
+
* @param initializeNgPackagr function that returns an ngPackagr instance to use for the build.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createLibraryExecutor(initializeNgPackagr: (options: BuildAngularLibraryExecutorOptions, context: ExecutorContext, projectDependencies: DependentBuildableProjectNode[]) => Promise<NgPackagr>): (options: BuildAngularLibraryExecutorOptions, context: ExecutorContext) => AsyncGenerator<{
|
|
11
|
+
success: boolean;
|
|
12
|
+
}, any, undefined>;
|
|
13
|
+
export declare const packageExecutor: (options: BuildAngularLibraryExecutorOptions, context: ExecutorContext) => AsyncGenerator<{
|
|
14
|
+
success: boolean;
|
|
15
|
+
}, any, undefined>;
|
|
16
|
+
export default packageExecutor;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packageExecutor = exports.createLibraryExecutor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
7
|
+
const entry_point_di_1 = require("@nrwl/angular/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di");
|
|
8
|
+
const options_di_1 = require("@nrwl/angular/src/executors/package/ng-packagr-adjustments/ng-package/options.di");
|
|
9
|
+
const package_di_1 = require("@nrwl/angular/src/executors/package/ng-packagr-adjustments/ng-package/package.di");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const rxjs_1 = require("rxjs");
|
|
12
|
+
const rxjs_for_await_1 = require("rxjs-for-await");
|
|
13
|
+
const operators_1 = require("rxjs/operators");
|
|
14
|
+
function initializeNgPackagr(options, context, projectDependencies) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const packager = new (yield Promise.resolve().then(() => tslib_1.__importStar(require('ng-packagr')))).NgPackagr([
|
|
17
|
+
...package_di_1.NX_PACKAGE_PROVIDERS,
|
|
18
|
+
...entry_point_di_1.NX_ENTRY_POINT_PROVIDERS,
|
|
19
|
+
(0, options_di_1.nxProvideOptions)({
|
|
20
|
+
tailwindConfig: options.tailwindConfig,
|
|
21
|
+
watch: options.watch,
|
|
22
|
+
}),
|
|
23
|
+
]);
|
|
24
|
+
console.debug('ptoject:', options.project);
|
|
25
|
+
packager.forProject((0, path_1.resolve)(context.root, options.project));
|
|
26
|
+
packager.withBuildTransform(package_di_1.NX_PACKAGE_TRANSFORM.provide);
|
|
27
|
+
if (options.tsConfig) {
|
|
28
|
+
const tsConfigPath = (0, buildable_libs_utils_1.createTmpTsConfig)(options.tsConfig, context.root, context.workspace.projects[context.projectName].root, projectDependencies);
|
|
29
|
+
packager.withTsConfig(tsConfigPath);
|
|
30
|
+
}
|
|
31
|
+
return packager;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates an executor function that executes the library build of an Angular
|
|
36
|
+
* package using ng-packagr.
|
|
37
|
+
* @param initializeNgPackagr function that returns an ngPackagr instance to use for the build.
|
|
38
|
+
*/
|
|
39
|
+
function createLibraryExecutor(initializeNgPackagr) {
|
|
40
|
+
return function (options, context) {
|
|
41
|
+
return tslib_1.__asyncGenerator(this, arguments, function* () {
|
|
42
|
+
const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
43
|
+
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
44
|
+
return yield tslib_1.__await(Promise.resolve({ success: false }));
|
|
45
|
+
}
|
|
46
|
+
function updatePackageJson() {
|
|
47
|
+
if (topLevelDependencies.length > 0 &&
|
|
48
|
+
options.updateBuildableProjectDepsInPackageJson) {
|
|
49
|
+
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target, topLevelDependencies, options.buildableProjectDepsInPackageJsonType);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (options.watch) {
|
|
53
|
+
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.tap)(() => updatePackageJson()), (0, operators_1.mapTo)({ success: true })))))));
|
|
54
|
+
}
|
|
55
|
+
return yield tslib_1.__await((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies))
|
|
56
|
+
.pipe((0, operators_1.switchMap)((packagr) => packagr.build()), (0, operators_1.tap)(() => updatePackageJson()), (0, operators_1.mapTo)({ success: true }))
|
|
57
|
+
.toPromise());
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.createLibraryExecutor = createLibraryExecutor;
|
|
62
|
+
exports.packageExecutor = createLibraryExecutor(initializeNgPackagr);
|
|
63
|
+
exports.default = exports.packageExecutor;
|
|
64
|
+
//# sourceMappingURL=impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../../../packages/@ng-atomic/executors/src/package/impl.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"title": "ng-packagr Target",
|
|
4
|
+
"description": "ng-packagr target options for Build Architect. Use to build and package library projects for publishing.",
|
|
5
|
+
"cli": "nx",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"presets": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Publishable Library with Tailwind",
|
|
10
|
+
"keys": ["project", "tailwindConfig"]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Updating Project Dependencies for Publishable Library",
|
|
14
|
+
"keys": [
|
|
15
|
+
"project",
|
|
16
|
+
"updateBuildableProjectDepsInPackageJson",
|
|
17
|
+
"buildableProjectDepsInPackageJsonType"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"project": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The file path for the ng-packagr configuration file, relative to the workspace root."
|
|
25
|
+
},
|
|
26
|
+
"tsConfig": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "The full path for the TypeScript configuration file, relative to the workspace root."
|
|
29
|
+
},
|
|
30
|
+
"watch": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Whether to run a build when any file changes.",
|
|
33
|
+
"default": false
|
|
34
|
+
},
|
|
35
|
+
"updateBuildableProjectDepsInPackageJson": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"description": "Whether to update the buildable project dependencies in package.json.",
|
|
38
|
+
"default": true
|
|
39
|
+
},
|
|
40
|
+
"buildableProjectDepsInPackageJsonType": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
|
43
|
+
"enum": ["dependencies", "peerDependencies"],
|
|
44
|
+
"default": "peerDependencies"
|
|
45
|
+
},
|
|
46
|
+
"tailwindConfig": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["project"]
|
|
53
|
+
}
|