[mobile] skip addon path from deploy script
This commit is contained in:
parent
5af15a03c1
commit
1e72e8e0bb
|
@ -517,6 +517,7 @@ module.exports = function(grunt) {
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
exec: {
|
exec: {
|
||||||
webpack_app_build: {
|
webpack_app_build: {
|
||||||
options: {
|
options: {
|
||||||
|
@ -525,7 +526,10 @@ module.exports = function(grunt) {
|
||||||
cmd: function() {
|
cmd: function() {
|
||||||
const editor = packageFile.name == 'presentationeditor' ? 'slide' :
|
const editor = packageFile.name == 'presentationeditor' ? 'slide' :
|
||||||
packageFile.name == 'spreadsheeteditor' ? 'cell' : 'word';
|
packageFile.name == 'spreadsheeteditor' ? 'cell' : 'word';
|
||||||
return `npm run deploy-${editor}`;
|
// return `npm run deploy-${editor}`;
|
||||||
|
|
||||||
|
const addon_path = `${packageFile.mobile.js.reactjs && !!packageFile.mobile.js.reactjs.features ? `ADDON_ENV=${packageFile.mobile.js.reactjs.features}` : ''}`;
|
||||||
|
return `npx cross-env TARGET_EDITOR=${editor} NODE_ENV=production ${addon_path} node ./build/build.js`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
webpack_install: {
|
webpack_install: {
|
||||||
|
|
14
vendor/framework7-react/build/webpack.config.js
vendored
14
vendor/framework7-react/build/webpack.config.js
vendored
|
@ -20,6 +20,7 @@ const target = process.env.TARGET || 'web';
|
||||||
const editor = process.env.TARGET_EDITOR == 'cell' ? 'spreadsheeteditor' :
|
const editor = process.env.TARGET_EDITOR == 'cell' ? 'spreadsheeteditor' :
|
||||||
process.env.TARGET_EDITOR == 'slide' ? 'presentationeditor' : 'documenteditor';
|
process.env.TARGET_EDITOR == 'slide' ? 'presentationeditor' : 'documenteditor';
|
||||||
const targetPatch = process.env.TARGET_EDITOR || 'word';
|
const targetPatch = process.env.TARGET_EDITOR || 'word';
|
||||||
|
const addonPath = process.env.ADDON_ENV || '';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: env,
|
mode: env,
|
||||||
|
@ -77,9 +78,10 @@ module.exports = {
|
||||||
resolvePath('node_modules/dom7'),
|
resolvePath('node_modules/dom7'),
|
||||||
resolvePath('node_modules/ssr-window'),
|
resolvePath('node_modules/ssr-window'),
|
||||||
|
|
||||||
resolvePath('../../../web-apps-mobile/word'),
|
resolvePath(`${addonPath}`),
|
||||||
resolvePath('../../../web-apps-mobile/slide'),
|
//resolvePath('../../../web-apps-mobile/word'),
|
||||||
resolvePath('../../../web-apps-mobile/cell')
|
//resolvePath('../../../web-apps-mobile/slide'),
|
||||||
|
//resolvePath('../../../web-apps-mobile/cell')
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -218,8 +220,10 @@ module.exports = {
|
||||||
}),
|
}),
|
||||||
new webpack.NormalModuleReplacementPlugin(
|
new webpack.NormalModuleReplacementPlugin(
|
||||||
/\.{2}\/lib\/patch/,
|
/\.{2}\/lib\/patch/,
|
||||||
resource => fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
|
//resource => fs.existsSync(`../../../web-apps-mobile/${targetPatch}/patch.jsx`) ?
|
||||||
resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource
|
// resource.request = `../../../../../../web-apps-mobile/${targetPatch}/patch.jsx` : resource
|
||||||
|
resource => fs.existsSync(`${addonPath}/patch.jsx`) ?
|
||||||
|
resource.request = `../../../${addonPath}/patch.jsx` : resource
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
};
|
};
|
Loading…
Reference in a new issue