updated build pipeline

This commit is contained in:
2024-09-20 10:29:57 +05:30
parent 87b8e4e942
commit 6aced4144a
5 changed files with 24750 additions and 17 deletions

View File

@@ -5,6 +5,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
rm -rf build
# Quality check
npx tsc
# Generate Styles (with unneeded js)
# vite build --config vite-css.config.ts

24706
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,9 @@
"version": "0.0.47",
"type": "module",
"author": "Armco (@restruct-corporate-advantage)",
"types": "build/es/index.d.ts",
"main": "build/cjs/index.js",
"module": "build/es/index.js",
"scripts": {
"build": "./build-tools/build.sh",
"build:publish": "./scripts/build.sh",
@@ -17,7 +20,8 @@
"publish:public": "./scripts/publish.sh"
},
"dependencies": {
"@armco/utils": "^0.0.0",
"@armco/types": "^0.0.9",
"@armco/utils": "^0.0.6",
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.0",
"classnames": "^2.3.2",
@@ -40,11 +44,9 @@
"react-table": "^7.8.0",
"resize-observer-polyfill": "^1.5.1",
"svgpath": "^2.6.0",
"uuid": "^9.0.0",
"vite-plugin-svgr": "^3.2.0"
"uuid": "^9.0.0"
},
"devDependencies": {
"@armco/types": "^0.0.6",
"@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
@@ -55,13 +57,14 @@
"@types/bootstrap": "^5.2.6",
"@types/d3": "^7.4.0",
"@types/js-cookie": "^3.0.3",
"@types/node": "^22.5.5",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.2.18",
"@types/react-resizable": "^3.0.7",
"@types/react-table": "^7.7.19",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/uuid": "^9.0.2",
"@vitejs/plugin-react": "^4.0.0",
"@vitejs/plugin-react": "^4.3.1",
"chalk": "^5.3.0",
"cherry-pick": "^0.5.0",
"cpy-cli": "^5.0.0",
@@ -71,7 +74,7 @@
"eslint-plugin-storybook": "^0.6.12",
"execa": "^8.0.1",
"fs-extra": "^11.2.0",
"glob": "^10.3.10",
"glob": "^10.4.5",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^21.1.0",
@@ -88,7 +91,8 @@
"ts-node": "^10.9.2",
"typescript": "^5.0.2",
"vite": "^4.0.0",
"vite-plugin-dts": "^3.7.1",
"vite-plugin-dts": "^4.2.1",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^0.30.1"
},
"peerDependencies": {
@@ -114,9 +118,6 @@
}
},
"prettier": "prettier-config-nick",
"types": "build/es/index.d.ts",
"main": "build/cjs/index.js",
"module": "build/es/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/ReStruct-Corporate-Advantage/armory-react-components.git"

View File

@@ -1,4 +1,27 @@
{
"extends": "../../tsconfig.json",
"include": ["src"],
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"outDir": "build",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
}

View File

@@ -1,6 +1,6 @@
import { defineConfig } from "vitest/config"
import path from "path"
import glob from "glob"
import { resolve } from "path"
import { glob } from "glob"
import react from "@vitejs/plugin-react"
import svgr from "vite-plugin-svgr"
import dts from "vite-plugin-dts"
@@ -10,17 +10,17 @@ export default defineConfig({
plugins: [react(), svgr(), dts({ outDir: "build/types" })],
resolve: {
alias: {
"~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
"~bootstrap": resolve(__dirname, "node_modules/bootstrap"),
},
},
build: {
outDir: "build",
lib: {
entry: glob.sync(resolve(__dirname, "src/**/*.ts"))
entry: glob.sync(resolve(__dirname, "src/**/*.{ts,tsx}")),
},
rollupOptions: {
treeshake: true,
external: ["react", "react/jsx-runtime", "react-dom", "moment"],
external: ["react", "react/jsx-runtime", "react-dom"],
output: [
{
format: "es",