ui-lib-starter 0.0.1
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 +28 -0
- package/fesm2022/ui-lib-starter.mjs +30 -0
- package/fesm2022/ui-lib-starter.mjs.map +1 -0
- package/index.d.ts +8 -0
- package/package.json +30 -0
- package/schematics/collection.json +15 -0
- package/schematics/cva-component/schema.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Getting Started With Schematics
|
|
2
|
+
|
|
3
|
+
This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
|
|
4
|
+
|
|
5
|
+
### Testing
|
|
6
|
+
|
|
7
|
+
To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.
|
|
8
|
+
|
|
9
|
+
Check the documentation with
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
schematics --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Unit Testing
|
|
16
|
+
|
|
17
|
+
`npm run test` will run the unit tests, using Jasmine as a runner and test framework.
|
|
18
|
+
|
|
19
|
+
### Publishing
|
|
20
|
+
|
|
21
|
+
To publish, simply do:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build
|
|
25
|
+
npm publish
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
That's it!
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class UiLib {
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UiLib, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: UiLib, isStandalone: true, selector: "lib-ui-lib", ngImport: i0, template: `
|
|
7
|
+
<p>
|
|
8
|
+
ui-lib works!
|
|
9
|
+
</p>
|
|
10
|
+
`, isInline: true, styles: [""] });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UiLib, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'lib-ui-lib', imports: [], template: `
|
|
15
|
+
<p>
|
|
16
|
+
ui-lib works!
|
|
17
|
+
</p>
|
|
18
|
+
` }]
|
|
19
|
+
}] });
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* Public API Surface of ui-lib
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated bundle index. Do not edit.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export { UiLib };
|
|
30
|
+
//# sourceMappingURL=ui-lib-starter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-lib-starter.mjs","sources":["../../../projects/ui-lib/src/lib/ui-lib.ts","../../../projects/ui-lib/src/public-api.ts","../../../projects/ui-lib/src/ui-lib-starter.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-ui-lib',\n imports: [],\n template: `\n <p>\n ui-lib works!\n </p>\n `,\n styles: ``,\n})\nexport class UiLib {\n\n}\n","/*\n * Public API Surface of ui-lib\n */\n\nexport * from './lib/ui-lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAYa,KAAK,CAAA;wGAAL,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPN;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGU,KAAK,EAAA,UAAA,EAAA,CAAA;kBAVjB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-lib-starter",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A blank schematics",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"schematics"
|
|
7
|
+
],
|
|
8
|
+
"author": "",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"schematics": "./src/collection.json",
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"@angular-devkit/core": "^21.2.6",
|
|
13
|
+
"@angular-devkit/schematics": "^21.2.6"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"tslib": "^2.3.0"
|
|
17
|
+
},
|
|
18
|
+
"module": "fesm2022/ui-lib-starter.mjs",
|
|
19
|
+
"typings": "index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"default": "./fesm2022/ui-lib-starter.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"schematics": {
|
|
5
|
+
"description": "A blank schematic.",
|
|
6
|
+
"factory": "./schematics/index#schematics"
|
|
7
|
+
},
|
|
8
|
+
"cva-component": {
|
|
9
|
+
"description": "This schematic generates CVA component.",
|
|
10
|
+
"factory": "./cva-component/index#cvaComponent",
|
|
11
|
+
"schema": "./cva-component/schema.json",
|
|
12
|
+
"aliases": ["cc"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "cva",
|
|
4
|
+
"title": "CVA component schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "The name of the component",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"path": {
|
|
12
|
+
"description": "Where should be created the component",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "path",
|
|
15
|
+
"x-prompt": "Where should be created the component?",
|
|
16
|
+
"default": "src/app"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": []
|
|
20
|
+
}
|