2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-10 07:11:00 +00:00

chore: update library-builder to work on windows os

This commit is contained in:
Joaquín Sánchez Jiménez 2021-12-11 23:10:26 +01:00
parent 0cdd57c7c7
commit 5a22b751b4
2 changed files with 24 additions and 6 deletions

View File

@ -48,9 +48,11 @@ export async function buildFiles(params: BuildParams) {
// Build files with TypeScript compiler first to make sure there are no errors and to generate .d.ts files
if (typeof buildScript === 'string') {
console.log(`Executing npm script ${buildScript}...`)
await exec(root, 'npm', ['run', buildScript]);
} else {
await exec(root, 'tsc', ['-b']);
console.log('Executing tsc...')
await exec(root, process.platform === 'win32' ? 'tsc.cmd' : 'tsc', ['-b']);
}
// Build ES modules

View File

@ -120,6 +120,22 @@
"require": "./lib/index.js",
"import": "./lib/index.mjs"
},
"./lib/loader/custom": {
"require": "./lib/loader/custom.js",
"import": "./lib/loader/custom.mjs"
},
"./lib/loader/loaders": {
"require": "./lib/loader/loaders.js",
"import": "./lib/loader/loaders.mjs"
},
"./lib/loader/types": {
"require": "./lib/loader/types.js",
"import": "./lib/loader/types.mjs"
},
"./lib/loader/utils": {
"require": "./lib/loader/utils.js",
"import": "./lib/loader/utils.mjs"
},
"./lib/svg/build": {
"require": "./lib/svg/build.js",
"import": "./lib/svg/build.mjs"
@ -134,14 +150,14 @@
}
},
"dependencies": {
"@antfu/install-pkg": "^0.1.0",
"@antfu/utils": "^0.3.0",
"@antfu/install-pkg": "^0.1.0",
"@antfu/utils": "^0.3.0",
"@iconify/types": "^1.0.12",
"debug": "^4.3.3"
},
"debug": "^4.3.3"
},
"devDependencies": {
"@iconify/library-builder": "^1.0.4",
"@types/debug": "^4.1.7",
"@types/debug": "^4.1.7",
"@types/jest": "^27.0.1",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"cross-env": "^7.0.3",