Adds Ignite 2.0 Plugin Developer Quality of Life #586

Merged
merged 3 commits into from Jan 12, 2017

Projects

None yet

2 participants

@skellock
Member

This gives us the ability to add plugins from our file system.

First, this is working really well for me:

cd packages
export IGNITE_STUFF=$(pwd)
cd ignite
npm link

Create a brand new React Native project (ignite new will handle this in the near future)

mkdir -p ~/tmp/ignite
cd ~/tmp/ignite
react-native init Fun
cd Fun

Then play around!

ignite add $IGNITE_STUFF/ignite-basic-structure --unholy
ignite add $IGNITE_STUFF/ignite-basic-generators
ignite generate screen GreatOdinsBeardThisIsActuallyWorking
ignite add $IGNITE_STUFF/ignite-vector-icons

A few other notable changes:

  • temporarily turned off yarn support
  • mucking about with console logging
  • i took out Exists checking as not all npm modules live on npmjs.com

Things to chat about tomorrow.

  • I'd like to simplify the interface of ignite.toml inside plugins for generators. I'm thinking for consistency, let's move these to functions you register inside add.
  • You might notice dependencies have been removed in the ignite-* modules. They shouldn't be dependencies anymore. I'd concede to peerDependencies, but I'd prefer them gone baby gone. There are other options too, but it'll involve a little more work.
  • Check out package.json in ignite-vector-icons. See the new files? Our modules are growing up so fast. 😿
  • We can chat more about dropping Exists and how we could bring it back if you need it.
@skellock skellock added this to the 2.0 milestone Jan 11, 2017
@skellock skellock self-assigned this Jan 11, 2017
@skellock skellock requested review from GantMan and kevinvangelder Jan 11, 2017
@GantMan

2 nits - Awesome PR!

@@ -1,23 +1,13 @@
// @cliDescription Add a new thingy
// ----------------------------------------------------------------------------
-const Exists = require('npm-exists')
+// const Exists = require('npm-exists')
@GantMan
GantMan Jan 12, 2017 Member

you can take this 100% out

- error("We couldn't find that ignite plugin")
- warning(`Please make sure ${moduleName} exists on the npmjs.com`)
- process.exit(1)
+ error(err.message)
@GantMan
GantMan Jan 12, 2017 Member

Need to provide a friendly error here and ultimately process.exit(1)

const Toml = require('toml')
-// Yeah, why would toml include this? :(
@GantMan
GantMan Jan 12, 2017 Member

you killed my passive agressive toml angst. Now I have to dye my hair black and join a goth band.

@GantMan
Member
GantMan commented Jan 12, 2017

Love the concept of the error codes.

@GantMan GantMan merged commit 26aed06 into next Jan 12, 2017

1 check passed

semaphoreci The build passed on Semaphore.
Details
@GantMan GantMan deleted the add-from-dir branch Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment