@smartsoft001-mobilems/objects-shell-angular 2.89.0 → 2.91.0
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/generators/museum-module.cjs +30 -0
- package/generators/schema.json +20 -0
- package/generators.json +9 -0
- package/package.json +2 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `museum-module` generator for this package — scaffolds libs/museum-objects in a
|
|
3
|
+
* museum workspace from a reference project. The engine ships with
|
|
4
|
+
* @smartsoft001-mobilems/angular (resolved by file path to bypass the
|
|
5
|
+
* package's exports map, which only lists Angular entry points).
|
|
6
|
+
*/
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const { createRequire } = require('module');
|
|
9
|
+
|
|
10
|
+
// Resolve the shared engine from the TARGET workspace (nx g runs at its
|
|
11
|
+
// root) so the generator also works when this package is loaded by path;
|
|
12
|
+
// fall back to normal resolution for a plain npm install.
|
|
13
|
+
function resolveSharedPkg() {
|
|
14
|
+
try {
|
|
15
|
+
return createRequire(path.join(process.cwd(), 'noop.js')).resolve(
|
|
16
|
+
'@smartsoft001-mobilems/angular/package.json',
|
|
17
|
+
);
|
|
18
|
+
} catch {
|
|
19
|
+
return require.resolve('@smartsoft001-mobilems/angular/package.json');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const engine = require(
|
|
24
|
+
path.join(path.dirname(resolveSharedPkg()), 'generators/museum-module-engine.cjs'),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
module.exports = engine({
|
|
28
|
+
lib: 'museum-objects',
|
|
29
|
+
transGroups: ['OBJECTS', 'DETAILS_PAGE', 'GALLERY'],
|
|
30
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "MuseumModule",
|
|
4
|
+
"title": "Scaffold this package's museum feature module from a reference project",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"referenceRoot": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Absolute path to the reference museum workspace (e.g. ~/Projects/mobilems-muzeum-lowicz)"
|
|
10
|
+
},
|
|
11
|
+
"prefix": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "TS path prefix of the target workspace (tsconfig paths use @<prefix>/...)",
|
|
14
|
+
"default": "template"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": [
|
|
18
|
+
"referenceRoot"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/generators.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generators": {
|
|
3
|
+
"museum-module": {
|
|
4
|
+
"factory": "./generators/museum-module.cjs",
|
|
5
|
+
"schema": "./generators/schema.json",
|
|
6
|
+
"description": "Scaffold libs/museum-objects in a museum workspace from a reference project (copy + prefix threading + tsconfig paths + translations pl/en)."
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001-mobilems/objects-shell-angular",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.91.0",
|
|
4
4
|
"description": "This library was generated with [Nx](https://nx.dev).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"url": "https://github.com/emiljuchnikowski/smartsoft/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/emiljuchnikowski/smartsoft#readme",
|
|
15
|
+
"generators": "./generators.json",
|
|
15
16
|
"module": "fesm2022/smartsoft001-mobilems-objects-shell-angular.mjs",
|
|
16
17
|
"typings": "types/smartsoft001-mobilems-objects-shell-angular.d.ts",
|
|
17
18
|
"exports": {
|