Skip to content

Commit

Permalink
feat(source/index.js): Allow specifying --auto flag to run clean-proj…
Browse files Browse the repository at this point in the history
…ect-auto

Closes pmadruga#45 by allowing `npx react-native-clean-project --auto` to work
  • Loading branch information
taylorkline committed Feb 4, 2022
1 parent 91182e1 commit 9568920
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@
const options = require('./internals/options');
const { executeTask } = require('./internals/executor');
const { tasks } = require('./internals/tasks');
const plugin = require("./plugin");

const autoClean = plugin.find(p => (p.name === 'clean-project-auto'));
const args = process.argv.slice(2);

async function main() {
if (args.includes('--auto')) {
autoClean.func();
return;
}

await options.askiOS();
await options.askiOSPods();
await options.askSystemiOSPodsCache();
Expand Down

0 comments on commit 9568920

Please sign in to comment.