Skip to content

Commit 6b869bc

Browse files
Gary GambillGary Gambill
Gary Gambill
authored and
Gary Gambill
committed
Add options parameter to nsconfigSetup
1 parent 9d7787b commit 6b869bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: generator/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ module.exports = async (api, options, rootOptions) => {
255255
writeRootFiles(api, options, genConfig.dirPathPrefix);
256256

257257
// create nsconfig.json in ./ or ./ns-example
258-
nsconfigSetup(genConfig.dirPathPrefix, api.resolve('nsconfig.json'), genConfig.nativeAppPathModifier, genConfig.appResourcesPathModifier);
258+
nsconfigSetup(genConfig.dirPathPrefix, api.resolve('nsconfig.json'), genConfig.nativeAppPathModifier, genConfig.appResourcesPathModifier, options);
259259

260260
// copy over .vue with native.vue files
261261
if (options.isNativeOnly) {
@@ -579,7 +579,7 @@ const gitignoreAdditions = (module.exports.gitignoreAdditions = async (api) => {
579579

580580
// setup nsconfig.json file. for new projects it will write to the root of the project
581581
// and for existing projects it will write it to the ./ns-example directory
582-
const nsconfigSetup = (module.exports.nsconfigSetup = async (dirPathPrefix, nsconfigPath, nativeAppPathModifier, appResourcesPathModifier) => {
582+
const nsconfigSetup = (module.exports.nsconfigSetup = async (dirPathPrefix, nsconfigPath, nativeAppPathModifier, appResourcesPathModifier, options) => {
583583
let nsconfigContent = '';
584584

585585
try {
@@ -595,11 +595,11 @@ const nsconfigSetup = (module.exports.nsconfigSetup = async (dirPathPrefix, nsco
595595

596596
nsconfigContent.appPath = nativeAppPathModifier.slice(0, -1);
597597
nsconfigContent.appResourcesPath = appResourcesPathModifier;
598-
599-
if(options.isNewProject) {
598+
599+
if (options.isNewProject) {
600600
nsconfigContent.useLegacyWorkflow = false;
601601
}
602-
602+
603603
fs.writeFileSync(
604604
dirPathPrefix + 'nsconfig.json',
605605
JSON.stringify(nsconfigContent, null, 2),

0 commit comments

Comments
 (0)