mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 09:36:43 +03:00
Use lerna run
to test only what was changed since master
This commit is contained in:
parent
dabc7d9b8e
commit
bd0ca28e95
|
@ -3,3 +3,10 @@ language: node_js
|
|||
node_js:
|
||||
- "lts/*"
|
||||
- "stable"
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- "node_modules"
|
||||
script:
|
||||
- npm run lint
|
||||
- npm test
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
"lerna": "3.4.2"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "node ./scripts/run-in-packages npm run lint",
|
||||
"test": "node ./scripts/run-in-packages npm run test"
|
||||
"lint": "lerna run lint --since master -- --color",
|
||||
"lint:all": "lerna run lint -- --color",
|
||||
"test": "lerna run test --since master -- --colors",
|
||||
"test:all": "lerna run test -- --colors"
|
||||
},
|
||||
"workspaces": [
|
||||
"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