Skip to content

Commit 83e9295

Browse files
author
AlexDanilov
committed
initial commit
0 parents  commit 83e9295

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+34912
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

.github/workflows/chromatic.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Chromatic"
2+
3+
on: push
4+
5+
jobs:
6+
chromatic:
7+
name: Run Chromatic
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
- name: Install dependencies
18+
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment.
19+
run: yarn install
20+
- name: Run Chromatic
21+
uses: chromaui/action@latest
22+
with:
23+
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
24+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# .github/workflows/deploy-github-pages.yaml
2+
3+
# Workflow name
4+
name: Build and Publish Storybook to GitHub Pages
5+
6+
on:
7+
# temp only so we can skip this build
8+
# push:
9+
# tags:
10+
# - v*
11+
push:
12+
branches:
13+
- main
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# List of jobs
21+
jobs:
22+
deploy:
23+
runs-on: ubuntu-latest
24+
# Job steps
25+
steps:
26+
# Manual Checkout
27+
- uses: actions/checkout@v4
28+
29+
# Set up Node
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: "20.x"
33+
34+
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
35+
- uses: bitovi/[email protected]
36+
with:
37+
install_command: yarn install # default: npm ci
38+
build_command: yarn build-storybook # default: npm run build-storybook
39+
path: storybook-static # default: dist/storybook
40+
checkout: false # default: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: publish on github
2+
3+
on:
4+
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
5+
# push:
6+
# tags:
7+
# - v*
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
publish-gpr:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- uses: actions/checkout@v4
20+
# Setup .npmrc file to publish to GitHub Packages
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: "20.x"
24+
registry-url: "https://npm.pkg.github.com"
25+
# Defaults to the user or organization that owns the workflow file
26+
scope: "@emlimlf"
27+
- run: yarn install
28+
- run: yarn run build
29+
- run: cd dist/lfx-component-lib/ && npm pack
30+
- run: cd dist/lfx-component-lib/ && npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
43+
44+
*storybook.log

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# LfxStorybook
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.5.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

angular.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"lfx-component-lib": {
7+
"projectType": "library",
8+
"root": "projects/lfx-component-lib",
9+
"sourceRoot": "projects/lfx-component-lib/src",
10+
"prefix": "lfx",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"style": "scss"
14+
},
15+
"lfx-ng-schematics:lfx-component": {
16+
"path": "projects/lfx-component-lib/src/lib/containers"
17+
}
18+
},
19+
"architect": {
20+
"build": {
21+
"builder": "@angular-devkit/build-angular:ng-packagr",
22+
"options": {
23+
"project": "projects/lfx-component-lib/ng-package.json"
24+
},
25+
"configurations": {
26+
"production": {
27+
"tsConfig": "projects/lfx-component-lib/tsconfig.lib.prod.json"
28+
},
29+
"development": {
30+
"tsConfig": "projects/lfx-component-lib/tsconfig.lib.json"
31+
}
32+
},
33+
"defaultConfiguration": "production"
34+
},
35+
"test": {
36+
"builder": "@angular-devkit/build-angular:karma",
37+
"options": {
38+
"tsConfig": "projects/lfx-component-lib/tsconfig.spec.json",
39+
"polyfills": ["zone.js", "zone.js/testing"]
40+
}
41+
},
42+
"storybook": {
43+
"builder": "@storybook/angular:start-storybook",
44+
"options": {
45+
"configDir": "projects/lfx-component-lib/.storybook",
46+
"browserTarget": "lfx-component-lib:build",
47+
"compodoc": true,
48+
"compodocArgs": ["-e", "json", "-d", "projects/lfx-component-lib"],
49+
"port": 6006
50+
}
51+
},
52+
"build-storybook": {
53+
"builder": "@storybook/angular:build-storybook",
54+
"options": {
55+
"configDir": "projects/lfx-component-lib/.storybook",
56+
"browserTarget": "lfx-component-lib:build",
57+
"compodoc": true,
58+
"compodocArgs": ["-e", "json", "-d", "projects/lfx-component-lib"],
59+
"outputDir": "storybook-static"
60+
}
61+
}
62+
}
63+
}
64+
},
65+
"cli": {
66+
"analytics": false
67+
}
68+
}

0 commit comments

Comments
 (0)