Skip to content

Commit

Permalink
Copy src json file to build outputs (#6172)
Browse files Browse the repository at this point in the history
* Copy src json file to build outputs

* changelog

* correct changelog
  • Loading branch information
chandlerprall authored Aug 24, 2022
1 parent 3da20f8 commit f349b2e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/compile-eui.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ function compileLib() {
});
});

// copy all JSON files to build outputs
glob('./src/**/*.json', undefined, (error, files) => {
files.forEach(file => {
const splitPath = file.split('/');
const basePath = splitPath.slice(2, splitPath.length).join('/');
shell.cp('-f', `${file}`, `es/${basePath}`);
shell.cp('-f', `${file}`, `optimize/es/${basePath}`);
shell.cp('-f', `${file}`, `lib/${basePath}`);
shell.cp('-f', `${file}`, `optimize/lib/${basePath}`);
shell.cp('-f', `${file}`, `test-env/${basePath}`);
});
});

console.log(chalk.green('✔ Finished compiling src/'));

// Use `tsc` to emit typescript declaration files for .ts files
Expand Down
3 changes: 3 additions & 0 deletions upcoming_changelogs/6172.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Updated the build process to include json files, fixing imports from the @elastic/eui package

0 comments on commit f349b2e

Please sign in to comment.