mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
build: monorepo for themes
This commit is contained in:
parent
10d5efb402
commit
aa7f718aa8
5
.gitignore
vendored
5
.gitignore
vendored
@ -16,5 +16,6 @@ coverage
|
||||
/fonts
|
||||
/site
|
||||
/package
|
||||
/lib
|
||||
/es
|
||||
lib
|
||||
es
|
||||
*.tsbuildinfo
|
||||
|
@ -7,8 +7,8 @@
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"deprecated:build:icons": "npm run clean && node scripts/pre-build/deprecated-build-icons.js",
|
||||
"build:js": "npm run gen-version && npm run clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node scripts/post-build",
|
||||
"build:package": "npm run gen-version && npm run clean && node scripts/pre-build/deprecated-build-icons.js && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node scripts/post-build",
|
||||
"build:js": "npm run gen-version && npm run clean && tsc -b tsconfig.esm.json && tsc -b tsconfig.cjs.json && node scripts/post-build",
|
||||
"build:package": "npm run gen-version && npm run clean && node scripts/pre-build/deprecated-build-icons.js && tsc -b tsconfig.esm.json && tsc -b tsconfig.cjs.json && node scripts/post-build",
|
||||
"build:site": "npm run build:package && ./scripts/pre-build-site/pre-build-site.sh && node scripts/pre-build-site/restore-side-effects && cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 vite build && rm -rf node_modules/naive-ui && cp site/index.html site/404.html && node scripts/post-build-site/clear-side-effects",
|
||||
"clean": "rm -rf site lib es node_modules/naive-ui",
|
||||
"dev": "npm run clean && npm run gen-version && cross-env NODE_ENV=development vite",
|
||||
|
@ -1,9 +1,15 @@
|
||||
import type { Locale } from 'date-fns'
|
||||
import { enUS } from 'date-fns/locale'
|
||||
|
||||
const dateEnUs = {
|
||||
interface NDateLocale {
|
||||
name: string
|
||||
locale: Locale
|
||||
}
|
||||
|
||||
const dateEnUs: NDateLocale = {
|
||||
name: 'en-US',
|
||||
locale: enUS
|
||||
}
|
||||
|
||||
export type NDateLocale = typeof dateEnUs
|
||||
export { NDateLocale }
|
||||
export default dateEnUs
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { zhCN } from 'date-fns/locale'
|
||||
import { NDateLocale } from './enUS'
|
||||
|
||||
export default {
|
||||
const dateZhCN: NDateLocale = {
|
||||
name: 'zh-CN',
|
||||
locale: zhCN
|
||||
}
|
||||
|
||||
export default dateZhCN
|
||||
|
10
src/tsconfig.cjs.json
Normal file
10
src/tsconfig.cjs.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["./**/*.spec.*"],
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "../lib",
|
||||
"module": "CommonJS",
|
||||
"target": "ES6"
|
||||
}
|
||||
}
|
10
src/tsconfig.esm.json
Normal file
10
src/tsconfig.esm.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["./**/*.spec.*"],
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "../es",
|
||||
"module": "ES6",
|
||||
"target": "ES6"
|
||||
}
|
||||
}
|
@ -1,3 +1,11 @@
|
||||
{
|
||||
"name": "@naive-ui/tusimple-theme"
|
||||
"name": "@naive-ui/tusimple-theme",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
"version": "2.0.0-beta.5",
|
||||
"author": "07akioni",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"registry": "***REMOVED***"
|
||||
}
|
||||
}
|
1
themes/tusimple/src/index.ts
Normal file
1
themes/tusimple/src/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { default as TsConfigProvider } from './ts-config-provider'
|
12
themes/tusimple/tsconfig.cjs.json
Normal file
12
themes/tusimple/tsconfig.cjs.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"module": "CommonJS",
|
||||
"target": "ES6"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../src/tsconfig.cjs.json" }
|
||||
]
|
||||
}
|
12
themes/tusimple/tsconfig.esm.json
Normal file
12
themes/tusimple/tsconfig.esm.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./es",
|
||||
"module": "ES6",
|
||||
"target": "ES6"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../src/tsconfig.esm.json" }
|
||||
]
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["src/**/*.spec.ts"],
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"module": "CommonJS",
|
||||
"target": "ES6"
|
||||
}
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./src/tsconfig.cjs.json"
|
||||
},
|
||||
{
|
||||
"path": "./themes/tusimple/tsconfig.cjs.json"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["src/**/*.spec.ts"],
|
||||
"compilerOptions": {
|
||||
"outDir": "es",
|
||||
"module": "ES6",
|
||||
"target": "ES6"
|
||||
}
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./src/tsconfig.esm.json"
|
||||
},
|
||||
{
|
||||
"path": "./themes/tusimple/tsconfig.esm.json"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
"include": ["src/**/*"],
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"naive-ui": ["./src"]
|
||||
},
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"jsx": "react",
|
||||
@ -10,6 +12,7 @@
|
||||
"moduleResolution": "Node",
|
||||
"declaration": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"composite": true,
|
||||
"lib": [
|
||||
"ESNext",
|
||||
"DOM"
|
||||
|
Loading…
Reference in New Issue
Block a user