This commit is contained in:
parent
f106226e70
commit
6bea046c14
6 changed files with 1515 additions and 4 deletions
39
.forgejo/workflows/checks.yml
Normal file
39
.forgejo/workflows/checks.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Checks
|
||||
|
||||
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@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: ${{ vars.VERDACCIO_URL }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --registry ${{ vars.VERDACCIO_URL }}
|
||||
env:
|
||||
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
||||
- 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
|
||||
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
name: CI
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags:
|
||||
- "*.*.*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -21,6 +22,15 @@ jobs:
|
|||
- 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
|
||||
|
||||
|
|
@ -47,6 +57,9 @@ jobs:
|
|||
with:
|
||||
node-version: '20'
|
||||
registry-url: ${{ vars.VERDACCIO_URL }}
|
||||
env:
|
||||
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
||||
- name: Publish to NPM
|
||||
run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}
|
||||
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",
|
||||
},
|
||||
}]);
|
||||
|
|
@ -37,4 +37,3 @@ export interface IRadialGradient {
|
|||
export interface IConicGradient {
|
||||
type: "conic";
|
||||
}
|
||||
|
||||
|
|
|
|||
1408
package-lock.json
generated
1408
package-lock.json
generated
File diff suppressed because it is too large
Load diff
15
package.json
15
package.json
|
|
@ -5,7 +5,12 @@
|
|||
"scripts": {
|
||||
"build": "npm run clean && tsc && npm run create-package",
|
||||
"create-package": "node ./scripts/create-package",
|
||||
"clean": "rimraf dist"
|
||||
"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",
|
||||
|
|
@ -14,6 +19,14 @@
|
|||
"@gxc-solutions/math": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.4",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@types/node": "^25.3.3",
|
||||
"@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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue