mirror of
https://github.com/idrawjs/idraw
synced 2026-05-23 17:48:23 +00:00
pkg: upgrade deps
This commit is contained in:
parent
ca3f83668d
commit
bfbe2012f2
5 changed files with 983 additions and 728 deletions
47
package.json
47
package.json
|
|
@ -6,13 +6,13 @@
|
|||
],
|
||||
"scripts": {
|
||||
"postinstall": "npm run build",
|
||||
"dev": "vite-node ./scripts/dev.ts",
|
||||
"dev:mod": "vite-node ./scripts/dev-mod.ts",
|
||||
"dev": "ts-node --project ./tsconfig.node.json ./scripts/dev.ts",
|
||||
"dev:mod": "ts-node --project ./tsconfig.node.json ./scripts/dev-mod.ts",
|
||||
"build": "npm run build:mod && npm run build:bundle && npm run build:min",
|
||||
"build:bundle": "vite-node ./scripts/build-bundle.ts",
|
||||
"build:mod": "vite-node ./scripts/build-module.ts",
|
||||
"build:min": "vite-node ./scripts/minify.ts",
|
||||
"snapshot": "npm run build:bundle && vite-node ./scripts/snapshot.ts",
|
||||
"build:bundle": "ts-node --project ./tsconfig.node.json ./scripts/build-bundle.ts",
|
||||
"build:mod": "ts-node --project ./tsconfig.node.json ./scripts/build-module.ts",
|
||||
"build:min": "ts-node --project ./tsconfig.node.json ./scripts/minify.ts",
|
||||
"snapshot": "npm run build:bundle && ts-node --project ./tsconfig.node.json ./scripts/snapshot.ts",
|
||||
"e2e": "jest --config jest.e2e.config.js",
|
||||
"clear": "rm -rf node_modules/ && rm -rf ./packages/*/dist/ && rm -rf ./packages/*/esm/ && rm -rf ./packages/*/node_modules/",
|
||||
"jest": "jest --config jest.config.js",
|
||||
|
|
@ -25,33 +25,33 @@
|
|||
"precommit": "npm run lint",
|
||||
"prepush": "npm run lint",
|
||||
"clear:jest": "rm -rf ./packages/*/__tests__/__snapshots__",
|
||||
"upgrade:version": "vite-node ./scripts/upgrade-version.ts && pnpm i"
|
||||
"upgrade:version": "ts-node --project ./tsconfig.node.json ./scripts/upgrade-version.ts && pnpm i"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.23.5",
|
||||
"@babel/preset-env": "^7.23.5",
|
||||
"@babel/core": "^7.23.9",
|
||||
"@babel/preset-env": "^7.23.9",
|
||||
"@babel/preset-typescript": "^7.23.3",
|
||||
"@rollup/plugin-json": "^6.0.1",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/koa-compose": "^3.2.8",
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/node": "^20.11.16",
|
||||
"@types/serve-handler": "^6.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
||||
"@typescript-eslint/parser": "^6.13.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"babel-jest": "^29.7.0",
|
||||
"canvas": "^2.11.2",
|
||||
"chalk": "^5.3.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"dotenv": "^16.4.1",
|
||||
"enquirer": "^2.4.1",
|
||||
"esbuild": "^0.19.9",
|
||||
"eslint": "^8.55.0",
|
||||
"esbuild": "^0.20.0",
|
||||
"eslint": "^8.56.0",
|
||||
"execa": "^8.0.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.3.10",
|
||||
"http-server": "^14.1.1",
|
||||
"husky": "^8.0.3",
|
||||
"husky": "^9.0.10",
|
||||
"jest": "^29.7.0",
|
||||
"jest-canvas-mock": "^2.5.2",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
|
|
@ -60,18 +60,17 @@
|
|||
"less": "^4.2.0",
|
||||
"pixelmatch": "^5.3.0",
|
||||
"pngjs": "^7.0.0",
|
||||
"puppeteer": "^21.6.0",
|
||||
"rollup": "^4.7.0",
|
||||
"puppeteer": "^22.0.0",
|
||||
"rollup": "^4.9.6",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"rollup-plugin-esbuild": "^6.1.0",
|
||||
"rollup-plugin-esbuild": "^6.1.1",
|
||||
"serve-handler": "^6.1.5",
|
||||
"terser": "^5.26.0",
|
||||
"terser": "^5.27.0",
|
||||
"ts-morph": "^21.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.7",
|
||||
"vite-node": "^1.0.4"
|
||||
"vite": "^5.0.12"
|
||||
},
|
||||
"__npminstall_done": false
|
||||
}
|
||||
|
|
|
|||
1639
pnpm-lock.yaml
1639
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,7 @@ import type { CompilerOptions } from 'ts-morph';
|
|||
import path from 'path';
|
||||
import * as glob from 'glob';
|
||||
import { packages } from './config';
|
||||
import { joinPackagePath, joinProjectPath } from './util/project';
|
||||
import { joinPackagePath } from './util/project';
|
||||
import { removeFullDir } from './util/file';
|
||||
|
||||
build();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import process from 'node:process';
|
||||
import * as dotenv from 'dotenv';
|
||||
import chalk from 'chalk';
|
||||
// import chalk from 'chalk';
|
||||
import { createServer } from 'vite';
|
||||
import pluginReact from '@vitejs/plugin-react';
|
||||
import type { UserConfig } from 'vite';
|
||||
|
|
@ -9,7 +9,7 @@ import { joinPackagePath } from './util/project';
|
|||
dotenv.config();
|
||||
|
||||
const pkgName = process.env.DEV_IDRAW_MODULE || 'idraw';
|
||||
console.log(chalk.green(`Dev package [${pkgName}]`));
|
||||
console.log(`Dev package [${pkgName}]`);
|
||||
|
||||
const openPage = '/dev/index.html';
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ async function dev() {
|
|||
server.printUrls();
|
||||
const { port, host = '127.0.0.1' } = server.config?.server || {};
|
||||
|
||||
console.log(`Open: ` + chalk.green(`http://${host}:${port}${openPage}`));
|
||||
console.log(`Open: ` + `http://${host}:${port}${openPage}`);
|
||||
}
|
||||
|
||||
function getViteConfig(): UserConfig {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
// @ts-nocheck
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import compose from 'koa-compose';
|
||||
|
|
@ -8,24 +9,12 @@ import { packages } from './config';
|
|||
async function main() {
|
||||
const tasks = [];
|
||||
packages.forEach((p) => {
|
||||
// @ts-ignore
|
||||
tasks.push(async (_ctx: any, next: any) => {
|
||||
const baseFileName = 'index.global.js';
|
||||
const targetFileName = 'index.global.min.js';
|
||||
const moduleBasePath = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'packages',
|
||||
p.dirName,
|
||||
'dist'
|
||||
);
|
||||
const moduleBasePath = path.join(__dirname, '..', 'packages', p.dirName, 'dist');
|
||||
|
||||
console.log(
|
||||
`minify file: ${path.join(p.dirName, baseFileName)} > ${path.join(
|
||||
p.dirName,
|
||||
targetFileName
|
||||
)}`
|
||||
);
|
||||
console.log(`minify file: ${path.join(p.dirName, baseFileName)} > ${path.join(p.dirName, targetFileName)}`);
|
||||
const filePath = path.join(moduleBasePath, baseFileName);
|
||||
const targetPath = path.join(moduleBasePath, targetFileName);
|
||||
const code = fs.readFileSync(filePath, { encoding: 'utf8' });
|
||||
|
|
|
|||
Loading…
Reference in a new issue