@loomweaver/devkit 0.7.2 → 0.7.4
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 +5 -3
- package/package.json +1 -1
- package/src/generators/distribution/generator.js +8 -0
- package/src/generators/distribution/generator.js.map +1 -1
- package/src/generators/shared.d.ts +2 -10
- package/src/generators/shared.js +22 -10
- package/src/generators/shared.js.map +1 -1
- package/src/index.d.ts +5 -1
- package/src/index.js +13 -1
- package/src/index.js.map +1 -1
- package/src/lib/amend/compose.d.ts +12 -0
- package/src/lib/amend/compose.js +64 -0
- package/src/lib/amend/compose.js.map +1 -0
- package/src/lib/amend/describe.d.ts +7 -0
- package/src/lib/amend/describe.js +46 -0
- package/src/lib/amend/describe.js.map +1 -0
- package/src/lib/amend/merge.d.ts +14 -0
- package/src/lib/amend/merge.js +142 -0
- package/src/lib/amend/merge.js.map +1 -0
- package/src/lib/amend/types.d.ts +67 -0
- package/src/lib/amend/types.js +3 -0
- package/src/lib/amend/types.js.map +1 -0
- package/src/lib/generate/generate.d.ts +2 -0
- package/src/lib/generate/generate.js +5 -0
- package/src/lib/generate/generate.js.map +1 -1
- package/src/lib/generate/types.d.ts +6 -0
- package/src/lib/scaffolds/inputs.d.ts +26 -0
- package/src/lib/scaffolds/inputs.js +36 -0
- package/src/lib/scaffolds/inputs.js.map +1 -0
- package/src/lib/scaffolds/scaffolds.d.ts +3 -0
- package/src/lib/scaffolds/scaffolds.js +6 -30
- package/src/lib/scaffolds/scaffolds.js.map +1 -1
- package/src/recipes/angular-distribution/amendments.d.ts +3 -0
- package/src/recipes/angular-distribution/amendments.js +38 -0
- package/src/recipes/angular-distribution/amendments.js.map +1 -0
- package/src/recipes/angular-distribution/readme.d.ts +2 -0
- package/src/recipes/angular-distribution/readme.js +215 -0
- package/src/recipes/angular-distribution/readme.js.map +1 -0
- package/src/recipes/angular-distribution/recipe.js +13 -187
- package/src/recipes/angular-distribution/recipe.js.map +1 -1
- package/src/recipes/angular-weaver/amendments.d.ts +3 -0
- package/src/recipes/angular-weaver/amendments.js +34 -0
- package/src/recipes/angular-weaver/amendments.js.map +1 -0
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.angularDistribution = void 0;
|
|
4
4
|
exports.resolveDistributionInput = resolveDistributionInput;
|
|
5
|
+
const amendments_1 = require("./amendments");
|
|
5
6
|
const casing_1 = require("../../lib/generate/casing");
|
|
6
7
|
const shell_regions_1 = require("../shell-regions");
|
|
7
8
|
const logo_1 = require("./logo");
|
|
9
|
+
const readme_1 = require("./readme");
|
|
8
10
|
const STYLES = ['tailwind', 'precompiled'];
|
|
9
11
|
function resolveDistributionInput(input) {
|
|
10
12
|
var _a, _b;
|
|
@@ -38,7 +40,9 @@ bootstrapApplication(App, appConfig).catch((err) => console.error(err));
|
|
|
38
40
|
function appConfigTs(d) {
|
|
39
41
|
return `import { ApplicationConfig } from '@angular/core';
|
|
40
42
|
import {
|
|
43
|
+
provideCommandPaletteEntry,
|
|
41
44
|
provideLayout,
|
|
45
|
+
provideQuickOpenEntry,
|
|
42
46
|
provideShell,
|
|
43
47
|
provideShellRouter,
|
|
44
48
|
type ShellLayout,
|
|
@@ -63,6 +67,11 @@ export const appConfig: ApplicationConfig = {
|
|
|
63
67
|
provideShellRouter(),
|
|
64
68
|
provideShell(),
|
|
65
69
|
provideLayout(layout),
|
|
70
|
+
/* The two searches the shell seeds: mod+k over commands, mod+p over open work. Both work
|
|
71
|
+
without these two lines; these put the shortcut on screen for a user who does not know
|
|
72
|
+
it. Delete either one, or pass { bar, slot, order } to place it elsewhere. */
|
|
73
|
+
provideCommandPaletteEntry(),
|
|
74
|
+
provideQuickOpenEntry(),
|
|
66
75
|
provideProductIdentity({
|
|
67
76
|
name: '${d.title}',
|
|
68
77
|
tagline: 'Built on LoomWeaver',
|
|
@@ -211,197 +220,14 @@ function manifest(d) {
|
|
|
211
220
|
icons: [{ src: 'logo.svg', type: 'image/svg+xml', sizes: 'any' }],
|
|
212
221
|
}, null, 2);
|
|
213
222
|
}
|
|
214
|
-
function stylesNotes(d) {
|
|
215
|
-
if (d.styles === 'precompiled') {
|
|
216
|
-
return [
|
|
217
|
-
'`src/styles.css` imports the stylesheet **we** compiled — tokens, the `.lw-*` class contracts',
|
|
218
|
-
"and every utility the shell's own templates use, 67 KB minified and 11 KB over the wire. There",
|
|
219
|
-
'is nothing to install and nothing to configure: no `tailwindcss`, no `.postcssrc.json`, no',
|
|
220
|
-
'`@source` paths to miscount.',
|
|
221
|
-
'',
|
|
222
|
-
'What you give up is writing Tailwind utilities in *your own* templates. The `--lw-*` tokens stay',
|
|
223
|
-
'available to any CSS you write, so re-theming stays a token remap rather than a fight.',
|
|
224
|
-
'',
|
|
225
|
-
'If you bring a CSS framework of your own, **import it into a cascade layer** — the file says how,',
|
|
226
|
-
'and it is the one decision that determines whether the chrome survives the introduction. Prefer',
|
|
227
|
-
'Tailwind after all? Re-run the scaffold with `--styles tailwind`.',
|
|
228
|
-
];
|
|
229
|
-
}
|
|
230
|
-
return [
|
|
231
|
-
"`src/styles.css` compiles the shell's source theme with Tailwind 4, which is also what lets you",
|
|
232
|
-
'write Tailwind utilities in your own templates. It needs two things the scaffold cannot add for',
|
|
233
|
-
'you — the packages:',
|
|
234
|
-
'',
|
|
235
|
-
'```sh',
|
|
236
|
-
'npm install -D tailwindcss @tailwindcss/postcss @tailwindcss/typography',
|
|
237
|
-
'```',
|
|
238
|
-
'',
|
|
239
|
-
'and the PostCSS plugin, in a file next to your `package.json`:',
|
|
240
|
-
'',
|
|
241
|
-
'```jsonc',
|
|
242
|
-
'// .postcssrc.json',
|
|
243
|
-
'{ "plugins": { "@tailwindcss/postcss": {} } }',
|
|
244
|
-
'```',
|
|
245
|
-
'',
|
|
246
|
-
'Use **semantic tokens only** in your own templates (`bg-surface`, `text-content`, `text-brand`,',
|
|
247
|
-
'`border-border`), never raw palette colours.',
|
|
248
|
-
'',
|
|
249
|
-
'**Count the `../` hops in the `@source` line.** It is resolved from the stylesheet, not from the',
|
|
250
|
-
'workspace root, and the scaffold derived it from where this project sits. Move the project and',
|
|
251
|
-
"nothing errors — Tailwind simply emits none of the shell's classes and the app renders unstyled.",
|
|
252
|
-
'',
|
|
253
|
-
'Want none of this? Re-run the scaffold with `--styles precompiled` and you get a one-line',
|
|
254
|
-
'stylesheet that needs no Tailwind at all — the right choice if your product is themed with',
|
|
255
|
-
'Bootstrap, Bulma or hand-written CSS.',
|
|
256
|
-
];
|
|
257
|
-
}
|
|
258
|
-
function readme(d) {
|
|
259
|
-
return [
|
|
260
|
-
`# ${d.title} — a LoomWeaver distribution`,
|
|
261
|
-
'',
|
|
262
|
-
`The composition root that assembles the platform into a shippable product. It renders the bare`,
|
|
263
|
-
`shell out of the box; add your weavers and branding below. Your own README is untouched — the`,
|
|
264
|
-
`scaffold writes its notes here so it can never overwrite prose you wrote.`,
|
|
265
|
-
'',
|
|
266
|
-
'## Run it',
|
|
267
|
-
'',
|
|
268
|
-
'In an Nx workspace (the generator wired the project):',
|
|
269
|
-
'',
|
|
270
|
-
'```sh',
|
|
271
|
-
`nx serve ${d.name}`,
|
|
272
|
-
'```',
|
|
273
|
-
'',
|
|
274
|
-
'Scaffolded over the CLI or MCP, these files are sources without build wiring — drop them into',
|
|
275
|
-
"an application you already serve (`ng new`, or an Nx application). They keep Angular's own",
|
|
276
|
-
'shape: `main.ts` bootstraps `App`, `App` renders `<lw-shell />`, and everything this product is',
|
|
277
|
-
'made of lives in `app.config.ts`. Nothing of the generated app is deleted. Over an existing',
|
|
278
|
-
'application `--force` replaces exactly the files above — all of them bootstrap wiring, none of',
|
|
279
|
-
'them content you authored. Under Nx it additionally merges the build targets into that',
|
|
280
|
-
"project's `project.json`, keeping the targets, `implicitDependencies` and tags it already had.",
|
|
281
|
-
'',
|
|
282
|
-
'Two leftovers from `ng new` are no longer referenced and can go: `src/app/app.routes.ts` (the',
|
|
283
|
-
'shell owns content routing via `provideShellRouter()`) and `src/app/app.css`. The generated',
|
|
284
|
-
'`src/app/app.spec.ts` now fails — `App` pulls the whole shell into a bare `TestBed` — so delete',
|
|
285
|
-
'it and test your own components instead of the composition root.',
|
|
286
|
-
'',
|
|
287
|
-
'The project is generated **untagged**: Nx tags belong to your `depConstraints`, and inventing',
|
|
288
|
-
'one would fail a lint policy you never opted this project into. If your workspace enforces',
|
|
289
|
-
'module boundaries, give it tags your constraints allow — `--tags` at generation time, or',
|
|
290
|
-
'`tags` in `project.json` afterwards.',
|
|
291
|
-
'',
|
|
292
|
-
'## Compose weavers + branding (in `src/app/app.config.ts`)',
|
|
293
|
-
'',
|
|
294
|
-
'The layout is already there. Adding a weaver is three providers plus its import — note the',
|
|
295
|
-
'**spread**, since `providePlugins` is variadic and returns an array:',
|
|
296
|
-
'',
|
|
297
|
-
'```ts',
|
|
298
|
-
"import { providePlugins, provideCapabilityGrants, provideTranslationNamespaces } from '@loomweaver/shell';",
|
|
299
|
-
"import { notesPlugin } from '@acme/notes-weaver'; // Nx: the workspace alias; otherwise a relative path",
|
|
300
|
-
'',
|
|
301
|
-
" provideTranslationNamespaces('notes'),",
|
|
302
|
-
" provideCapabilityGrants({ notes: ['contributions', 'ui', 'navigation'] }),",
|
|
303
|
-
' ...providePlugins(notesPlugin),',
|
|
304
|
-
'```',
|
|
305
|
-
'',
|
|
306
|
-
"Grant exactly what the weaver's manifest declares — the broker is default-deny, so an ungranted",
|
|
307
|
-
'plugin throws `CapabilityError` instead of quietly doing less. A weaver also needs its',
|
|
308
|
-
'translations served: add an assets glob for its `src/lib/i18n` under `i18n/<id>` (the Nx',
|
|
309
|
-
'generator does this for you).',
|
|
310
|
-
'',
|
|
311
|
-
'`public/logo.svg` is the LoomWeaver mark, dropped in as a placeholder so the top bar renders',
|
|
312
|
-
'something from the first run instead of a broken image. Replace it with your own — any square',
|
|
313
|
-
'image will do; `logoUrl` resolves against your served root. `tagline` is a',
|
|
314
|
-
'translation key that falls back to rendering itself, so the literal above works but makes',
|
|
315
|
-
'Transloco log a missing-translation warning in dev; point it at a key of your own to silence it.',
|
|
316
|
-
'',
|
|
317
|
-
'That same file is also the **app icon**: the browser tab reads it, and the manifest names it so',
|
|
318
|
-
'the app has an icon at all. One gap is left on purpose, because a scaffold writes text and',
|
|
319
|
-
'cannot invent your artwork: **Chromium only offers installation once the manifest names a 192',
|
|
320
|
-
'and a 512 raster icon**, and iOS ignores manifest icons entirely in favour of',
|
|
321
|
-
'`apple-touch-icon`. Drop `icon-192.png` and `icon-512.png` next to the logo, add them to the',
|
|
322
|
-
"manifest's `icons` and add an `apple-touch-icon` link to `index.html`, and the app becomes",
|
|
323
|
-
'installable. Until then it runs and caches offline, it simply is not offered for installation.',
|
|
324
|
-
'',
|
|
325
|
-
'## Styles',
|
|
326
|
-
'',
|
|
327
|
-
...stylesNotes(d),
|
|
328
|
-
'',
|
|
329
|
-
'## Build wiring',
|
|
330
|
-
'',
|
|
331
|
-
'The Nx generator put all of this in `project.json`. Scaffolded over the CLI or MCP, add it to',
|
|
332
|
-
'your build target yourself — `angular.json` under `projects.<name>.architect.build.options` with',
|
|
333
|
-
'the Angular CLI, `project.json` under `targets.build.options` in Nx. Paths inside `assets` are',
|
|
334
|
-
'resolved from the workspace root, so they read the same either way:',
|
|
335
|
-
'',
|
|
336
|
-
'```jsonc',
|
|
337
|
-
'"styles": ["src/styles.css"],',
|
|
338
|
-
'"assets": [',
|
|
339
|
-
' { "glob": "**/*", "input": "public" },',
|
|
340
|
-
' { "glob": "**/*", "input": "node_modules/@loomweaver/shell/i18n", "output": "i18n" },',
|
|
341
|
-
' { "glob": "**/*", "input": "node_modules/@loomweaver/frame-kit/dist", "output": "frame-kit" }',
|
|
342
|
-
'],',
|
|
343
|
-
'"serviceWorker": "ngsw-config.json"',
|
|
344
|
-
'```',
|
|
345
|
-
'',
|
|
346
|
-
'And in the **production** configuration of that same target:',
|
|
347
|
-
'',
|
|
348
|
-
'```jsonc',
|
|
349
|
-
'"optimization": { "styles": { "inlineCritical": false } }',
|
|
350
|
-
'```',
|
|
351
|
-
'',
|
|
352
|
-
'Each of those earns its place. The **`@loomweaver/shell/i18n` glob** is the one whose absence is easy',
|
|
353
|
-
'to misread: the shell fetches its own UI strings at runtime, so without it every label in the',
|
|
354
|
-
'chrome renders as its raw translation key and nothing errors. The **frame-kit** glob only',
|
|
355
|
-
'matters if you host sandboxed (iframe) plugins — install that package then; until you do, the',
|
|
356
|
-
'glob simply matches nothing. **`serviceWorker`** emits the worker that `provideShell()` already',
|
|
357
|
-
'registers for you (inert in dev) — never add `provideServiceWorker` yourself, and if you would',
|
|
358
|
-
'rather ship no worker at all, drop `ngsw-config.json` and pass',
|
|
359
|
-
'`provideShell({ serviceWorker: false })`, because otherwise the registration 404s in production.',
|
|
360
|
-
'**`inlineCritical: false`** is not optional here: the `index.html` above ships a strict',
|
|
361
|
-
"`script-src 'self'`, and Angular's critical-CSS pass loads the stylesheet with an **inline**",
|
|
362
|
-
'`onload` handler that the policy blocks — the app then renders completely unstyled, and only in',
|
|
363
|
-
'production builds.',
|
|
364
|
-
'',
|
|
365
|
-
'## Ship less than the whole workbench',
|
|
366
|
-
'',
|
|
367
|
-
'The shell arrives with every capability on: splitting, dragging tabs between panes, pinning,',
|
|
368
|
-
'stacking views, pop-out windows, keyboard shortcuts, the curation checklists. A product whose',
|
|
369
|
-
'users would be overwhelmed by that switches parts off in the same providers array:',
|
|
370
|
-
'',
|
|
371
|
-
'```ts',
|
|
372
|
-
"import { provideShellFeatures } from '@loomweaver/shell';",
|
|
373
|
-
'',
|
|
374
|
-
' provideShellFeatures({',
|
|
375
|
-
' content: { splitRight: false, splitDown: false, moveTabs: false },',
|
|
376
|
-
' sidebar: { stackViews: false },',
|
|
377
|
-
' windows: { popout: false },',
|
|
378
|
-
' }),',
|
|
379
|
-
'```',
|
|
380
|
-
'',
|
|
381
|
-
'A switch takes the **affordance and the gesture**: turning `splitRight` off removes the toolbar',
|
|
382
|
-
'button, the drop edges *and* `mod+\\`, so the capability cannot come back through a second door.',
|
|
383
|
-
'Fields merge group by group, so name only what you turn off. The groups are `content`,',
|
|
384
|
-
'`sidebar`, `rail`, `workspaces`, `windows` and `commands`; everything is on by default except',
|
|
385
|
-
'`content.escalate`, the unlabelled double-click cycle on a tab.',
|
|
386
|
-
'',
|
|
387
|
-
'That provider is for **gestures**. A command, a bar or rail item, a settings row or a menu entry',
|
|
388
|
-
'is a *contribution* and goes instead — by id — into `provideShell({ omit: [...] })`. Where a',
|
|
389
|
-
'capability is both, the feature switch wins and takes the menu entry with it.',
|
|
390
|
-
'',
|
|
391
|
-
'A product backend is optional: implement the settings-store / auth-source ports',
|
|
392
|
-
'(`provideSettingsStore` / `provideAuthSource`, both against the `KeyValueStore` shape)',
|
|
393
|
-
'with your own backend, or keep the local/anonymous defaults for a standalone UI.',
|
|
394
|
-
'Working state stays on `WORKING_STATE_STORE` and never reaches your',
|
|
395
|
-
'settings backend; back it separately with `provideWorkingStateStore` only if',
|
|
396
|
-
'working state should travel across devices.',
|
|
397
|
-
'',
|
|
398
|
-
].join('\n');
|
|
399
|
-
}
|
|
400
223
|
exports.angularDistribution = {
|
|
401
224
|
id: 'angular-distribution',
|
|
225
|
+
amend(input) {
|
|
226
|
+
return (0, amendments_1.distributionAmendments)(resolveDistributionInput(input));
|
|
227
|
+
},
|
|
402
228
|
build(input) {
|
|
403
229
|
const d = resolveDistributionInput(input);
|
|
404
|
-
return Object.assign(Object.assign({ 'src/main.ts': mainTs(), 'src/app/app.config.ts': appConfigTs(d) }, (d.withTests ? { 'src/app/app.config.spec.ts': appConfigSpec() } : {})), { 'src/app/app.ts': appTs(), 'src/app/app.html': appHtml(), 'src/index.html': indexHtml(d), 'src/styles.css': stylesCss(d), 'public/logo.svg': logo_1.PLACEHOLDER_LOGO_SVG, 'public/manifest.webmanifest': manifest(d) + '\n', 'ngsw-config.json': ngswConfig() + '\n', 'LOOMWEAVER.md': readme(d) });
|
|
230
|
+
return Object.assign(Object.assign({ 'src/main.ts': mainTs(), 'src/app/app.config.ts': appConfigTs(d) }, (d.withTests ? { 'src/app/app.config.spec.ts': appConfigSpec() } : {})), { 'src/app/app.ts': appTs(), 'src/app/app.html': appHtml(), 'src/index.html': indexHtml(d), 'src/styles.css': stylesCss(d), 'public/logo.svg': logo_1.PLACEHOLDER_LOGO_SVG, 'public/manifest.webmanifest': manifest(d) + '\n', 'ngsw-config.json': ngswConfig() + '\n', 'LOOMWEAVER.md': (0, readme_1.readme)(d) });
|
|
405
231
|
},
|
|
406
232
|
};
|
|
407
233
|
//# sourceMappingURL=recipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-distribution/recipe.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-distribution/recipe.ts"],"names":[],"mappings":";;;AAmCA,4DA0BC;AA5DD,6CAAsD;AAEtD,sDAAmE;AACnE,oDAAiD;AACjD,iCAA8C;AAC9C,qCAAkC;AA2BlC,MAAM,MAAM,GAAkC,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAE1E,SAAgB,wBAAwB,CACtC,KAAwB;;IAExB,IAAI,CAAC,IAAA,kBAAS,EAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,mEAAmE,KAAK,CAAC,IAAI,IAAI,CAClF,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,MAAA,KAAK,CAAC,MAAM,mCAAI,UAAU,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,0BAA0B,MAAM,sBAAsB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3E,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,G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AK,EAAE,CAAC;KAClE,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAEY,QAAA,mBAAmB,GAA8B;IAC5D,EAAE,EAAE,sBAAsB;IAC1B,KAAK,CAAC,KAAwB;QAC5B,OAAO,IAAA,mCAAsB,EAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,KAAK,CAAC,KAAwB;QAC5B,MAAM,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;QAC1C,qCACE,aAAa,EAAE,MAAM,EAAE,EACvB,uBAAuB,EAAE,WAAW,CAAC,CAAC,CAAC,IACpC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,4BAA4B,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACzE,gBAAgB,EAAE,KAAK,EAAE,EACzB,kBAAkB,EAAE,OAAO,EAAE,EAC7B,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,EAC9B,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,EAC9B,iBAAiB,EAAE,2BAAoB,EACvC,6BAA6B,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,EACjD,kBAAkB,EAAE,UAAU,EAAE,GAAG,IAAI,EACvC,eAAe,EAAE,IAAA,eAAM,EAAC,CAAC,CAAC,IAC1B;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.weaverAmendments = weaverAmendments;
|
|
4
|
+
const recipe_1 = require("./recipe");
|
|
5
|
+
function weaverAmendments(input, where) {
|
|
6
|
+
const w = (0, recipe_1.resolveWeaverInput)(input);
|
|
7
|
+
const directory = (where !== null && where !== void 0 ? where : '').replace(/^\.?\/*/, '').replace(/\/+$/, '');
|
|
8
|
+
if (!directory) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
kind: 'build-target',
|
|
14
|
+
styles: [],
|
|
15
|
+
assets: [
|
|
16
|
+
{
|
|
17
|
+
glob: '**/*.json',
|
|
18
|
+
input: `${directory}/src/lib/i18n`,
|
|
19
|
+
from: 'workspace',
|
|
20
|
+
output: `i18n/${w.id}`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{ kind: 'stylesheet-source', sourceRoot: `${directory}/src` },
|
|
25
|
+
{
|
|
26
|
+
kind: 'compose-plugin',
|
|
27
|
+
id: w.id,
|
|
28
|
+
symbol: `${w.propertyName}Plugin`,
|
|
29
|
+
capabilities: w.capabilities,
|
|
30
|
+
sourceRoot: `${directory}/src`,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=amendments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amendments.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-weaver/amendments.ts"],"names":[],"mappings":";;AAGA,4CA+BC;AAjCD,qCAA2D;AAE3D,SAAgB,gBAAgB,CAC9B,KAAkB,EAClB,KAAyB;IAEzB,MAAM,CAAC,GAAG,IAAA,2BAAkB,EAAC,KAAK,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL;YACE,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,GAAG,SAAS,eAAe;oBAClC,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE;iBACvB;aACF;SACF;QACD,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,GAAG,SAAS,MAAM,EAAE;QAC7D;YACE,IAAI,EAAE,gBAAgB;YACtB,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,MAAM,EAAE,GAAG,CAAC,CAAC,YAAY,QAAQ;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,UAAU,EAAE,GAAG,SAAS,MAAM;SAC/B;KACF,CAAC;AACJ,CAAC"}
|