@@ -9,6 +9,8 @@ const commands = {
99 BUILD_META : 'export-theme-meta'
1010} ;
1111
12+ const themeBuilderPackagePath = path . join ( __dirname , '..' , 'node_modules' , 'devextreme-themebuilder' ) ;
13+
1214const scssCompiler = {
1315 render : ( scss ) => {
1416 return new Promise ( ( resolve , reject ) => {
@@ -93,8 +95,7 @@ const getMeta = (fullMeta, base, filter, baseParametersList) => {
9395} ;
9496
9597const installThemeBuilder = version => {
96- const rootDir = path . join ( __dirname , '..' ) ;
97- const packageJsonPath = path . join ( rootDir , 'node_modules' , 'devextreme-themebuilder' , 'package.json' ) ;
98+ const packageJsonPath = path . join ( themeBuilderPackagePath , 'package.json' ) ;
9899
99100 if ( fs . existsSync ( packageJsonPath ) && require ( packageJsonPath ) . version === version ) {
100101 return ;
@@ -105,7 +106,7 @@ const installThemeBuilder = version => {
105106 '--no-save' ,
106107 `devextreme-themebuilder@${ version } `
107108 ] , {
108- cwd : rootDir ,
109+ cwd : path . join ( __dirname , '..' ) ,
109110 stdio : 'ignore'
110111 } ) ;
111112} ;
@@ -128,6 +129,8 @@ const runThemeBuilder = async rawOptions => {
128129
129130 options . lessCompiler . options = options . lessCompiler . options || { } ;
130131 options . lessCompiler . options [ 'math' ] = 'always' ;
132+ options . lessCompiler . options [ 'paths' ] = [ path . join ( themeBuilderPackagePath , 'data' , 'less' , 'bundles' ) ] ;
133+
131134 if ( options . assetsBasePath ) {
132135 options . lessCompiler . options [ 'rootpath' ] = options . assetsBasePath ;
133136 }
0 commit comments