File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
packages/pluggableWidgets/combobox-web Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ const { join } = require ( "path" ) ;
2+ const { cp, mkdir } = require ( "shelljs" ) ;
3+
4+ const sourcePath = process . cwd ( ) ;
5+ const outDir = join ( sourcePath , "/dist/tmp/widgets/" ) ;
6+ const widgetPackageJson = require ( join ( sourcePath , "package.json" ) ) ;
7+ const widgetName = widgetPackageJson . widgetName ;
8+ const widgetPackage = widgetPackageJson . packagePath ;
9+ const outWidgetDir = join ( widgetPackage . replace ( / \. / g, "/" ) , widgetName . toLowerCase ( ) ) ;
10+ const absoluteOutPackageDir = join ( outDir , outWidgetDir ) ;
11+
12+ module . exports = args => {
13+ const result = args . configDefaultConfig ;
14+
15+ // Ensure the locales directory exists in the output
16+ const localesDir = join ( absoluteOutPackageDir , "locales" ) ;
17+ mkdir ( "-p" , localesDir ) ;
18+
19+ // Copy translation files
20+ const translationFiles = join ( sourcePath , "dist/locales/**/*" ) ;
21+ cp ( "-r" , translationFiles , localesDir ) ;
22+
23+ return result ;
24+ } ;
You can’t perform that action at this time.
0 commit comments