mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[kbn/pm] Get rid of --skip-kibana
in favour of --exclude kibana
. (#17684)
This commit is contained in:
parent
39729fc648
commit
35e01f288f
7 changed files with 38 additions and 25 deletions
|
@ -111,6 +111,12 @@ skipping parts of this, e.g. to skip bootstrapping of Kibana plugins:
|
|||
yarn kbn bootstrap --skip-kibana-extra
|
||||
```
|
||||
|
||||
Or just skip few selected packages:
|
||||
|
||||
```
|
||||
yarn kbn bootstrap --exclude @kbn/pm --exclude @kbn/datemath
|
||||
```
|
||||
|
||||
For more details, run:
|
||||
|
||||
```
|
||||
|
@ -131,12 +137,31 @@ yarn kbn run build
|
|||
```
|
||||
|
||||
And if needed, you can skip packages in the same way as for bootstrapping, e.g.
|
||||
`--skip-kibana` and `--skip-kibana-extra`:
|
||||
with `--exclude` and `--skip-kibana-extra`:
|
||||
|
||||
```
|
||||
yarn kbn run build --skip-kibana
|
||||
yarn kbn run build --exclude kibana
|
||||
```
|
||||
|
||||
### Watching
|
||||
|
||||
During development you can also use `kbn` to watch for changes. For this to work
|
||||
package should define `kbn:watch` script in the `package.json`:
|
||||
|
||||
```
|
||||
yarn kbn watch
|
||||
```
|
||||
|
||||
By default `kbn watch` will sort all packages within Kibana into batches based on
|
||||
their mutual dependencies and run watch script for all packages in the correct order.
|
||||
|
||||
As with any other `kbn` command, you can use `--include` and `--exclude` filters to watch
|
||||
only for a selected packages:
|
||||
|
||||
```
|
||||
yarn kbn watch --include @kbn/pm --include kibana
|
||||
```
|
||||
|
||||
## Building packages for production
|
||||
|
||||
The production build process relies on both the Grunt setup at the root of the
|
||||
|
|
7
packages/kbn-pm/dist/index.js
vendored
7
packages/kbn-pm/dist/index.js
vendored
|
@ -36109,11 +36109,7 @@ var _path = __webpack_require__(3);
|
|||
*/
|
||||
function getProjectPaths(rootPath, options) {
|
||||
const skipKibanaExtra = Boolean(options['skip-kibana-extra']);
|
||||
const skipKibana = Boolean(options['skip-kibana']);
|
||||
const projectPaths = [(0, _path.resolve)(rootPath, 'packages/*')];
|
||||
if (!skipKibana) {
|
||||
projectPaths.push(rootPath);
|
||||
}
|
||||
const projectPaths = [rootPath, (0, _path.resolve)(rootPath, 'packages/*')];
|
||||
if (!skipKibanaExtra) {
|
||||
projectPaths.push((0, _path.resolve)(rootPath, '../kibana-extra/*'));
|
||||
projectPaths.push((0, _path.resolve)(rootPath, '../kibana-extra/*/packages/*'));
|
||||
|
@ -36329,7 +36325,6 @@ function help() {
|
|||
|
||||
-e, --exclude Exclude specified project. Can be specified multiple times to exclude multiple projects, e.g. '-e kibana -e @kbn/pm'.
|
||||
-i, --include Include only specified projects. If left unspecified, it defaults to including all projects.
|
||||
--skip-kibana Do not include the root Kibana project when running command.
|
||||
--skip-kibana-extra Filter all plugins in ../kibana-extra when running command.
|
||||
`);
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ Object {
|
|||
},
|
||||
"projects": Array [
|
||||
"bar",
|
||||
"kibana",
|
||||
"with-additional-projects",
|
||||
"baz",
|
||||
"kibana",
|
||||
"quux",
|
||||
"with-additional-projects",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
@ -33,8 +33,8 @@ Object {
|
|||
},
|
||||
"projects": Array [
|
||||
"kibana",
|
||||
"with-additional-projects",
|
||||
"quux",
|
||||
"with-additional-projects",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
@ -52,8 +52,8 @@ Object {
|
|||
},
|
||||
"projects": Array [
|
||||
"bar",
|
||||
"foo",
|
||||
"baz",
|
||||
"foo",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
@ -90,11 +90,11 @@ Object {
|
|||
},
|
||||
"projects": Array [
|
||||
"bar",
|
||||
"baz",
|
||||
"foo",
|
||||
"kibana",
|
||||
"with-additional-projects",
|
||||
"baz",
|
||||
"quux",
|
||||
"with-additional-projects",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
@ -106,8 +106,8 @@ Object {
|
|||
"foo": Array [],
|
||||
},
|
||||
"projects": Array [
|
||||
"foo",
|
||||
"baz",
|
||||
"foo",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -25,7 +25,6 @@ function help() {
|
|||
|
||||
-e, --exclude Exclude specified project. Can be specified multiple times to exclude multiple projects, e.g. '-e kibana -e @kbn/pm'.
|
||||
-i, --include Include only specified projects. If left unspecified, it defaults to including all projects.
|
||||
--skip-kibana Do not include the root Kibana project when running command.
|
||||
--skip-kibana-extra Filter all plugins in ../kibana-extra when running command.
|
||||
`);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import { resolve } from 'path';
|
|||
|
||||
export type ProjectPathOptions = {
|
||||
'skip-kibana-extra'?: boolean;
|
||||
'skip-kibana'?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -10,13 +9,8 @@ export type ProjectPathOptions = {
|
|||
*/
|
||||
export function getProjectPaths(rootPath: string, options: ProjectPathOptions) {
|
||||
const skipKibanaExtra = Boolean(options['skip-kibana-extra']);
|
||||
const skipKibana = Boolean(options['skip-kibana']);
|
||||
|
||||
const projectPaths = [resolve(rootPath, 'packages/*')];
|
||||
|
||||
if (!skipKibana) {
|
||||
projectPaths.push(rootPath);
|
||||
}
|
||||
const projectPaths = [rootPath, resolve(rootPath, 'packages/*')];
|
||||
|
||||
if (!skipKibanaExtra) {
|
||||
projectPaths.push(resolve(rootPath, '../kibana-extra/*'));
|
||||
|
|
|
@ -10,7 +10,7 @@ function getExpectedProjectsAndGraph(runMock: any) {
|
|||
any
|
||||
>).mock.calls[0];
|
||||
|
||||
const projects = [...fullProjects.keys()];
|
||||
const projects = [...fullProjects.keys()].sort();
|
||||
|
||||
const graph = [...fullProjectGraph.entries()].reduce(
|
||||
(expected, [projectName, dependencies]) => {
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = function (grunt) {
|
|||
function runProjectsTests() {
|
||||
const serverCmd = {
|
||||
cmd: 'yarn',
|
||||
args: ['kbn', 'run', 'test', '--skip-kibana', '--skip-kibana-extra'],
|
||||
args: ['kbn', 'run', 'test', '--exclude', 'kibana', '--skip-kibana-extra'],
|
||||
opts: { stdio: 'inherit' }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue