mirror of
https://github.com/iconify/iconify.git
synced 2025-01-06 07:20:40 +00:00
Build packages after installing them with monorepo script
This commit is contained in:
parent
2b61d19375
commit
8eb348b3a9
@ -20,7 +20,8 @@
|
||||
"build:lib": "tsc -b",
|
||||
"build:rollup": "rollup -c rollup.config.js",
|
||||
"build:api": "api-extractor run --local --verbose --config api-extractor.json",
|
||||
"build:cleanup": "node cleanup"
|
||||
"build:cleanup": "node cleanup",
|
||||
"monorepo:postinstall": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/core": "^1.3.2",
|
||||
|
@ -21,6 +21,7 @@
|
||||
"prebuild:api": "api-extractor run --local --verbose --config api-extractor.offline.json",
|
||||
"build:api": "api-extractor run --local --verbose --config api-extractor.iconify.json",
|
||||
"build:cleanup": "node cleanup",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test": "jest --runInBand"
|
||||
},
|
||||
"main": "dist/iconify.js",
|
||||
|
@ -23,6 +23,7 @@
|
||||
"build:tsc": "tsc -b",
|
||||
"build:bundles": "rollup -c rollup.config.js",
|
||||
"build:api": "node build --only-api",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test": "jest --runInBand"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -25,6 +25,7 @@
|
||||
"build:dist": "rollup -c rollup.config.js",
|
||||
"build:api": "api-extractor run --local --verbose",
|
||||
"build:api2": "api-extractor run --local --verbose --config api-extractor.without-api.json",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test:jest": "jest --runInBand",
|
||||
"test:mjs": "cross-env NODE_OPTIONS=--experimental-vm-modules node tests/import-test.mjs",
|
||||
"test": "npm run test:jest && npm run test:mjs"
|
||||
|
@ -18,6 +18,7 @@
|
||||
"build:dist": "rollup -c rollup.config.js",
|
||||
"prebuild:api": "api-extractor run --local --verbose --config api-extractor.offline.json",
|
||||
"build:api": "api-extractor run --local --verbose --config api-extractor.iconify.json",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test": "vitest"
|
||||
},
|
||||
"main": "dist/iconify.js",
|
||||
|
@ -18,6 +18,7 @@
|
||||
"build:dist": "rollup -c rollup.config.js",
|
||||
"prebuild:api": "api-extractor run --local --verbose --config api-extractor.offline.json",
|
||||
"build:api": "api-extractor run --local --verbose --config api-extractor.iconify.json",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test": "jest --runInBand"
|
||||
},
|
||||
"main": "dist/iconify.js",
|
||||
|
@ -24,6 +24,7 @@
|
||||
"build:api": "api-extractor run --local --verbose",
|
||||
"build:lib": "tsc -b",
|
||||
"build:dist": "rollup -c rollup.config.js",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test:jest": "jest --runInBand",
|
||||
"test:mjs": "cross-env NODE_OPTIONS=--experimental-vm-modules node tests/import-test.mjs",
|
||||
"test": "npm run test:jest && npm run test:mjs"
|
||||
|
@ -16,6 +16,7 @@
|
||||
"clean": "rimraf lib dist tsconfig.tsbuildinfo",
|
||||
"prebuild": "npm run clean",
|
||||
"build": "tsup",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test": "vitest --config vitest.config.mjs"
|
||||
},
|
||||
"main": "dist/iconify.js",
|
||||
|
@ -16,7 +16,8 @@
|
||||
"scripts": {
|
||||
"clean": "rimraf lib dist tsconfig.tsbuildinfo",
|
||||
"prebuild": "npm run clean",
|
||||
"build": "tsc -b"
|
||||
"build": "tsc -b",
|
||||
"monorepo:postinstall": "npm run build"
|
||||
},
|
||||
"main": "dist/iconify.jsx",
|
||||
"types": "dist/iconify.d.ts",
|
||||
|
@ -29,7 +29,7 @@ function getNPMCommand() {
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
throw new Error('Cannot execute NPM commands')
|
||||
throw new Error('Cannot execute NPM commands');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,12 +19,27 @@ const actionFunctions: Record<string, () => void> = {
|
||||
clean: () => {
|
||||
runAction('Removing node_modules', cleanWorkspace);
|
||||
},
|
||||
install: () => {
|
||||
reinstall: () => {
|
||||
runAction('Installing dependencies', (workspace) => {
|
||||
runNPMCommand(workspace, ['install']);
|
||||
addLinksToWorkspace(workspace);
|
||||
});
|
||||
},
|
||||
install: () => {
|
||||
runAction(
|
||||
'Installing dependencies and building packages',
|
||||
(workspace) => {
|
||||
if (workspace.scripts.indexOf('monorepo:preinstall') !== -1) {
|
||||
runNPMCommand(workspace, ['run', 'monorepo:preinstall']);
|
||||
}
|
||||
runNPMCommand(workspace, ['install']);
|
||||
addLinksToWorkspace(workspace);
|
||||
if (workspace.scripts.indexOf('monorepo:postinstall') !== -1) {
|
||||
runNPMCommand(workspace, ['run', 'monorepo:postinstall']);
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
versions: () => {
|
||||
runAction('Updating versions of local packages', updateVersions);
|
||||
},
|
||||
|
@ -16,7 +16,7 @@
|
||||
"clean": "node monorepo clean",
|
||||
"link": "node monorepo link",
|
||||
"unlink": "node monorepo unlink",
|
||||
"reinstall": "node monorepo clean install",
|
||||
"reinstall": "node monorepo clean reinstall",
|
||||
"build": "node monorepo run build --if-present --public",
|
||||
"test": "node monorepo run build --if-present --public",
|
||||
"versions": "node monorepo versions"
|
||||
|
@ -18,6 +18,7 @@
|
||||
"lint": "eslint src/*.ts",
|
||||
"prebuild": "npm run lint",
|
||||
"build": "tsup src/index.ts --dts --format esm,cjs",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test:jest": "jest --runInBand",
|
||||
"test:jasmine": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jasmine",
|
||||
"test": "npm run test:jest && npm run test:jasmine"
|
||||
|
@ -17,6 +17,7 @@
|
||||
"lint": "eslint --fix src/**/*.ts",
|
||||
"prebuild": "npm run lint && npm run clean",
|
||||
"build": "unbuild",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test:jest-cjs": "jest --clearCache --config=jest.config.cjs && jest --runInBand --config=jest.config.cjs",
|
||||
"test:jest-esm": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --clearCache --config=jest.config.mjs && cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --runInBand --config=jest.config.mjs",
|
||||
"test": "npm run test:jest-cjs && npm run test:jest-esm",
|
||||
|
@ -17,6 +17,7 @@
|
||||
"lint": "eslint --fix src/**/*.ts",
|
||||
"prebuild": "npm run lint && npm run clean",
|
||||
"build": "unbuild",
|
||||
"monorepo:postinstall": "npm run build",
|
||||
"test:jest-cjs": "jest --clearCache --config=jest.config.cjs && jest --runInBand --config=jest.config.cjs",
|
||||
"test:jest-esm": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --clearCache --config=jest.config.mjs && cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --runInBand --config=jest.config.mjs",
|
||||
"test": "npm run test:jest-cjs && npm run test:jest-esm",
|
||||
|
Loading…
Reference in New Issue
Block a user