Skip to content

Commit 1e9d274

Browse files
author
AlexDanilov
committed
ng schematics preparations
1 parent 43b9072 commit 1e9d274

File tree

6 files changed

+164
-19
lines changed

6 files changed

+164
-19
lines changed

angular.json

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"schematics": {
1212
"@schematics/angular:component": {
1313
"style": "scss"
14+
},
15+
"lfx-ng-schematics:lfx-component": {
16+
"path": "projects/lfx-component-lib/src/lib/components"
1417
}
1518
},
1619
"architect": {

package-lock.json

+100-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"storybook": "ng run lfx-component-lib:storybook",
1818
"build-storybook": "ng run lfx-component-lib:build-storybook",
1919
"chromatic": "npx chromatic --project-token=chpt_92f26893ce6e479",
20-
"verdaccio": "npx verdaccio"
20+
"verdaccio": "npx verdaccio",
21+
"publish": "cd ./dist/lfx-component-lib && npm publish --registry http://localhost:4873"
2122
},
2223
"dependencies": {
2324
"@angular/animations": "^18.0.0",
@@ -35,6 +36,7 @@
3536
},
3637
"devDependencies": {
3738
"@angular-devkit/build-angular": "^18.1.2",
39+
"@angular-devkit/schematics": "^18.2.2",
3840
"@angular/cli": "^18.0.5",
3941
"@angular/compiler-cli": "^18.0.0",
4042
"@chromatic-com/storybook": "^1.6.1",

projects/lfx-component-lib/documentation.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"deprecated": false,
1919
"deprecationMessage": "",
2020
"type": "Story",
21-
"defaultValue": "{\n args: {\n type: 'error' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5210&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('error');\n }\n}"
21+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'error' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5210&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('error');\n }\n}"
2222
},
2323
{
2424
"name": "meta",
@@ -38,7 +38,7 @@
3838
"deprecated": false,
3939
"deprecationMessage": "",
4040
"type": "Meta<ToastComponent>",
41-
"defaultValue": "{\n title: 'LFX Components/Containers/Toast',\n component: ToastComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-toast type=\"${args.type}\">\n <h1>Title</h1>\n <p>Body paragraph</p>\n </lfx-toast>\n `,\n }),\n argTypes: {\n type: {\n control: 'select',\n options: ['notice', 'warning', 'success', 'error'] as IType[],\n },\n },\n args: {\n type: 'notice' as IType,\n },\n}"
41+
"defaultValue": "{\n title: 'LFX Components/Containers/Toast',\n component: ToastComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-toast type=\"${args.type}\">\n <h1>Title</h1>\n <p>Body paragraph</p>\n </lfx-toast>\n `,\n }),\n argTypes: {\n type: {\n control: 'select',\n options: ['notice', 'warning', 'success', 'error'] as IType[],\n },\n },\n args: {\n // @ts-ignore\n type: 'notice' as IType,\n },\n}"
4242
},
4343
{
4444
"name": "Notice",
@@ -48,7 +48,7 @@
4848
"deprecated": false,
4949
"deprecationMessage": "",
5050
"type": "Story",
51-
"defaultValue": "{\n args: {\n type: 'notice' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5198&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('notice');\n }\n}"
51+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'notice' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5198&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('notice');\n }\n}"
5252
},
5353
{
5454
"name": "preview",
@@ -78,7 +78,7 @@
7878
"deprecated": false,
7979
"deprecationMessage": "",
8080
"type": "Story",
81-
"defaultValue": "{\n args: {\n type: 'success' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5207&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('success');\n }\n}"
81+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'success' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5207&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('success');\n }\n}"
8282
},
8383
{
8484
"name": "Warning",
@@ -88,7 +88,7 @@
8888
"deprecated": false,
8989
"deprecationMessage": "",
9090
"type": "Story",
91-
"defaultValue": "{\n args: {\n type: 'warning' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5205&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('warning');\n }\n}"
91+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'warning' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5205&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('warning');\n }\n}"
9292
}
9393
],
9494
"functions": [
@@ -157,7 +157,7 @@
157157
"deprecated": false,
158158
"deprecationMessage": "",
159159
"type": "Story",
160-
"defaultValue": "{\n args: {\n type: 'error' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5210&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('error');\n }\n}"
160+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'error' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5210&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('error');\n }\n}"
161161
},
162162
{
163163
"name": "meta",
@@ -167,7 +167,7 @@
167167
"deprecated": false,
168168
"deprecationMessage": "",
169169
"type": "Meta<ToastComponent>",
170-
"defaultValue": "{\n title: 'LFX Components/Containers/Toast',\n component: ToastComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-toast type=\"${args.type}\">\n <h1>Title</h1>\n <p>Body paragraph</p>\n </lfx-toast>\n `,\n }),\n argTypes: {\n type: {\n control: 'select',\n options: ['notice', 'warning', 'success', 'error'] as IType[],\n },\n },\n args: {\n type: 'notice' as IType,\n },\n}"
170+
"defaultValue": "{\n title: 'LFX Components/Containers/Toast',\n component: ToastComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-toast type=\"${args.type}\">\n <h1>Title</h1>\n <p>Body paragraph</p>\n </lfx-toast>\n `,\n }),\n argTypes: {\n type: {\n control: 'select',\n options: ['notice', 'warning', 'success', 'error'] as IType[],\n },\n },\n args: {\n // @ts-ignore\n type: 'notice' as IType,\n },\n}"
171171
},
172172
{
173173
"name": "Notice",
@@ -177,7 +177,7 @@
177177
"deprecated": false,
178178
"deprecationMessage": "",
179179
"type": "Story",
180-
"defaultValue": "{\n args: {\n type: 'notice' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5198&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('notice');\n }\n}"
180+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'notice' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5198&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('notice');\n }\n}"
181181
},
182182
{
183183
"name": "Success",
@@ -187,7 +187,7 @@
187187
"deprecated": false,
188188
"deprecationMessage": "",
189189
"type": "Story",
190-
"defaultValue": "{\n args: {\n type: 'success' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5207&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('success');\n }\n}"
190+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'success' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5207&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('success');\n }\n}"
191191
},
192192
{
193193
"name": "Warning",
@@ -197,7 +197,7 @@
197197
"deprecated": false,
198198
"deprecationMessage": "",
199199
"type": "Story",
200-
"defaultValue": "{\n args: {\n type: 'warning' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5205&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('warning');\n }\n}"
200+
"defaultValue": "{\n args: {\n // @ts-ignore\n type: 'warning' as IType,\n },\n parameters: {\n design: {\n type: \"figspec\",\n url: \"https://www.figma.com/design/nj8rOxBtzQCa7KrvBxF4aF/Coherence-Design-System?node-id=772-5205&t=zfHib1d5XSXabYJp-4\",\n },\n },\n play: async ( {canvasElement} ) => {\n const element = getElement(canvasElement);\n await expect(element.classList).toContain('warning');\n }\n}"
201201
}
202202
],
203203
"projects/lfx-component-lib/src/lib/containers/sections/__docs__/sections.stories.ts": [

projects/lfx-component-lib/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "lfx-component-lib",
3-
"version": "0.0.14",
3+
"version": "0.0.20",
44
"scripts": {
55
"build": "tsc -p tsconfig.schematics.json",
6-
"postbuild": "copyfiles schematics/collection.json ../../dist/lfx-component-lib/"
6+
"postbuild": "copyfiles schematics/collection.json schematics/*/schema.json schematics/*/files/** ../../dist/lfx-component-lib/"
77
},
88
"ng-add": {
99
"save": "true"

0 commit comments

Comments
 (0)