Skip to content

Commit

Permalink
Continues using workspaces for install
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Mar 15, 2019
1 parent d839f5b commit 1f2309c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions x-pack/tasks/build.js
Expand Up @@ -6,8 +6,7 @@

import del from 'del';
import { resolve } from 'path';
import { writeFileSync, readFileSync } from 'fs';
import { getProjects, getProjectPaths } from '@kbn/pm';
import { writeFileSync } from 'fs';
import pluginHelpers from '@kbn/plugin-helpers';
import { ToolingLog } from '@kbn/dev-utils';
import { generateNoticeFromSource } from '../../src/dev';
Expand Down Expand Up @@ -56,21 +55,5 @@ export default (gulp, { buildTarget }) => {
directory: buildRoot
})
);

// removes Kibana packages to allow for installation of dependencies
// which are not included in the Yarn workspace
const kibanaRoot = resolve(__dirname, '../..');
const projectPaths = getProjectPaths(kibanaRoot);
const projects = await getProjects(kibanaRoot, projectPaths);
const pkg = JSON.parse(readFileSync(resolve(buildRoot, 'package.json')));

pkg.dependencies = Object.keys(pkg.dependencies)
.filter((d) => !projects.has(d))
.reduce((obj, d) => {
obj[d] = pkg.dependencies[d];
return obj;
}, {});

writeFileSync(resolve(buildRoot, 'package.json'), JSON.stringify(pkg, null, 2));
});
};

0 comments on commit 1f2309c

Please sign in to comment.