Skip to content

Commit

Permalink
fix(documentation): copy brand-theme without node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Sep 5, 2022
1 parent 0426fa2 commit c86c841
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/documentation/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2015
"ecmaVersion": 11
}
}
2 changes: 1 addition & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"rimraf": "rimraf ./static/webcomponent-examples/lib/ix && rimraf ./static/webcomponent-examples/lib/core-ui-icons && rimraf ./static/webcomponent-examples/lib/ix-aggrid",
"rimraf": "rimraf ./static/webcomponent-examples/lib/ix && rimraf ./static/webcomponent-examples/lib/ix-brand-theme && rimraf ./static/webcomponent-examples/lib/core-ui-icons && rimraf ./static/webcomponent-examples/lib/ix-aggrid",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
Expand Down
21 changes: 14 additions & 7 deletions packages/documentation/scripts/copy-webcomponents.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const ix_dest_path = path.join(libDestPath, 'ix');

const ix_brand_theme_path = path.join(
__dirname,
'../../node_modules/',
'../../',
'node_modules',
'@siemens/ix-brand-theme'
);
const ix_brand_theme_dest_path = path.join(libDestPath, 'ix-brand-theme');
Expand All @@ -37,9 +38,15 @@ function filter(fileName) {
return !fileName.includes('node_modules');
}

Promise.all([
fsExtra.copy(ix_path, ix_dest_path, { filter }),
fsExtra.copy(ix_aggrid_path, ix_aggrid_dest_path, { filter }),
fsExtra.copy(icon_path, icon_dest_path),
fsExtra.copy(ix_brand_theme_path, ix_brand_theme_dest_path, { filter }),
]);
(async () => {
console.log('Start copy');
await Promise.all([
fsExtra.copy(ix_path, ix_dest_path, { filter }),
fsExtra.copy(ix_aggrid_path, ix_aggrid_dest_path, { filter }),
fsExtra.copy(icon_path, icon_dest_path),
fsExtra.copy(ix_brand_theme_path, ix_brand_theme_dest_path, {
filter: (path) => !path.includes('ix-brand-theme/node_modules'),
}),
]);
console.log('Copy finished!');
})();

0 comments on commit c86c841

Please sign in to comment.