Update CI/CD, added dev dependencies
All checks were successful
Checks / build (push) Successful in 19s
All checks were successful
Checks / build (push) Successful in 19s
This commit is contained in:
parent
f106226e70
commit
546efcd2d0
8 changed files with 1524 additions and 6 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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
tags:
|
||||||
|
- "*.*.*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -17,9 +18,22 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
registry-url: ${{ vars.VERDACCIO_URL }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
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
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
@ -47,6 +61,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
registry-url: ${{ vars.VERDACCIO_URL }}
|
registry-url: ${{ vars.VERDACCIO_URL }}
|
||||||
|
env:
|
||||||
|
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||||
|
|
||||||
- name: Publish to NPM
|
- name: Publish to NPM
|
||||||
run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}
|
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 {
|
export interface IConicGradient {
|
||||||
type: "conic";
|
type: "conic";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@gxc-solutions/renderer-base",
|
"name": "@gxc-solutions/renderer-base",
|
||||||
"version": "0.0.3",
|
"version": "0.0.4",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "GXC Solutions",
|
"author": "GXC Solutions",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Descriptions
|
||||||
|
|
||||||
|
`@gxc-solutions/renderer-base` is a package with base interfaces and utils for frontend rendering implementation.
|
||||||
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": {
|
"scripts": {
|
||||||
"build": "npm run clean && tsc && npm run create-package",
|
"build": "npm run clean && tsc && npm run create-package",
|
||||||
"create-package": "node ./scripts/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": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
@ -14,6 +19,14 @@
|
||||||
"@gxc-solutions/math": "^0.0.1"
|
"@gxc-solutions/math": "^0.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"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",
|
"rimraf": "^6.0.1",
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^5.9.3"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue