This commit is contained in:
commit
22fa4c6df4
18 changed files with 1511 additions and 0 deletions
16
.editorconfig
Normal file
16
.editorconfig
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Editor configuration, see https://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.ts]
|
||||||
|
quote_type = single
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = off
|
||||||
|
trim_trailing_whitespace = false
|
||||||
66
.forgejo/workflows/ci.yml
Normal file
66
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [docker]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Prettier
|
||||||
|
run: npm run prettier:check
|
||||||
|
|
||||||
|
- name: ES Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: lib-${{ github.sha }}
|
||||||
|
path: ./dist/
|
||||||
|
|
||||||
|
# Uncomment if you need deploy
|
||||||
|
|
||||||
|
# deploy:
|
||||||
|
# needs: build
|
||||||
|
# runs-on: [docker]
|
||||||
|
# environment: production
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: Download artifact
|
||||||
|
# uses: actions/download-artifact@v3
|
||||||
|
# with:
|
||||||
|
# name: lib-${{ github.sha }}
|
||||||
|
# path: ./artifact
|
||||||
|
|
||||||
|
# - name: Setup Node.js
|
||||||
|
# uses: actions/setup-node@v4
|
||||||
|
# with:
|
||||||
|
# node-version: '20'
|
||||||
|
# registry-url: ${{ vars.VERDACCIO_URL }}
|
||||||
|
|
||||||
|
# - name: Publish to NPM
|
||||||
|
# run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}
|
||||||
|
# env:
|
||||||
|
# VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
|
||||||
|
# NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||||
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Compiled output
|
||||||
|
/dist
|
||||||
|
/tmp
|
||||||
|
/out-tsc
|
||||||
|
/bazel-out
|
||||||
|
|
||||||
|
# Node
|
||||||
|
**/node_modules
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
.idea/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.history/*
|
||||||
|
|
||||||
|
# System files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
playground/gxc-canvas-viewer/**/*.*
|
||||||
2
.husky/pre-commit
Normal file
2
.husky/pre-commit
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
npm run lint
|
||||||
|
npm run prettier:check
|
||||||
1
.npmrc
Normal file
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
regestry=https://npm.gxc-solutions.ru/
|
||||||
19
.prettierignore
Normal file
19
.prettierignore
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
## file extensions
|
||||||
|
*.*
|
||||||
|
!*.scss
|
||||||
|
!*.css
|
||||||
|
!*.js
|
||||||
|
!*.json
|
||||||
|
!*.jsx
|
||||||
|
!*.less
|
||||||
|
!*.md
|
||||||
|
!*.mdx
|
||||||
|
!*.ts
|
||||||
|
!*.tsx
|
||||||
|
!*.yml
|
||||||
|
|
||||||
|
# ignore
|
||||||
|
node_modules/**/*.*
|
||||||
|
documentation/**/*.*
|
||||||
|
dist/**/*.*
|
||||||
|
coverage/**/*.*
|
||||||
9
.prettierrc
Normal file
9
.prettierrc
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"printWidth": 140,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": false,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
||||||
0
lib/src/constants/index.ts
Normal file
0
lib/src/constants/index.ts
Normal file
0
lib/src/index.ts
Normal file
0
lib/src/index.ts
Normal file
0
lib/src/interfaces/index.ts
Normal file
0
lib/src/interfaces/index.ts
Normal file
10
lib/src/package.json
Normal file
10
lib/src/package.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"name": "@gxc-solutions/lib",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "GXC Solutions",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"registry": "https://npm.gxc-solutions.ru"
|
||||||
|
}
|
||||||
|
}
|
||||||
0
lib/src/readme.md
Normal file
0
lib/src/readme.md
Normal file
1303
package-lock.json
generated
Normal file
1303
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
26
package.json
Normal file
26
package.json
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "template-of-lib-repo",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "npm run clean && tsc && npm run create-package",
|
||||||
|
"create-package": "node ./scripts/create-package",
|
||||||
|
"clean": "rimraf dist",
|
||||||
|
"prettier:check": "prettier --check \"./lib/src/**/*.*\"",
|
||||||
|
"prettier:fix": "prettier --write \"./lib/src/**/*.*\"",
|
||||||
|
"lint": "eslint lib/src/**/*.ts",
|
||||||
|
"prepare": "husky",
|
||||||
|
"test": "echo test"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"description": "",
|
||||||
|
"devDependencies": {
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
||||||
|
"eslint": "^10.0.2",
|
||||||
|
"husky": "^9.1.7",
|
||||||
|
"prettier": "^3.8.1",
|
||||||
|
"rimraf": "^6.0.1",
|
||||||
|
"typescript": "^5.9.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
0
playground/.gitkeep
Normal file
0
playground/.gitkeep
Normal file
0
readme.md
Normal file
0
readme.md
Normal file
5
scripts/create-package.js
Normal file
5
scripts/create-package.js
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
// Copy base files
|
||||||
|
fs.copyFileSync("./lib/src/package.json", "./dist/package.json");
|
||||||
|
fs.copyFileSync("./lib/src/readme.md", "./dist/readme.md");
|
||||||
21
tsconfig.json
Normal file
21
tsconfig.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"strict": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": ["dom", "ES2022"],
|
||||||
|
"module": "ES2022",
|
||||||
|
"declaration": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"experimentalDecorators": false,
|
||||||
|
"strictNullChecks": false,
|
||||||
|
"outDir": "./dist"
|
||||||
|
},
|
||||||
|
"include": ["./lib/src/**/*"],
|
||||||
|
"exclude": ["src/**/*.test.ts"]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue