mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-07 23:20:46 +03:00
Use lerna run
to test only what was changed since master
This commit is contained in:
parent
57ce2abc4e
commit
ba265e453e
|
@ -3,3 +3,10 @@ language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "lts/*"
|
- "lts/*"
|
||||||
- "stable"
|
- "stable"
|
||||||
|
cache:
|
||||||
|
yarn: true
|
||||||
|
directories:
|
||||||
|
- "node_modules"
|
||||||
|
script:
|
||||||
|
- npm run lint
|
||||||
|
- npm test
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
"lerna": "3.4.2"
|
"lerna": "3.4.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "node ./scripts/run-in-packages npm run lint",
|
"lint": "lerna run lint --since master -- --color",
|
||||||
"test": "node ./scripts/run-in-packages npm run test"
|
"lint:all": "lerna run lint -- --color",
|
||||||
|
"test": "lerna run test --since master -- --colors",
|
||||||
|
"test:all": "lerna run test -- --colors"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
const path = require("path");
|
|
||||||
const { readdirSync, statSync } = require('fs');
|
|
||||||
const { execSync } = require("child_process");
|
|
||||||
|
|
||||||
const execArgs = { stdio: "inherit", env: process.env };
|
|
||||||
const command = process.argv.slice(2).join(' ');
|
|
||||||
|
|
||||||
const getDirectories = srcPath => readdirSync(srcPath)
|
|
||||||
.filter(file => statSync(path.join(srcPath, file)).isDirectory());
|
|
||||||
|
|
||||||
if (!command) {
|
|
||||||
console.error('No command specified.')
|
|
||||||
} else {
|
|
||||||
const cwd = process.cwd();
|
|
||||||
getDirectories('packages').forEach(packageName => {
|
|
||||||
console.log(packageName, path.resolve(__dirname, "../packages/" + packageName));
|
|
||||||
process.chdir(path.resolve(__dirname, "../packages/" + packageName));
|
|
||||||
execSync(command, execArgs);
|
|
||||||
});
|
|
||||||
process.chdir(cwd);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user