generated from gxc-solutions/gxc-template-repo
Initial commit
This commit is contained in:
commit
0e7cb83ff0
20 changed files with 1812 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
|
||||
34
.forgejo/workflows/checks.yml
Normal file
34
.forgejo/workflows/checks.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
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
|
||||
|
||||
65
.forgejo/workflows/release.yml
Normal file
65
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*.*"
|
||||
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: gxc-math-${{ github.sha }}
|
||||
path: ./dist/
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: [docker]
|
||||
environment: production
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: gxc-math-${{ 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"
|
||||
}
|
||||
39
eslint.config.mjs
Normal file
39
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import { defineConfig } from "eslint/config";
|
||||
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
||||
import globals from "globals";
|
||||
import tsParser from "@typescript-eslint/parser";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import js from "@eslint/js";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
});
|
||||
|
||||
export default defineConfig([{
|
||||
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
||||
|
||||
plugins: {
|
||||
"@typescript-eslint": typescriptEslint,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
|
||||
parser: tsParser,
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
},
|
||||
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"no-prototype-builtins": "off",
|
||||
},
|
||||
}]);
|
||||
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
1529
package-lock.json
generated
Normal file
1529
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
29
package.json
Normal file
29
package.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"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": {
|
||||
"@eslint/eslintrc": "^3.3.4",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
||||
"eslint": "^10.0.2",
|
||||
"globals": "^17.4.0",
|
||||
"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