[inula][inula-intl][inula-router][inula-request]<feat> 构建方式适配 monorepo
This commit is contained in:
parent
f129119610
commit
43659e3d2d
|
@ -23,7 +23,7 @@
|
|||
"author": "",
|
||||
"license": "MulanPSL2",
|
||||
"peerDependencies": {
|
||||
"inulajs": "^0.0.12"
|
||||
"openinula": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.21.3",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"homepage": "",
|
||||
"bugs": "",
|
||||
"license": "MulanPSL2",
|
||||
"main": "index.js",
|
||||
"main": "./build/index.js",
|
||||
"repository": {},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
@ -23,5 +23,6 @@
|
|||
"test": "jest --config=jest.config.js",
|
||||
"watch-test": "yarn test --watch --dev"
|
||||
},
|
||||
"types": "@types/index.d.ts"
|
||||
"files": ["build/@types", "build/cjs", "build/umd", "build/index.js", "build/jsx-dev-runtime.js", "build/jsx-runtime.js"],
|
||||
"types": "./build/@types/index.d.ts"
|
||||
}
|
||||
|
|
|
@ -53,12 +53,12 @@ export function cleanUp(folders) {
|
|||
|
||||
function buildTypeConfig() {
|
||||
return {
|
||||
input: ['./build/inula/@types/index.d.ts'],
|
||||
input: ['./build/@types/index.d.ts'],
|
||||
output: {
|
||||
file: './build/inula/@types/index.d.ts',
|
||||
file: './build/@types/index.d.ts',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [dts(), cleanUp(['./build/inula/@types/'])],
|
||||
plugins: [dts(), cleanUp(['./build/@types/'])],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ const extensions = ['.js', '.ts'];
|
|||
|
||||
const libDir = path.join(__dirname, '../..');
|
||||
const rootDir = path.join(__dirname, '../..');
|
||||
const outDir = path.join(rootDir, 'build', 'inula');
|
||||
const outDir = path.join(rootDir, 'build');
|
||||
|
||||
if (!fs.existsSync(path.join(rootDir, 'build'))) {
|
||||
fs.mkdirSync(path.join(rootDir, 'build'));
|
||||
|
@ -95,11 +95,7 @@ function genConfig(mode) {
|
|||
{
|
||||
from: path.join(libDir, '/npm/index.js'),
|
||||
to: path.join(outDir, 'index.js'),
|
||||
},
|
||||
{
|
||||
from: path.join(libDir, 'package.json'),
|
||||
to: path.join(outDir, 'package.json'),
|
||||
},
|
||||
}
|
||||
]),
|
||||
],
|
||||
};
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"declarationDir": "./build/inula/@types"
|
||||
"declarationDir": "./build/@types"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue