Skip to content

Commit eadcc51

Browse files
committed
refactor: create new project
Generate new nx.dev project
1 parent a5892d5 commit eadcc51

20 files changed

+26466
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://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+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"ignorePatterns": ["**/*"],
3+
"overrides": [
4+
{
5+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
6+
"rules": {
7+
"@nx/enforce-module-boundaries": [
8+
"error",
9+
{
10+
"enforceBuildableLibDependency": true,
11+
"allow": [],
12+
"depConstraints": [
13+
{
14+
"sourceTag": "*",
15+
"onlyDependOnLibsWithTags": ["*"]
16+
}
17+
]
18+
}
19+
]
20+
}
21+
},
22+
{
23+
"files": ["*.ts", "*.tsx"],
24+
"rules": {}
25+
},
26+
{
27+
"files": ["*.js", "*.jsx"],
28+
"rules": {}
29+
},
30+
{
31+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
32+
"env": {
33+
"jest": true
34+
},
35+
"rules": {}
36+
}
37+
],
38+
"extends": ["./.eslintrc.base.json"]
39+
}

.github/workflows/bump-version.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Bump-version
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
jobs:
9+
build-and-test:
10+
name: "Build and test"
11+
if: ${{ github.event.pull_request.merged == true }}
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: "read"
15+
actions: "read"
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
- name: Restore cached npm dependencies
25+
id: cache-dependencies-restore
26+
uses: actions/cache/restore@v4
27+
with:
28+
path: |
29+
node_modules
30+
~/.cache/Cypress # needed for the Cypress binary
31+
key: ${{ runner.os }}npm-dependencies-${{ hashFiles('package-lock.json') }}
32+
- run: npm ci
33+
- name: Cache npm dependencies
34+
id: cache-dependencies-save
35+
uses: actions/cache/save@v4
36+
with:
37+
path: |
38+
node_modules
39+
~/.cache/Cypress # needed for the Cypress binary
40+
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
41+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
42+
uses: nrwl/nx-set-shas@v4
43+
with:
44+
main-branch-name: "main"
45+
- run: npx nx affected -t lint test build --parallel=3 --exclude='test-npm' --base=origin/main~1 --head=origin/main
46+
47+
# - run: npm nx affected -t e2e-ci --parallel=1
48+
# - run: npm nx affected -t deploy --no-agents
49+
bump-version:
50+
name: "Bump version"
51+
needs:
52+
- build-and-test
53+
runs-on: ubuntu-latest
54+
permissions:
55+
contents: "write"
56+
actions: "read"
57+
id-token: "write"
58+
timeout-minutes: 10
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 20
68+
- name: Restore cached npm dependencies
69+
id: cache-dependencies-restore
70+
uses: actions/cache/restore@v4
71+
with:
72+
path: |
73+
node_modules
74+
~/.cache/Cypress # needed for the Cypress binary
75+
key: ${{ runner.os }}npm-dependencies-${{ hashFiles('package-lock.json') }}
76+
- run: npm ci
77+
- name: Cache npm dependencies
78+
id: cache-dependencies-save
79+
uses: actions/cache/save@v4
80+
with:
81+
path: |
82+
node_modules
83+
~/.cache/Cypress # needed for the Cypress binary
84+
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
85+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
86+
uses: nrwl/nx-set-shas@v4
87+
with:
88+
main-branch-name: "main"
89+
- name: Bump version
90+
run: |
91+
git config user.name 'Alex H'
92+
git config user.email '[email protected]'
93+
npx nx release --skip-publish
94+
shell: bash
95+
env:
96+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
NPM_CONFIG_PROVENANCE: true

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
types:
7+
- opened
8+
- synchronize
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
- name: Restore cached npm dependencies
21+
id: cache-dependencies-restore
22+
uses: actions/cache/restore@v4
23+
with:
24+
path: |
25+
node_modules
26+
~/.cache/Cypress # needed for the Cypress binary
27+
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package-lock.json') }}
28+
- run: npm ci
29+
- name: Cache npm dependencies
30+
id: cache-dependencies-save
31+
uses: actions/cache/save@v4
32+
with:
33+
path: |
34+
node_modules
35+
~/.cache/Cypress # needed for the Cypress binary
36+
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
37+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
38+
uses: nrwl/nx-set-shas@v4
39+
with:
40+
main-branch-name: "main"
41+
# This line is needed for nx affected to work when CI is running on a PR
42+
- run: git branch --track main origin/main
43+
- run: npx nx affected -t lint test build --parallel=3 --exclude='test-npm'
44+
# - run: npm nx affected -t e2e-ci --parallel=1
45+
# - run: npm nx affected -t deploy --no-agents

.github/workflows/publish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish
2+
3+
on:
4+
workflow_run:
5+
workflows: [ "Bump-version" ]
6+
types:
7+
- completed
8+
9+
jobs:
10+
test:
11+
name: Publish
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: "read"
15+
actions: "read"
16+
id-token: "write" # needed for provenance data generation
17+
timeout-minutes: 10
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
registry-url: https://registry.npmjs.org/
27+
- name: Restore cached npm dependencies
28+
id: cache-dependencies-restore
29+
uses: actions/cache/restore@v4
30+
with:
31+
path: |
32+
node_modules
33+
~/.cache/Cypress # needed for the Cypress binary
34+
key: ${{ runner.os }}npm-dependencies-${{ hashFiles('package-lock.json') }}
35+
- run: npm ci
36+
- name: Cache npm dependencies
37+
id: cache-dependencies-save
38+
uses: actions/cache/save@v4
39+
with:
40+
path: |
41+
node_modules
42+
~/.cache/Cypress # needed for the Cypress binary
43+
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
44+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
45+
uses: nrwl/nx-set-shas@v4
46+
with:
47+
main-branch-name: "main"
48+
- run: npx nx affected -t build --parallel=3 --exclude='test-npm' --base=origin/main~1 --head=origin/main
49+
- name: Publish packages
50+
run: npx nx release publish
51+
shell: bash
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
54+
NPM_CONFIG_PROVENANCE: true

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.nx/cache
42+
.angular

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
/.nx/cache
5+
.angular

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.verdaccio/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
logs:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

0 commit comments

Comments
 (0)