Skip to content

Commit

Permalink
Revert "implement new method of selecting boilerplate if not passed t…
Browse files Browse the repository at this point in the history
…hrough command line (#1258)"

This reverts commit b124c8a.
  • Loading branch information
kevinvangelder committed Apr 25, 2018
1 parent b124c8a commit d92c981
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
3 changes: 1 addition & 2 deletions BOILERPLATES.md
Expand Up @@ -4,8 +4,7 @@

| Name | Description |
|------|-------------|
| [ignite-ir-boilerplate-bowser](https://github.com/infinitered/ignite-ir-boilerplate-bowser) | React Navigation, MobX State Tree, & TypeScript |
| [ignite-ir-boilerplate-andross](https://github.com/infinitered/ignite-ir-boilerplate-andross) | React Navigation, Redux, & Redux Sagas |
| [ignite-ir-boilerplate](https://github.com/infinitered/ignite-ir-boilerplate) | The latest and greatest of Infinite Red opinions |
| [ignite-ir-boilerplate-2016](https://github.com/infinitered/ignite-ir-boilerplate-2016) | InfiniteRed's 2016 tech stack |

## 3rd Party
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ignite-cli",
"version": "2.1.0",
"version": "2.0.0",
"description": "An unfair headstart for your React Native apps.",
"bin": {
"ignite": "bin/ignite"
Expand Down
28 changes: 2 additions & 26 deletions src/commands/new.js
Expand Up @@ -95,36 +95,12 @@ async function command (context) {
}

// grab the right boilerplate
let boilerplateName = parameters.options.boilerplate || parameters.options.b
let boilerplateName = parameters.options.boilerplate || parameters.options.b || 'ir-boilerplate'

// If the name includes a file separator, it's probably a path. Expand it so it's the full real path here.
if ((boilerplateName || '').includes(path.sep)) {
if (boilerplateName.includes(path.sep)) {
boilerplateName = filesystem.path(boilerplateName)
}
const andross = 'Andross (React Navigation, Redux, & Redux Saga'
const bowser = 'Bowser (alpha) (React Navigation, MobX State Tree, & TypeScript)'
if (!boilerplateName) {
const { boilerplate } = await context.prompt.ask([
{
name: 'boilerplate',
message: 'Which boilerplate would you like to use?',
type: 'list',
choices: [
andross,
bowser
]
}
])
switch (boilerplate) {
case bowser:
boilerplateName = 'ir-boilerplate-bowser'
break
case andross:
default:
boilerplateName = 'ir-boilerplate-andross'
break
}
}

// make & jump into the project directory
log(`making directory ${projectName}`)
Expand Down

0 comments on commit d92c981

Please sign in to comment.