Skip to content

Commit

Permalink
Merge pull request #21 from Hugos68/dev
Browse files Browse the repository at this point in the history
Fixed job ordering
  • Loading branch information
Hugos68 authored Sep 23, 2023
2 parents b6fe8b0 + bc0e345 commit 6e8e727
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-grapes-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'capkit': patch
---

Reordered jobs to make ios and android additions succeed
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
18 changes: 17 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,26 @@ async function initializeProject({
}
});

if (configExtension) {
jobs.push({
start: `Removing existing config: "${kleur.cyan(`capacitor.config.${configExtension}`)}"`,
stop: `Successfully removed existing config: "${kleur.cyan(
`capacitor.config.${configExtension}`
)}"`,
task: async () => fs.unlink(`capacitor.config.${configExtension}`)
});
}

jobs.push({
start: `Creating: "${kleur.cyan('capacitor.config.json')}"`,
stop: `Successfully created: "${kleur.cyan('capacitor.config.json')}"`,
task: async () =>
fs.writeFile(
'capacitor.config.json',
JSON.stringify({ appId, appName, webDir: 'build' }, null, 2)
)
});

if (selectedPlatforms) {
jobs.push({
start: 'Adding additional platforms.',
Expand Down Expand Up @@ -198,26 +218,6 @@ async function initializeProject({
});
}

if (configExtension) {
jobs.push({
start: `Removing existing config: "${kleur.cyan(`capacitor.config.${configExtension}`)}"`,
stop: `Successfully removed existing config: "${kleur.cyan(
`capacitor.config.${configExtension}`
)}"`,
task: async () => fs.unlink(`capacitor.config.${configExtension}`)
});
}

jobs.push({
start: `Creating: "${kleur.cyan('capacitor.config.json')}"`,
stop: `Successfully created: "${kleur.cyan('capacitor.config.json')}"`,
task: async () =>
fs.writeFile(
'capacitor.config.json',
JSON.stringify({ appId, appName, webDir: 'build' }, null, 2)
)
});

jobs.push({
start: 'Importing custom scripts',
stop: 'Successfully imported custom scripts',
Expand Down

0 comments on commit 6e8e727

Please sign in to comment.