diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 640d3ea9b..c9b4a7c1e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,17 +1,19 @@ -# Contributing to Ignite +# Contributing to Ignite CLI [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://semaphoreci.com/api/v1/ir/ignite/branches/master/shields_badge.svg)](https://semaphoreci.com/ir/react_native_base) -We welcome all contributors to Ignite! This contributing guide will help you get up and running to submit your first pull request. +We welcome all contributors to Ignite CLI! This contributing guide will help you get up and running to submit your first pull request. Before submitting a pull request, you will want to make sure that your branch meets the following requirements: +_These examples assume you're using yarn rather than npm. If you're not using yarn, replace these commands with the [appropriate npm alternative](https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc)_ + * Everything works on iOS/Android -* AVA Tests pass in the root folder (`npm test` or `yarn test`) -* Integration tests pass (`cd packages/ignite-integration && npm run integration && cd -`) +* AVA Tests pass in the root folder (`yarn test`) +* Integration tests pass (`yarn run integration`) * New tests are included for any new functionality -* Code is compliant with StandardJS (`npm run lint` or `yarn lint`) +* Code is compliant with StandardJS (`yarn lint`) * Branch has already been [synced with the upstream repo](https://help.github.com/articles/syncing-a-fork/) and any merge-conflicts have been resolved. ## Requirements @@ -23,10 +25,9 @@ Before submitting a pull request, you will want to make sure that your branch me 1. Fork and then clone the repo (`git clone git@github.com:/ignite.git`) 2. CD into the directory (`cd ignite`) -3. Uninstall npm version (`npm u -g ignite-cli && npm u -g react-native-ignite`) -4. Pull all package dependencies (`npm i && npm run bootstrap`) -5. Link the local binary (`cd packages/ignite-cli && npm link && cd -`) -6. Set up your local plugin path (`export IGNITE_PLUGIN_PATH=$PWD/packages`) +3. Uninstall npm version (`yarn global remove ignite-cli && yarn global remove react-native-ignite`) +4. Pull all package dependencies (`yarn`) +5. Link the local binary (`yarn link`) Test it out: @@ -39,15 +40,15 @@ $ ignite new UberForHeadLice ... ``` -Now you're ready to check out a new branch and get hacking on Ignite! +Now you're ready to check out a new branch and get hacking on Ignite CLI! ## Source Code -To get familiarized with Ignite's source code, read the [Tour of Ignite's source code](../docs/advanced-guides/tour.md). +To get familiarized with Ignite CLI's source code, read the [Tour of Ignite CLI's source code](../docs/advanced-guides/tour.md). ## How to Build and Run App -Note that if you do not already have the React Native command line tools installed, you should run `npm install -g react-native-cli` or `yarn global add react-native-cli`. For additional information and troubleshooting go to the [React Native Getting Started Guide](https://facebook.github.io/react-native/docs/getting-started.html#content). +Note that if you do not already have the React Native command line tools installed, you should run `yarn global add react-native-cli`. For additional information and troubleshooting go to the [React Native Getting Started Guide](https://facebook.github.io/react-native/docs/getting-started.html#content). ``` $ cd ~/your/apps/directory @@ -66,23 +67,18 @@ We use [AVA](https://github.com/avajs/ava) for testing. To run tests from the ignite-base folder: ``` -$ npm test -or $ yarn test ``` Or to run it in [intelligent watch mode](https://github.com/avajs/ava/blob/master/docs/recipes/watch-mode.md): ``` -$ npm test -- --watch -or $ yarn test -- --watch ``` You'll also want to run the integration tests before submitting a pull request: ``` -$ cd packages/ignite-cli -$ npm run integration +$ yarn run integration ``` ## :no_entry_sign: Standard Compliant @@ -93,8 +89,6 @@ This project adheres to Standard. Our CI enforces this, so we suggest you enabl **To Run Lint** from ignite-base: ``` -$ npm run lint -or $ yarn lint ``` diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2f7169440..72aa41f65 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,8 +1,8 @@ -### Hey there! Ignite seems to be having a problem, eh? +### Hey there! Ignite CLI seems to be having a problem, eh? Welllllll, it just might be. First, search the issues to make sure it's not already here, and if not head over to http://community.infinite.red to -get some help. If you've identified that it's really an Ignite issue, then: +get some help. If you've identified that it's really an Ignite CLI issue, then: - Explain what's going on and preferably how to replicate the issue (bonus points for a repro app) - Run `ignite doctor` and paste the result below, including the lines with 3 backticks diff --git a/.gitignore b/.gitignore index ef6156c84..b990867e7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ npm-debug.log* coverage .nyc_output yarn.lock -lerna-debug.log node_modules .vscode/* !.vscode/settings.json @@ -14,3 +13,5 @@ node_modules !.vscode/launch.json !.vscode/extensions.json testgrounds +generated +tests/out diff --git a/README.md b/README.md index df6961b49..e2a308af2 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ js-standard-style -### Ignite +### Ignite CLI

- Ignite 2 screenshot + Ignite CLI screenshot

@@ -18,13 +18,13 @@

-### Ignite 2 is here! +### Ignite CLI is here! -After months of work and sweat and tears, Ignite 2 (beta) has landed! We're incredibly proud of where Ignite 2 is and where it's headed. +After months of work and sweat and tears, Ignite CLI has landed! We're incredibly proud of where Ignite CLI is and where it's headed. -Cliff notes version of the difference between Ignite 1 and 2: +Cliff notes version of the difference between Ignite 1 and Ignite CLI: -Ignite 1 was a (very nice!) [React Native](http://facebook.github.io/react-native/docs/getting-started.html) boilerplate. Ignite 2 is a CLI and generator for React Native with boilerplates, plugins, and more. Where before you had one choice -- [Infinite Red](https://infinite.red)'s boilerplate -- now you can choose from many boilerplates and also add standalone plugins as you need them. It's much more modular and extensible than Ignite 1. +Ignite 1 was a (very nice!) [React Native](http://facebook.github.io/react-native/docs/getting-started.html) boilerplate. Ignite CLI is a generator for React Native with boilerplates, plugins, and more. Where before you had one choice -- [Infinite Red](https://infinite.red)'s boilerplate -- now you can choose from many boilerplates and also add standalone plugins as you need them. It's much more modular and extensible than Ignite 1. If you really liked Ignite 1 as it was, then not much has changed! You just run `ignite new MyApp --max` and everything feels pretty normal from there. @@ -45,24 +45,15 @@ $ ignite remove i18n $ ignite i love you ``` -### Why Ignite? +### Why Ignite CLI? * Easily spin up a new React Native app with best practices built-in * No runtime! This is a developer tool only, not a library you have to depend on -* An ever-expanding list of boilerplates and plugins +* An ever-expanding list of [boilerplates](./BOILERPLATES.md) and [plugins](./PLUGINS.md) * Powerful but well-defined behavior * Battle tested and used every day by the developers at Infinite Red -And you also get (by default) all of the sweet, sweet goodness of our default boilerplate: - -* Works with iOS and Android out of the box -* Useful generators, including components, screens, styles, and more -* API-ready -- hook it up and start talking to your server -* Standard-js compliant code -* Redux and redux-sagas state management -* Well-documented code -* Gorgeous Ava tests -* and much, much more... [go check out the readme](https://github.com/infinitered/ignite-ir-boilerplate-2016) (WIP during alpha) +And you also get (by default) all of the sweet, sweet goodness of [our default boilerplate](https://github.com/infinitered/ignite-ir-boilerplate-2016), or choose [one of many others](./BOILERPLATES.md). ## :arrow_down: Install @@ -93,7 +84,7 @@ $ ignite new MyNewAppName ``` ## :clipboard: Documentation :clipboard: -Want to dive into the Ignite 2 documentation? [Go here](./docs/README.md) +Want to dive into the Ignite CLI documentation? [Go here](./docs/README.md) Looking for React Native's documentation? [Go here](http://facebook.github.io/react-native/docs/getting-started.html) ## :electric_plug: Plugins :electric_plug: @@ -110,16 +101,16 @@ If you run into problems, first search the issues in this repository. If you don ## :telescope: Where to Go From Here :telescope: -#### [Contribute to Ignite](https://github.com/infinitered/ignite/blob/master/.github/CONTRIBUTING.md) - Getting up and running for your first pull request -#### [Take a tour of Ignite source code](https://github.com/infinitered/ignite/blob/master/docs/advanced-guides/tour.md) +#### [Contribute to Ignite CLI](https://github.com/infinitered/ignite/blob/master/.github/CONTRIBUTING.md) - Getting up and running for your first pull request +#### [Take a tour of Ignite CLI source code](https://github.com/infinitered/ignite/blob/master/docs/advanced-guides/tour.md) #### [Chat with us on the IR Community](http://community.infinite.red) - Infinite Red devs standing by #### [Who are We?](https://infinite.red) - Learn More About Infinite Red #### [Project Web Page](https://infinite.red/ignite/) - Ignite on Infinite Red ## :heart: Special Thanks :heart: -Thank you to the numerous [contributors of Ignite](https://github.com/infinitered/ignite/graphs/contributors). Our awe and appreciation for the friendliness of Open Source is the fuel for all [Infinite Red](https://infinite.red/) projects like Ignite. +Thank you to the numerous [contributors of Ignite CLI](https://github.com/infinitered/ignite/graphs/contributors). Our awe and appreciation for the friendliness of Open Source is the fuel for all [Infinite Red](https://infinite.red/) projects like Ignite CLI. ## Premium Support -[Ignite](https://infinite.red/ignite), as open source projects, is free to use and always will be. [Infinite Red](https://infinite.red/) offers premium Ignite support and general mobile app design/development services. Email us at [hello@infinite.red](mailto:hello@infinite.red) to get in touch with us for more details. +[Ignite CLI](https://infinite.red/ignite), as open source projects, is free to use and always will be. [Infinite Red](https://infinite.red/) offers premium Ignite CLI and boilerplate support and general mobile app design/development services. Email us at [hello@infinite.red](mailto:hello@infinite.red) to get in touch with us for more details. diff --git a/_art/ignite_logo.png b/_art/ignite_logo.png deleted file mode 100644 index 759f572cb..000000000 Binary files a/_art/ignite_logo.png and /dev/null differ diff --git a/_art/in_use.jpg b/_art/in_use.jpg deleted file mode 100644 index f8690e5b5..000000000 Binary files a/_art/in_use.jpg and /dev/null differ diff --git a/_art/install.gif b/_art/install.gif deleted file mode 100644 index 849ec80b2..000000000 Binary files a/_art/install.gif and /dev/null differ diff --git a/_art/screens.gif b/_art/screens.gif deleted file mode 100644 index a77217783..000000000 Binary files a/_art/screens.gif and /dev/null differ diff --git a/bin/fireDrill.sh b/bin/fireDrill.sh deleted file mode 100755 index a8d3e1ef2..000000000 --- a/bin/fireDrill.sh +++ /dev/null @@ -1,126 +0,0 @@ -#! /bin/bash - -echo 'Warning: fireDrill.sh is deprecated and will be removed soon.' -exit 1 - -SOMETHING_FAILED=0 -function test_command { - "$@" - local status=$? - if [ $status -ne 0 ]; then - echo "πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž - $1 Failed" >&2 - SOMETHING_FAILED=1 - fi - return $status -} - -show_warnings() -{ - LOGS_BASE=$(grep -rnw './ignite-base/App' -e '\s console.log' | wc -l) - if [[ $LOGS_BASE -gt 0 ]]; then - echo 'Warning: console.log() count in ignite-base:' $LOGS_BASE - fi -} - -enforce_templates() -{ - # Template code should mirror active base project - # Except in the known instances where names differ - # This rule enforces that templates are kept up to date! - ONE_LINE_DIFFERENT=4 - # index.android.js - DIFF_COUNT=$(diff ./ignite-base/index.android.js ./ignite-base/index.js.template | wc -l | grep $ONE_LINE_DIFFERENT) - if [[ $DIFF_COUNT -ne ONE_LINE_DIFFERENT ]]; then - echo 'Base index.android.js does not match index.js.template' - exit 1 - fi - # index.ios.js - DIFF_COUNT=$(diff ./ignite-base/index.ios.js ./ignite-base/index.js.template | wc -l | grep $ONE_LINE_DIFFERENT) - if [[ $DIFF_COUNT -ne ONE_LINE_DIFFERENT ]]; then - echo 'Base index.ios.js does not match index.js.template' - exit 1 - fi - # package.json - DIFF_COUNT=$(diff ./ignite-base/package.json ./ignite-base/package.json.template | wc -l | grep $ONE_LINE_DIFFERENT) - if [[ $DIFF_COUNT -ne ONE_LINE_DIFFERENT ]]; then - echo 'Base package.json does not match package.json.template' - exit 1 - fi -} - -enforce_versions() -{ - # ignite generator version - CURRENT_VERSION=$(node -e "var o = require('./ignite-generator/package.json'); console.log(o.version);") - - # verify version is in index - grep -q 'lockedIgniteVersion.*'$CURRENT_VERSION ignite-generator/src/app/index.es - if [[ $? -ne 0 ]]; then - echo 'ignite-generator/src/app/index.es:lockedIgniteVersion does not match' $CURRENT_VERSION - exit 1 - fi - - # verify version is in CLI - grep -q 'version.*'$CURRENT_VERSION ignite-cli/package.json - if [[ $? -ne 0 ]]; then - echo 'ignite-cli/package.json:version does not match' $CURRENT_VERSION - exit 1 - fi -} - -lint() -{ - # latest eslint plz - npm i -g babel-eslint - - # install standard if needed - which standard - if [[ $? -ne 0 ]]; then - npm i -g standard - fi - # Check cli for compliance - test_command standard ./ignite-cli/src/**.* - # Check generator for compliance - test_command standard ./ignite-generator/src/**.* - - # Run checks specific to ignite-base - cd ./ignite-base - - # Check base app for standard compliance - test_command standard ./App/**.* - - # Return to root directory - cd .. -} - -flow_type_check() -{ - # Run checks specific to ignite-base - cd ./ignite-base - - # Ensure node modules installed - npm install - - # Check base app for flow compliance - test_command npm run flow - - # Return to root directory - cd .. -} - -show_warnings -enforce_templates -enforce_versions -lint -flow_type_check - -# Done -if [ "$SOMETHING_FAILED" != "0" ]; then - echo "~~~πŸ‘Ž Done with errors" 1>&2 - exit 1 -else - echo "~~~πŸ‘ Everything looks good!" - # depends on $SECONDS being part of sh - printf '%dh:%dm:%ds\n' $(($SECONDS/3600)) $(($SECONDS%3600/60)) $(($SECONDS%60)) - exit 0 -fi diff --git a/packages/ignite-cli/bin/ignite b/bin/ignite similarity index 100% rename from packages/ignite-cli/bin/ignite rename to bin/ignite diff --git a/bin/testRelease b/bin/testRelease deleted file mode 100755 index c74907792..000000000 --- a/bin/testRelease +++ /dev/null @@ -1,145 +0,0 @@ -#! /bin/bash - -#################### Running this Script ####################### -# Verify Git status is clean -# Run this with `./bin/testRelease` -################################################################ - -SOMETHING_FAILED=0 -echo "#########################################################" -echo '# Test a release of Ignite before actually releasing it #' -echo '# ._______. #' -echo '# | \ / | #' -echo '# .--|.O.|.O.|______. #' -echo '# __).-| = | = |/ \ | #' -echo "# >__) (.'---\`.)Q.|.Q.|--. #" -echo '# \\___// = | = |-.(__ #' -echo "# \`---'( .---. ) (__< #" -echo "# \\\\.-.// #" -echo "# \`---' #" -echo '#########################################################' - -# Runs command and on failure turns on the SOMETHING_FAILED flag -function test_command { - "$@" - local status=$? - if [ $status -ne 0 ]; then - echo "πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž πŸ‘Ž - $1 Failed" >&2 - SOMETHING_FAILED=$1 - fi - return $status -} - -setup() -{ - rm -rf ./testgrounds - - echo '~~~🌟 Preparing packages' - npm install -g lerna@2.0.0-beta.38 - test_command lerna bootstrap - - echo '~~~🌟 Linking local for Testing' - cd packages/ignite-cli - test_command npm link - cd - -} - -verify_code() -{ - echo '~~~🌟 Checking Code' - npm install -g standard - npm install -g ava - npm i -g react-native-cli - test_command standard ./packages - test_command npm test - - # run integration tests - cd ./packages/ignite-integration-tests && npm run integration && cd - -} - -check_builds() -{ - export IGNITE_PLUGIN_PATH=$(pwd)/packages - echo "$IGNITE_PLUGIN_PATH" - - mkdir testgrounds - cd ./testgrounds - echo '~~~🌟 Generating Project' - test_command ignite new TestProj --min --skip-git - - echo '~~~🌟 Checking Builds' - cd ./TestProj - - if [ ! -d "android" ]; then - echo 'Android folder did not generate' - SOMETHING_FAILED=1 - fi - - if [ ! -d "ios" ]; then - echo 'ios folder did not generate' - SOMETHING_FAILED=1 - fi - - echo 'Testing Blessed Plugins' - echo '~ Test adding vector-icons plugin from npm' - test_command ignite add vector-icons - echo '~ Test adding animatable plugin from npm' - test_command ignite add animatable - echo '~ Test adding i18n plugin from npm' - test_command ignite add i18n - echo '~ Test adding maps plugin from npm' - test_command ignite add maps - - echo '~ LINT ALL THE THINGS!' - test_command npm run lint - - echo '~ Build ios' - test_command react-native bundle --entry-file index.ios.js --bundle-output test.ios.js --dev false --platform ios --assets-dest iosAssets - if [ ! -d "iosAssets" ]; then - echo 'iosAssets folder did not generate' - SOMETHING_FAILED=1 - fi - - echo '~ Build android' - test_command react-native bundle --entry-file index.android.js --bundle-output test.android.js --dev false --platform android --assets-dest androidAssets - if [ ! -d "androidAssets" ]; then - echo 'androidAssets folder did not generate' - SOMETHING_FAILED=1 - fi - # A failed android build will not exit with a non-zero return! - # This makes it a bit trickier to test for - look for the fail message instead - # Temporary disable this until we separate CI needs from here - # cd ./android - # ./gradlew assembleRelease | grep -q 'BUILD FAILED' - # if [[ $? -eq 0 ]]; then - # echo 'Android build failed' - # SOMETHING_FAILED=1 - # fi - # cd .. - - - # back to root - cd ../.. - - echo '~~~🌟 Cleanup' - rm -rf testgrounds -} - -# This is where the magic happens -setup; - -verify_code; - -check_builds; - -# Done -if [ "$SOMETHING_FAILED" != "0" ]; then - echo "~~~πŸ‘Ž Done with errors"; - echo "$SOMETHING_FAILED"; - exit 1; -else - echo "~~~πŸ‘ Everything looks good!"; - # depends on $SECONDS being part of sh - printf '%dh:%dm:%ds\n' $(($SECONDS/3600)) $(($SECONDS%3600/60)) $(($SECONDS%60)); - exit 0; -fi diff --git a/docs/README.md b/docs/README.md index 2013e0383..eb6a2447a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,10 +1,10 @@ -# Ignite Documentation +# Ignite CLI Documentation ## Quick Start * Installing * [Getting started](./quick-start/getting-started.md) -* [Ignite commands](./quick-start/ignite-commands.md) +* [Ignite CLI commands](./quick-start/ignite-commands.md) * [Project Structure](./quick-start/project-structure.md) * [Using boilerplates](./quick-start/using-boilerplates.md) * Removing plugins diff --git a/docs/advanced-guides/creating-boilerplates.md b/docs/advanced-guides/creating-boilerplates.md index 95ccc3523..96c797f06 100644 --- a/docs/advanced-guides/creating-boilerplates.md +++ b/docs/advanced-guides/creating-boilerplates.md @@ -1,6 +1,6 @@ # Creating Boilerplates -A boilerplate is an Ignite plugin which runs only once: the moment you create a new project. Its purpose is to bootstrap your brand new React Native project with files, directories, libraries, images, fonts, other ignite plugins, or whatever you need on every project you create. +A boilerplate is an Ignite CLI plugin which runs only once: the moment you create a new project. Its purpose is to bootstrap your brand new React Native project with files, directories, libraries, images, fonts, other ignite plugins, or whatever you need on every project you create. Like we do in [ignite-ir-boilerplate-2016](https://github.com/infinitered/ignite-ir-boilerplate-2016), it's helpful to make parts of your boilerplate optional. For example, if you know you're not wanting to want animations, you might not want to install that library. diff --git a/docs/advanced-guides/creating-generators.md b/docs/advanced-guides/creating-generators.md index 016ac60dd..3b1e939dd 100644 --- a/docs/advanced-guides/creating-generators.md +++ b/docs/advanced-guides/creating-generators.md @@ -1,10 +1,10 @@ -# Creating an Ignite Generator +# Creating an Ignite CLI Generator -This document will walk you through creating your own Ignite 2.0 generator. A +This document will walk you through creating your own Ignite CLI generator. A generator will allow your users to create customized files from templates by using the `ignite generate` command on the command line. -A generator is a special kind of Ignite 2.0 plugin. Generators are more advanced +A generator is a special kind of Ignite CLI plugin. Generators are more advanced than common plugins. You should understand how to create plugins first; check out [Creating Plugins](./creating-plugins.md) first if you need to review. @@ -22,7 +22,7 @@ generate an example command/generator?` ## Setting up the generator -Go into the directory Ignite created. +Go into the directory Ignite CLI created. `cd {generator name}` diff --git a/docs/advanced-guides/creating-plugins.md b/docs/advanced-guides/creating-plugins.md index 0838fd5fe..52232a587 100644 --- a/docs/advanced-guides/creating-plugins.md +++ b/docs/advanced-guides/creating-plugins.md @@ -1,13 +1,13 @@ -# Creating an Ignite Plugin +# Creating an Ignite CLI Plugin -This document will walk you through creating your very own Ignite plugin from a 3rd party library +This document will walk you through creating your very own Ignite CLI plugin from a 3rd party library We will be using https://github.com/ArnaudRinquin/react-native-radio-buttons as an example. ### Generate a basic plugin structure -Run the provided plugin generator. Ignite will automatically prepend your package name with `ignite-`. +Run the provided plugin generator. Ignite CLI will automatically prepend your package name with `ignite-`. ``` $ ignite plugin new radio-buttons @@ -21,7 +21,7 @@ Open up `package.json` and add your desired info. { "name": "ignite-radio-buttons", "version": "0.0.1", - "description": "An Ignite plugin for react-native-radio-buttons.", + "description": "An Ignite CLI plugin for react-native-radio-buttons.", "license": "MIT", "devDependencies": {}, "url": "https://github.com/infinitered/ignite-radio-buttons/issues", @@ -117,9 +117,9 @@ You can view your plugin example in the Plugin Examples section of the dev scree ### Gluegun -`Gluegun` is a tool for building CLIs, and could be useful in building Ignite -plugins. Gluegun allows you to "glue together" existing CLIs, whether third -party or your own, into one. Ignite itself makes use of Gluegun. +`Gluegun` is a tool for building CLIs, and is useful when you're building Ignite CLI +plugins. Gluegun allows you to "glue together" existing CLIs, whether third party +or your own, into one. Ignite CLI itself makes use of Gluegun. Gluegun comes equipped with some outstanding libraries that fulfill common CLI needs, such as templating, filesystem operations, command line handling, copy diff --git a/docs/advanced-guides/creating-project-plugins.md b/docs/advanced-guides/creating-project-plugins.md index 215ff8b64..173117858 100644 --- a/docs/advanced-guides/creating-project-plugins.md +++ b/docs/advanced-guides/creating-project-plugins.md @@ -2,7 +2,7 @@ First read the [creating plugins guide](./creating-plugins.md). It covers the structure of plugins. -Project-based plugins are plugins which stay within your repo. They're a great way to add some features to Ignite without going through the hassle or commitment of publishing to NPM. +Project-based plugins are plugins which stay within your repo. They're a great way to add some features to Ignite CLI without going through the hassle or commitment of publishing to NPM. Some examples of this might be: diff --git a/docs/advanced-guides/tour.md b/docs/advanced-guides/tour.md index 274123cad..e796cecbb 100644 --- a/docs/advanced-guides/tour.md +++ b/docs/advanced-guides/tour.md @@ -1,40 +1,26 @@ -# Tour of Ignite source code +# Tour of Ignite CLI source code -Ignite's source looks a tad intimidating at first, but it's actually quite straightforward once you get some experience moving around in it. Let's take a tour. +Let's take a tour of Ignite CLI's source code. (note in any code examples we're using `yarn` ... you can substitute `npm` alternative commands if desired) -## Lerna & "packages" - -Ignite is composed of a few "packages" (in the `./packages` folder). You can think of these packages as mini npm packages, all controlled by a nice tool called [Lerna](https://lernajs.io/). This allows us to split up Ignite into separate packages while not having to coordinate releases across multiple repos and npm versions. - -All you really need to know about Lerna for these purposes is that you can run this from the main folder: - -```sh -$ yarn run bootstrap -``` - -![image](https://cloud.githubusercontent.com/assets/1479215/25318334/12209eaa-2841-11e7-926d-f26113dbefb9.png) - -This will automatically run `yarn` in each of the separate packages, which each has its own `node_modules` folder. - ## gluegun `ignite-cli` (described [next](#ignite-cli)) uses another Infinite Red npm package called [gluegun](https://github.com/infinitered/gluegun). Gluegun is sort of like [Yeoman](http://yeoman.io/) in that it gives us a bunch of CLI tools, but it's much lighter and doesn't take over your whole CLI. Whenever you see `context` in `ignite-cli`, it is a gluegun runtime context. This is a JS object that has a bunch of useful functions and properties attached to it, like `print` and `parameters`. -In addition, Ignite adds some of its own Ignite-specific functions and parameters to `context` ... those are found under `context.ignite`. +In addition, Ignite CLI adds some of its own Ignite CLI-specific functions and parameters to `context` ... those are found under `context.ignite`. If you're curious what's in the context object, check out Gluegun's [nice context docs](https://infinitered.github.io/gluegun/#/context-api.md), or just inspect it with `console.dir(context, {depth: 3, colors: true})`. ## ignite-cli -This is the CLI part of Ignite which runs under your local node. The `ignite` binary itself is in the `bin` folder and there are some initial scripts that run whenever you invoke `ignite` in the `./src/cli` folder. +The `ignite` binary itself is in the `bin` folder and there are some initial scripts that run whenever you invoke `ignite` in the `./src/cli` folder. #### Commands -The commands you can run with Ignite, such as `ignite add `, `ignite doctor`, `ignite new MyApp`, all execute the corresponding JS files under `./src/commands`. Take a peak in each of those files. When you see a function like this: +The commands you can run with Ignite CLI, such as `ignite add `, `ignite doctor`, `ignite new MyApp`, all execute the corresponding JS files under `./src/commands`. Take a peak in each of those files. When you see a function like this: ```javascript module.exports = async function (context) { @@ -59,14 +45,10 @@ We often use extensions for namespacing and organizing various tools and data th ## ignite-dev-screens -This is an [Ignite plugin](./creating-plugins.md) that adds Ignite development screens to your new app (if you choose to). It runs the `./src/plugin.js` file and copies over the files in `./src/templates` to your project. To edit the generated screens, just edit the files in the templates folder. +This is an [Ignite CLI plugin](./creating-plugins.md) that adds development screens to your new app (if you choose to). It runs the `./src/plugin.js` file and copies over the files in `./src/templates` to your project. To edit the generated screens, just edit the files in the templates folder. ## Documentation and Github Github-specific templates and docs are in `./.github`. Other documentation is found in `./docs`. If you add any new features or update old features, please include appropriate documentation changes in your pull request as well. -## CI Tests - -In the `./bin` folder, you'll find a few helpful scripts that we run before releasing a new version of Ignite. - -_That's it! If you have questions about the structure of Ignite, feel free to open an issue or [join the Infinite Red Community Slack](http://community.infinite.red)._ +_That's it! If you have questions about the structure of Ignite CLI, feel free to open an issue or [join the Infinite Red Community Slack](http://community.infinite.red)._ diff --git a/docs/advanced-guides/using-development-build.md b/docs/advanced-guides/using-development-build.md index 42788485f..9782e5ff7 100644 --- a/docs/advanced-guides/using-development-build.md +++ b/docs/advanced-guides/using-development-build.md @@ -1,6 +1,6 @@ -# How use an Ignite Development Build +# How use an Ignite CLI Development Build -This guide will walk you through how to setup and use a pre-release or experimental build of Ignite. +This guide will walk you through how to setup and use a pre-release or experimental build of Ignite CLI. ## Requirements @@ -19,7 +19,7 @@ If you're on a Mac, you can use one of these techniques: #### Out With The Old -First, if you already have a copy of Ignite installed with `npm`, uninstall it with the commands listed below. +First, if you already have a copy of Ignite 1 or Ignite CLI installed with `npm`, uninstall it with the commands listed below. Exact one depends on what you may have installed previously: @@ -31,48 +31,32 @@ npm rm -g react-native-ignite #### In With The New -Clone Ignite's repository from https://github.com/infinitered/ignite to your local development machine. +Clone Ignite CLI's repository from https://github.com/infinitered/ignite to your local development machine. -> Note: Depending on the version of Ignite you are targeting, you may be cloning a forked repository of Ignite and the git URLs may look different. +> Note: Depending on the version of Ignite CLI you are targeting, you may be cloning a forked repository of Ignite CLI and the git URLs may look different. ```sh git@github.com:infinitered/ignite.git cd ignite ``` -Now use `npm` to install and bootstrap Ignite: +Now use `yarn` to install Ignite CLI: ```sh -npm install -npm run bootstrap +yarn ``` -Next make the `ignite` command available globally. To do this, navigate to the `packages/ignite-cli` directory (found in the repository) and run the `npm link`: +Next make the `ignite` command available globally. To do this, run `yarn link`: ```sh -cd packages/ignite-cli -npm link +yarn link ``` -> Note: If you get an error at this point, it is probably related to not removing a previously installed version of Ignite. See the commands above to uninstall Ignite. - -#### Setup Overrides - -Now set up an environment variable so Ignite knows where to find its own plugins. Make sure you're in the main `ignite` folder first -- you may have to run `cd ../..`. - -```sh -export IGNITE_PLUGIN_PATH=$(pwd) -``` - -If you want to add this to your local `.bashrc` or `.zshrc` so it's available on every terminal session, just do this: - -```sh -echo "export IGNITE_PLUGIN_PATH=$(pwd)" >> ~/.zshrc -``` +> Note: If you get an error at this point, it is probably related to not removing a previously installed version of Ignite CLI. See the commands above to uninstall Ignite CLI. ## Testing Your Installation -To test your installation of Ignite, let's try generating a new project. Navigate to a new directory where you'd like to create a new project and run the `ignite new` command: +To test your installation of Ignite CLI, let's try generating a new project. Navigate to a new directory where you'd like to create a new project and run the `ignite new` command: ```sh cd ~ diff --git a/docs/quick-start/getting-started.md b/docs/quick-start/getting-started.md index b22f78ac2..7b1091e55 100644 --- a/docs/quick-start/getting-started.md +++ b/docs/quick-start/getting-started.md @@ -1,15 +1,15 @@ -# Getting Started with Ignite and React Native +# Getting Started with Ignite CLI and React Native -Welcome to Ignite, the ideal starting app for React Native, best practices, generators, and more. This page will walk you through installing Ignite and using Ignite to generate a React Native Project. +Welcome to Ignite CLI, a command line tool for generating React Native projects, components, and more. This page will walk you through installing Ignite CLI and using Ignite CLI to generate a React Native Project. -To use Ignite, you will need to install React Native. The best way to install React Native is to follow the React Native installation instructions found on official React Native website, [here](http://facebook.github.io/react-native/docs/getting-started.html). These instructions will walk your through installing React Native on your specific platform. +To use Ignite CLI, you will need to install React Native. The best way to install React Native is to follow the React Native installation instructions found on official React Native website, [here](http://facebook.github.io/react-native/docs/getting-started.html). These instructions will walk your through installing React Native on your specific platform. You will also need to have Node 7.6+ installed. We recommend using [n](https://github.com/tj/n) to manage node versions. If you already use [nvm](https://github.com/creationix/nvm) and would like to switch, follow [these steps](./nvm-to-n.md). -## Installing Ignite 2.0 +## Installing Ignite CLI -Installing Ignite is easy with one simple terminal command: +Installing Ignite CLI is easy with one simple terminal command: ``` npm install -g ignite-cli @@ -17,7 +17,7 @@ npm install -g ignite-cli ## Testing your Ignite Installation -To test your Ignite installation, let’s generate and run a new React Native project using Ignite. In your terminal, navigate to the directory you’d like to create a new Ignite project, then run the Ignite new command: +To test your Ignite CLI installation, let’s generate and run a new React Native project. In your terminal, navigate to the directory you’d like to create a new React Native project, then run the Ignite CLI new command: ``` cd projects @@ -31,9 +31,9 @@ ignite new MyIgniteProject ... ``` -The `ignite new` command will ask you if you’d like to add several different plugins. We recommend you use these plugins that ship with Ignite. This way, your new Ignite project will be a playground to learn about React Native and best practices. +The `ignite new` command will ask you if you’d like to add several different plugins. We recommend you use these plugins that ship with Ignite CLI. This way, your new Ignite CLI project will be a playground to learn about React Native and best practices. -After Ignite creates your project, navigate into the project’s directory and start the application with the following commands: +After Ignite CLI creates your project, navigate into the project’s directory and start the application with the following commands: ``` @@ -46,10 +46,10 @@ To run in Android: react-native run-android ``` -You can also learn more about Ignite in the command line: +You can also learn more about Ignite CLI in the command line: ``` -To see what ignite can do for you: +To see what Ignite CLI can do for you: cd MyIgniteProject ignite ``` @@ -68,8 +68,4 @@ This works great for: * normal React JS projects * empty directories ( not even joking! you can use this with other programming languages. :O ) -Not all plugins work in all environments, but you can certainly take advantage of the many features of Ignite (such as the code generators). - -## Continue your Learning - -To continue your introduction to Ignite, see the Editing an Ignite App (working title) page. +Not all plugins work in all environments, but you can certainly take advantage of the many features of Ignite CLI (such as the code generators). diff --git a/docs/quick-start/ignite-commands.md b/docs/quick-start/ignite-commands.md index 2ded6dcfe..00281292f 100644 --- a/docs/quick-start/ignite-commands.md +++ b/docs/quick-start/ignite-commands.md @@ -1,10 +1,10 @@ -# Ignite Commands +# Ignite CLI Commands -This document reviews the commands that the Ignite 2.0 CLI provides. This guide +This document reviews the commands that the Ignite CLI provides. This guide assumes that you've installed Ignite. If you haven't, then check out our Getting -Started Guide [here](). +Started Guide [here](./getting-started.md). -Enter `ignite` into your command line to see the commands offered by Ignite 2.0. +Enter `ignite` into your command line to see the commands offered by Ignite CLI. ### Add @@ -13,13 +13,13 @@ Enter `ignite` into your command line to see the commands offered by Ignite 2.0. ignite add {ignite plugin name} ``` -Adds an Ignite plugin. +Adds an Ignite CLI plugin. -Ignite plugins are just node plugins. They must have an index.js file with an +Ignite CLI plugins are just Node packages. They must have an index.js file with an `add` function. Calling `ignite add ` calls this function. Its job is to add the desired plugin to your project. It may modify files in your project. -You can find published Ignite plugins on npm, but you can also add unpublished +You can find published Ignite CLI plugins on npm, but you can also add unpublished plugins from source. To do so, simply pass the path to the plugin instead of its name. @@ -33,12 +33,12 @@ ignite doctor Checks your dev environment for dependencies. This command checks your dev environment for dependencies. It will list the version of -system, JavaScript, React Native, Ignite, Android, and iOS dependencies +system, JavaScript, React Native, Ignite CLI, Android, and iOS dependencies available on your machine, and where applicable, their location. This may be useful when debugging or when seeking help for an issue in forums. Especially handy is `ignite doctor --bug`, which opens webpage with pre-filled -out issue on Ignite's github. ***[NOTE: this doesn't seem to work yet]*** +out issue on Ignite CLI's github. ***[NOTE: this doesn't seem to work yet]*** ### Generate @@ -64,11 +64,11 @@ Run `ignite generate` by itself and it will list available generators. Run ignite new {Project name} ``` -Generate a new React Native project with Ignite. +Generate a new React Native project with Ignite CLI. -`ignite new` uses `react-native init`, then adds files specific to Ignite. +`ignite new` uses `react-native init`, then adds files specific to Ignite CLI. -When you execute this command, Ignite 2.0 will give you a series of options for +When you execute this command, Ignite CLI will give you a series of options for your new project regarding what libraries you would like to use. With `ignite new`, you have the option to pick your own boilerplate to install for your project. The default is `ignite-ir-boilerplate`, however you can change this by providing your own boilerplate available on `npm`. @@ -104,7 +104,7 @@ command or generator. ignite remove {ignite plugin name} [-y] ``` -Removes an Ignite plugin. You can add `-y` which automatically answers +Removes an Ignite CLI plugin. You can add `-y` which automatically answers "yes" to any confirmation questions. The opposite of `ignite add`, this removes a plugin from your project. Be warned @@ -120,12 +120,12 @@ ignite spork Copy templates as blueprints for this project -Ignite is opinionated. Spork lets you avoid those opinions by "forking" the -template. Like a 'fork' on a git repo. `ignite spork` looks at the generators, -then looks at the templates. You then select the things you want to make a copy -off. They then live in `ignite/Spork/...`. +Ignite's boilerplates are generally pretty opinionated. Spork lets you avoid those +opinions by "forking" the template. Like a 'fork' on a git repo. `ignite spork` +looks at the generators, then looks at the templates. You then select the things +you want to make a copy off. They then live in `ignite/Spork/...`. -After entering ignite spork, you will be presented with a list of available +After entering `ignite spork`, you will be presented with a list of available templates to spork. Cycle through them with arrow keys, select the desired templates with `space` and finish with `enter`. @@ -139,4 +139,4 @@ to your liking. For example, different linting, new headers, etc. ignite version ``` -Prints current version of installed ignite. +Prints current version of installed Ignite CLI. diff --git a/docs/quick-start/project-structure.md b/docs/quick-start/project-structure.md index 142ab60e2..a73be943e 100644 --- a/docs/quick-start/project-structure.md +++ b/docs/quick-start/project-structure.md @@ -1,8 +1,10 @@ # Project Structure -When creating a new React Native project with Ignite, your project will include a number of nested files and folders. This structure is one the React Native best practices included with Ignite. With this structure, your project already has a head start. Let's take a closer look at Ignite's structure and explain how to leverage its benefits. +When creating a new React Native project with Ignite CLI, your project will include a number of nested files and folders. This structure is one the React Native best practices included with Ignite's default boilerplate. With this structure, your project already has a head start. Let's take a closer look at Ignite's default structure and explain how to leverage its benefits. -## Ignite React Native vs Vanilla React Native +_NOTE: If you're using a different boilerplate, your project structure will likely look quite different._ + +## Ignite Boilerplate Structure vs Vanilla React Native Structure First let's take a look at a "Vanilla" React Native project's structure. To start, navigate to directory you'd like to create a new React Native project and run the `react-native init` command to create a project without Ignite. @@ -41,9 +43,9 @@ VanillaProject └── package.json ``` -Now create a new Ignite project and lets compare the folder structure: +Now create a new Ignite boilerplate project and lets compare the folder structure: -Note: TODO: Maybe like what options we select when creating a new Ignite project? +Note: TODO: Maybe like what options we select when creating a new Ignite boilerplate project? ``` cd .. @@ -51,7 +53,7 @@ ignite new IgniteProject cd IgniteProject ``` -The Ignite project's structure will look similar to this: +The Ignite boilerplate project's structure will look similar to this: ``` IgniteProject @@ -97,7 +99,7 @@ IgniteProject ## App directory -Included in an Ignite project is the App directory. This is a directory you would normal have to create when using vanilla React Native. +Included in an Ignite boilerplate project is the App directory. This is a directory you would normal have to create when using vanilla React Native. The inside of the App directory looks similar to the following: @@ -139,7 +141,7 @@ Also located here are two special containers: `App.js` and `RootContainer.js`. `RootContainer.js` is the first visual component in the app. It is the ancestor of all other screens and components. -You'll probably find you can get quite far in an Ignite app without even touching these two files. They, of course, belong to you, so when you're ready to add something non-visual, like Firebase, or something visual, like an overlay, you have places for these additions. +You'll probably find you can get quite far in an Ignite boilerplate app without even touching these two files. They, of course, belong to you, so when you're ready to add something non-visual, like Firebase, or something visual, like an overlay, you have places for these additions. **Containers ── Styles** This `/Containers/Styles` folder will house your container styles. Each container component will likely have a companion styles file, just like `/Components`. @@ -193,5 +195,4 @@ For example, you may: ## Ignite directory -TODO: -The Ignite directory stores all things Ignite. Here you will find generators, plugins and examples to help you get started with React Native. +The `ignite` directory stores all things Ignite, including CLI and boilerplate items. Here you will find generators, plugins and examples to help you get started with React Native. diff --git a/docs/quick-start/using-boilerplates.md b/docs/quick-start/using-boilerplates.md index a71994e08..8493c5acb 100644 --- a/docs/quick-start/using-boilerplates.md +++ b/docs/quick-start/using-boilerplates.md @@ -1,17 +1,17 @@ # Using Boilerplates You can use an boilerplate as the starting point for your app by creating a new -Ignite project with the `--boilerplate` flag: +Ignite CLI project with the `--boilerplate` (or `-b`) flag: ``` -ignite new MyIgniteApp --boilerplate {boilerplate name} +ignite new MyIgniteApp -b {boilerplate name} ``` -Ignite comes with a default boilerplate. +Ignite CLI comes with a default boilerplate. -It creates your app with a host of opinions and options. This boilerplate reflects the way that we at Infinite Red prefer to start our apps. This is also Ignite's default boilerplate; if you don't select a one, Ignite will use this. +It creates your app with a host of opinions and options. This boilerplate reflects the way that we at Infinite Red prefer to start our apps. This is also Ignite CLI's default boilerplate; if you don't select a one, Ignite CLI will use this. -You can opt out of a boilerplate entirely by passing the option `--no-boilerplate`. This will skip installing a boilerplate and only create a `ignite/ignite.json` file in your project; the bare minimum needed to become ignite sentient. +You can opt out of a boilerplate entirely by passing the option `--no-boilerplate`. This will skip installing a boilerplate and only create a `ignite/ignite.json` file in your project; the bare minimum needed to become Ignite CLI sentient. -We intend to release new boilerplates as best practices change. For example, [React Navigation](https://reactnavigation.org) is a great new navigation library that we intend to support as soon as we feel it's ready. It will likely be released as a new boilerplate package, which in a future release of Ignite will be set to default once it's stable. +We intend to release new boilerplates as best practices change. For example, [React Navigation](https://reactnavigation.org) is a great new navigation library that we intend to support as soon as we feel it's ready. It will likely be released as a new boilerplate package, which in a future release of Ignite will be set to default once it's stable. You can view an unstable version in our [`ignite-ir-next` boilerplate](https://github.com/infinitered/ignite-ir-next). diff --git a/lerna.json b/lerna.json deleted file mode 100644 index b12080b63..000000000 --- a/lerna.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "lerna": "2.0.0-beta.38", - "packages": [ - "packages/*" - ], - "version": "2.0.0-beta.9", - "commands": { - "publish": { - "ignore": [ - "*.md", - "test", - "tests" - ] - } - } -} diff --git a/package.json b/package.json index fa5fb1042..052017883 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,64 @@ { - "name": "ignite-monorepo", - "version": "2.0.0", - "private": true, - "description": "The Ignite universe.", + "name": "ignite-cli", + "version": "2.0.0-beta.9", + "description": "An unfair headstart for your React Native apps.", + "bin": { + "ignite": "bin/ignite" + }, + "preferGlobal": true, "scripts": { - "bootstrap": "lerna bootstrap", - "lint": "lerna run lint --concurrency 1", - "test": "lerna run test", - "clean": "lerna clean", - "publish": "lerna publish --npm-tag next" + "test": "ava tests/fast", + "watch": "ava tests/fast --watch", + "coverage": "nyc ava", + "start": "node src/index.js", + "lint": "standard", + "integration": "ava -s tests/integration" }, "repository": "infinitered/ignite", - "license": "MIT", - "devDependencies": { - "lerna": "2.0.0-beta.38" - }, - "dependencies": {}, "author": { "name": "Infinite Red", "email": "npm@infinite.red", "url": "https://github.com/infinitered/ignite" + }, + "contributors": [ + "https://github.com/infinitered/ignite/graphs/contributors" + ], + "files": [ + "readme.md", + "src", + "bin" + ], + "license": "MIT", + "dependencies": { + "execa": "^0.6.0", + "fs-jetpack": "^0.11.0", + "gluegun": "^0.17.1", + "gluegun-patching": "^0.3.0", + "minimist": "^1.2.0", + "pretty-error": "^2.0.2", + "ramda": "^0.23.0", + "ramdasauce": "^1.2.0", + "semver": "^5.3.0", + "shelljs": "^0.7.6", + "which": "^1.2.14" + }, + "devDependencies": { + "ava": "^0.18.1", + "babel-eslint": "^7.1.1", + "mock-fs": "git://github.com/not-an-aardvark/mock-fs/#06868bbd7724707f9324b237bdde28f05f7a01d5", + "mockery": "^2.0.0", + "nyc": "^10.1.2", + "standard": "^8.6.0" + }, + "ava": {}, + "standard": { + "parser": "babel-eslint", + "globals": [ + "__DEV__" + ] + }, + "devEngines": { + "node": ">=7.x", + "npm": ">=4.x" } } diff --git a/packages/ignite-cli/.gitignore b/packages/ignite-cli/.gitignore deleted file mode 100644 index 86d4c2dd3..000000000 --- a/packages/ignite-cli/.gitignore +++ /dev/null @@ -1 +0,0 @@ -generated diff --git a/packages/ignite-cli/package.json b/packages/ignite-cli/package.json deleted file mode 100644 index 052017883..000000000 --- a/packages/ignite-cli/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "ignite-cli", - "version": "2.0.0-beta.9", - "description": "An unfair headstart for your React Native apps.", - "bin": { - "ignite": "bin/ignite" - }, - "preferGlobal": true, - "scripts": { - "test": "ava tests/fast", - "watch": "ava tests/fast --watch", - "coverage": "nyc ava", - "start": "node src/index.js", - "lint": "standard", - "integration": "ava -s tests/integration" - }, - "repository": "infinitered/ignite", - "author": { - "name": "Infinite Red", - "email": "npm@infinite.red", - "url": "https://github.com/infinitered/ignite" - }, - "contributors": [ - "https://github.com/infinitered/ignite/graphs/contributors" - ], - "files": [ - "readme.md", - "src", - "bin" - ], - "license": "MIT", - "dependencies": { - "execa": "^0.6.0", - "fs-jetpack": "^0.11.0", - "gluegun": "^0.17.1", - "gluegun-patching": "^0.3.0", - "minimist": "^1.2.0", - "pretty-error": "^2.0.2", - "ramda": "^0.23.0", - "ramdasauce": "^1.2.0", - "semver": "^5.3.0", - "shelljs": "^0.7.6", - "which": "^1.2.14" - }, - "devDependencies": { - "ava": "^0.18.1", - "babel-eslint": "^7.1.1", - "mock-fs": "git://github.com/not-an-aardvark/mock-fs/#06868bbd7724707f9324b237bdde28f05f7a01d5", - "mockery": "^2.0.0", - "nyc": "^10.1.2", - "standard": "^8.6.0" - }, - "ava": {}, - "standard": { - "parser": "babel-eslint", - "globals": [ - "__DEV__" - ] - }, - "devEngines": { - "node": ">=7.x", - "npm": ">=4.x" - } -} diff --git a/packages/ignite-cli/readme.md b/packages/ignite-cli/readme.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/ignite-cli/src/brand/header.js b/src/brand/header.js similarity index 100% rename from packages/ignite-cli/src/brand/header.js rename to src/brand/header.js diff --git a/packages/ignite-cli/src/cli/check.js b/src/cli/check.js similarity index 94% rename from packages/ignite-cli/src/cli/check.js rename to src/cli/check.js index fbd6a8960..f0eb81543 100644 --- a/packages/ignite-cli/src/cli/check.js +++ b/src/cli/check.js @@ -43,7 +43,7 @@ if (!rnCli) { if (badRN.code === 0) { console.log('\n' + 'It appears you have the global npm package \'react-native\' installed. This causes problems\n' + - 'with Ignite. You may have installed this by mistake. Instead, you probably want the\n' + + 'with Ignite CLI. You may have installed this by mistake. Instead, you probably want the\n' + 'react-native-cli npm package.\n' + '\n' + 'npm uninstall -g react-native\n' + diff --git a/packages/ignite-cli/src/cli/cli.js b/src/cli/cli.js similarity index 100% rename from packages/ignite-cli/src/cli/cli.js rename to src/cli/cli.js diff --git a/packages/ignite-cli/src/cli/enforceGlobalDependency.js b/src/cli/enforceGlobalDependency.js similarity index 97% rename from packages/ignite-cli/src/cli/enforceGlobalDependency.js rename to src/cli/enforceGlobalDependency.js index 283ef08da..5f73fa1a9 100644 --- a/packages/ignite-cli/src/cli/enforceGlobalDependency.js +++ b/src/cli/enforceGlobalDependency.js @@ -59,7 +59,7 @@ function enforce (opts = {}) { * @param {string} installedVersion - current version if installed. */ function printNotMetMessage (installedVersion) { - console.log('Ignite requires ' + packageName + ' ' + range + ' to be installed.') + console.log('Ignite CLI requires ' + packageName + ' ' + range + ' to be installed.') if (installedVersion) { console.log('') console.log('You currently have ' + installedVersion + ' installed.') diff --git a/packages/ignite-cli/src/commands/add.js b/src/commands/add.js similarity index 100% rename from packages/ignite-cli/src/commands/add.js rename to src/commands/add.js diff --git a/packages/ignite-cli/src/commands/attach.js b/src/commands/attach.js similarity index 88% rename from packages/ignite-cli/src/commands/attach.js rename to src/commands/attach.js index 6d7c9f469..5a3f4a113 100644 --- a/packages/ignite-cli/src/commands/attach.js +++ b/src/commands/attach.js @@ -1,4 +1,4 @@ -// @cliDescription Attaches Ignite to an existing project. +// @cliDescription Attaches Ignite CLI to an existing project. const isIgniteDirectory = require('../lib/isIgniteDirectory') @@ -7,7 +7,7 @@ module.exports = async function (context) { // ensure we're in a supported directory if (isIgniteDirectory(process.cwd())) { - context.print.info('🍻 Good news! This project is already Ignite-enabled!') + context.print.info('🍻 Good news! This project is already Ignite CLI-enabled!') return } diff --git a/packages/ignite-cli/src/commands/boilerplate-install.js b/src/commands/boilerplate-install.js similarity index 100% rename from packages/ignite-cli/src/commands/boilerplate-install.js rename to src/commands/boilerplate-install.js diff --git a/packages/ignite-cli/src/commands/doctor.js b/src/commands/doctor.js similarity index 100% rename from packages/ignite-cli/src/commands/doctor.js rename to src/commands/doctor.js diff --git a/packages/ignite-cli/src/commands/easter.js b/src/commands/easter.js similarity index 100% rename from packages/ignite-cli/src/commands/easter.js rename to src/commands/easter.js diff --git a/packages/ignite-cli/src/commands/generate.js b/src/commands/generate.js similarity index 100% rename from packages/ignite-cli/src/commands/generate.js rename to src/commands/generate.js diff --git a/packages/ignite-cli/src/commands/new.js b/src/commands/new.js similarity index 99% rename from packages/ignite-cli/src/commands/new.js rename to src/commands/new.js index 2a3f082f4..1ca863bb0 100644 --- a/packages/ignite-cli/src/commands/new.js +++ b/src/commands/new.js @@ -1,4 +1,4 @@ -// @cliDescription Generate a new React Native project with Ignite. +// @cliDescription Generate a new React Native project with Ignite CLI. // @cliAlias n // ---------------------------------------------------------------------------- const isIgniteDirectory = require('../lib/isIgniteDirectory') diff --git a/packages/ignite-cli/src/commands/plugin.js b/src/commands/plugin.js similarity index 98% rename from packages/ignite-cli/src/commands/plugin.js rename to src/commands/plugin.js index 957175dc4..7b466efb9 100644 --- a/packages/ignite-cli/src/commands/plugin.js +++ b/src/commands/plugin.js @@ -118,7 +118,7 @@ const createNewPlugin = async (context) => { */ const showHelp = (context) => { const instructions = ` -Generates an Ignite-compatible plugin in the current folder. +Generates an Ignite CLI-compatible plugin in the current folder. Generally, you would run this from ./YourApp/ignite/plugins/ Commands: diff --git a/packages/ignite-cli/src/commands/remove.js b/src/commands/remove.js similarity index 98% rename from packages/ignite-cli/src/commands/remove.js rename to src/commands/remove.js index 4a6f57bc4..5f9d7a2bf 100644 --- a/packages/ignite-cli/src/commands/remove.js +++ b/src/commands/remove.js @@ -1,4 +1,4 @@ -// @cliDescription Removes an Ignite plugin. +// @cliDescription Removes an Ignite CLI plugin. // @cliAlias r // ---------------------------------------------------------------------------- diff --git a/packages/ignite-cli/src/commands/spork.js b/src/commands/spork.js similarity index 100% rename from packages/ignite-cli/src/commands/spork.js rename to src/commands/spork.js diff --git a/packages/ignite-cli/src/commands/version.js b/src/commands/version.js similarity index 100% rename from packages/ignite-cli/src/commands/version.js rename to src/commands/version.js diff --git a/packages/ignite-cli/src/extensions/ignite.js b/src/extensions/ignite.js similarity index 89% rename from packages/ignite-cli/src/extensions/ignite.js rename to src/extensions/ignite.js index b14ac4b26..7f6b7e249 100644 --- a/packages/ignite-cli/src/extensions/ignite.js +++ b/src/extensions/ignite.js @@ -1,4 +1,4 @@ -// This is the Ignite extension. It gets parked on `context.ignite` and each +// This is the Ignite CLI extension. It gets parked on `context.ignite` and each // of the functions defined here are available as functions on that. // bring in each of the constituents @@ -8,14 +8,14 @@ const findIgnitePluginsExt = require('./ignite/findIgnitePlugins') const addModuleExt = require('./ignite/addModule') const addAndroidPermissionExt = require('./ignite/addAndroidPermission') const removeModuleExt = require('./ignite/removeModule') -const addScreenExamplesExt = require('./ignite/addScreenExamples') // Deprecated 3/2/17, Ignite 2 Beta +const addScreenExamplesExt = require('./ignite/addScreenExamples') // Deprecated 3/2/17, Ignite CLI Beta const addPluginScreenExamplesExt = require('./ignite/addPluginScreenExamples') -const removeScreenExamplesExt = require('./ignite/removeScreenExamples') // Deprecated 3/2/17, Ignite 2 Beta +const removeScreenExamplesExt = require('./ignite/removeScreenExamples') // Deprecated 3/2/17, Ignite CLI Beta const removePluginScreenExamplesExt = require('./ignite/removePluginScreenExamples') const copyBatchExt = require('./ignite/copyBatch') -const addComponentExampleExt = require('./ignite/addComponentExample') // Deprecated 3/2/17, Ignite 2 Beta +const addComponentExampleExt = require('./ignite/addComponentExample') // Deprecated 3/2/17, Ignite CLI Beta const addPluginComponentExampleExt = require('./ignite/addPluginComponentExample') -const removeComponentExampleExt = require('./ignite/removeComponentExample') // Deprecated 3/2/17, Ignite 2 Beta +const removeComponentExampleExt = require('./ignite/removeComponentExample') // Deprecated 3/2/17, Ignite CLI Beta const removePluginComponentExampleExt = require('./ignite/removePluginComponentExample') const removeAndroidPermissionExt = require('./ignite/removeAndroidPermission') const setDebugConfigExt = require('./ignite/setDebugConfig') @@ -68,13 +68,13 @@ function attach (plugin, command, context) { addAndroidPermission: addAndroidPermissionExt(plugin, command, context), removeModule: removeModuleExt(plugin, command, context), copyBatch: copyBatchExt(plugin, command, context), - addComponentExample: addComponentExampleExt(plugin, command, context), // Deprecated 3/2/17, Ignite 2 Beta + addComponentExample: addComponentExampleExt(plugin, command, context), // Deprecated 3/2/17, Ignite CLI Beta addPluginComponentExample: addPluginComponentExampleExt(plugin, command, context), - removeComponentExample: removeComponentExampleExt(plugin, command, context), // Deprecated 3/2/17, Ignite 2 Beta + removeComponentExample: removeComponentExampleExt(plugin, command, context), // Deprecated 3/2/17, Ignite CLI Beta removePluginComponentExample: removePluginComponentExampleExt(plugin, command, context), - addScreenExamples: addScreenExamplesExt(plugin, command, context), // Deprecated 3/2/17, Ignite 2 Beta + addScreenExamples: addScreenExamplesExt(plugin, command, context), // Deprecated 3/2/17, Ignite CLI Beta addPluginScreenExamples: addPluginScreenExamplesExt(plugin, command, context), - removeScreenExamples: removeScreenExamplesExt(plugin, command, context), // Deprecated 3/2/17, Ignite 2 Beta + removeScreenExamples: removeScreenExamplesExt(plugin, command, context), // Deprecated 3/2/17, Ignite CLI Beta removePluginScreenExamples: removePluginScreenExamplesExt(plugin, command, context), removeAndroidPermission: removeAndroidPermissionExt(plugin, command, context), setDebugConfig: setDebugConfigExt(plugin, command, context), diff --git a/packages/ignite-cli/src/extensions/ignite/addAndroidPermission.js b/src/extensions/ignite/addAndroidPermission.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/addAndroidPermission.js rename to src/extensions/ignite/addAndroidPermission.js diff --git a/packages/ignite-cli/src/extensions/ignite/addComponentExample.js b/src/extensions/ignite/addComponentExample.js similarity index 85% rename from packages/ignite-cli/src/extensions/ignite/addComponentExample.js rename to src/extensions/ignite/addComponentExample.js index bcae7d5ea..1dde98236 100644 --- a/packages/ignite-cli/src/extensions/ignite/addComponentExample.js +++ b/src/extensions/ignite/addComponentExample.js @@ -5,7 +5,7 @@ module.exports = (plugin, command, context) => { * @param {string} fileName - The js file to create. (.ejs will be appended to pick up the template.) * @param {Object} props - The properties to use for template expansion. */ - // DEPRECATED as of 3/2/17 as part of Ignite 2 Beta (https://github.com/infinitered/ignite/issues/636) + // DEPRECATED as of 3/2/17 as part of Ignite CLI Beta (https://github.com/infinitered/ignite/issues/636) async function addComponentExample (fileName, props = {}) { const { ignite, print } = context print.warning('DEPRECATION WARNING: Heads up! `ignite.addComponentExample` is deprecated. Please use `ignite.addPluginComponentExample` instead!') diff --git a/packages/ignite-cli/src/extensions/ignite/addModule.js b/src/extensions/ignite/addModule.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/addModule.js rename to src/extensions/ignite/addModule.js diff --git a/packages/ignite-cli/src/extensions/ignite/addPluginComponentExample.js b/src/extensions/ignite/addPluginComponentExample.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/addPluginComponentExample.js rename to src/extensions/ignite/addPluginComponentExample.js diff --git a/packages/ignite-cli/src/extensions/ignite/addPluginScreenExamples.js b/src/extensions/ignite/addPluginScreenExamples.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/addPluginScreenExamples.js rename to src/extensions/ignite/addPluginScreenExamples.js diff --git a/packages/ignite-cli/src/extensions/ignite/addScreenExamples.js b/src/extensions/ignite/addScreenExamples.js similarity index 88% rename from packages/ignite-cli/src/extensions/ignite/addScreenExamples.js rename to src/extensions/ignite/addScreenExamples.js index 678bdaee0..b72519c14 100644 --- a/packages/ignite-cli/src/extensions/ignite/addScreenExamples.js +++ b/src/extensions/ignite/addScreenExamples.js @@ -12,7 +12,7 @@ module.exports = (plugin, command, context) => { * {title: 'Section Example', screen: 'Section.js', ancillary: ['file']}, * ]) */ - // DEPRECATED as of 3/2/17 as part of Ignite 2 Beta (https://github.com/infinitered/ignite/issues/636) + // DEPRECATED as of 3/2/17 as part of Ignite CLI Beta (https://github.com/infinitered/ignite/issues/636) async function addScreenExamples (files, props = {}) { const { ignite, print } = context print.warning('DEPRECATION_WARNING: Heads up! `ignite.addScreenExamples` is deprecated. Please use `ignite.addPluginScreenExamples` instead.') diff --git a/packages/ignite-cli/src/extensions/ignite/copyBatch.js b/src/extensions/ignite/copyBatch.js similarity index 96% rename from packages/ignite-cli/src/extensions/ignite/copyBatch.js rename to src/extensions/ignite/copyBatch.js index f946953c9..256ebaaa1 100644 --- a/packages/ignite-cli/src/extensions/ignite/copyBatch.js +++ b/src/extensions/ignite/copyBatch.js @@ -2,7 +2,7 @@ module.exports = (plugin, command, context) => { /** * Runs a series of jobs through the templating system. * - * @param {any} context - The Ignite context + * @param {any} context - The Ignite CLI context * @param {any[]} jobs - A list of jobs to run. * @param {any} props - The props to use for variable replacement. * @param {any} opts - Additional options diff --git a/packages/ignite-cli/src/extensions/ignite/findIgnitePlugins.js b/src/extensions/ignite/findIgnitePlugins.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/findIgnitePlugins.js rename to src/extensions/ignite/findIgnitePlugins.js diff --git a/packages/ignite-cli/src/extensions/ignite/generate.js b/src/extensions/ignite/generate.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/generate.js rename to src/extensions/ignite/generate.js diff --git a/packages/ignite-cli/src/extensions/ignite/igniteConfig.js b/src/extensions/ignite/igniteConfig.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/igniteConfig.js rename to src/extensions/ignite/igniteConfig.js diff --git a/packages/ignite-cli/src/extensions/ignite/ignitePluginPath.js b/src/extensions/ignite/ignitePluginPath.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/ignitePluginPath.js rename to src/extensions/ignite/ignitePluginPath.js diff --git a/packages/ignite-cli/src/extensions/ignite/log.js b/src/extensions/ignite/log.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/log.js rename to src/extensions/ignite/log.js diff --git a/packages/ignite-cli/src/extensions/ignite/patchInFile.js b/src/extensions/ignite/patchInFile.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/patchInFile.js rename to src/extensions/ignite/patchInFile.js diff --git a/packages/ignite-cli/src/extensions/ignite/pluginOverrides.js b/src/extensions/ignite/pluginOverrides.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/pluginOverrides.js rename to src/extensions/ignite/pluginOverrides.js diff --git a/packages/ignite-cli/src/extensions/ignite/removeAndroidPermission.js b/src/extensions/ignite/removeAndroidPermission.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/removeAndroidPermission.js rename to src/extensions/ignite/removeAndroidPermission.js diff --git a/packages/ignite-cli/src/extensions/ignite/removeComponentExample.js b/src/extensions/ignite/removeComponentExample.js similarity index 80% rename from packages/ignite-cli/src/extensions/ignite/removeComponentExample.js rename to src/extensions/ignite/removeComponentExample.js index 1cade6ab6..785163abe 100644 --- a/packages/ignite-cli/src/extensions/ignite/removeComponentExample.js +++ b/src/extensions/ignite/removeComponentExample.js @@ -2,7 +2,7 @@ module.exports = (plugin, command, context) => { /** * Removes the component example. */ - // DEPRECATED as of 3/2/17 as part of Ignite 2 Beta (https://github.com/infinitered/ignite/issues/636) + // DEPRECATED as of 3/2/17 as part of Ignite CLI Beta (https://github.com/infinitered/ignite/issues/636) function removeComponentExample (fileName) { const { print, ignite } = context print.warning('DEPRECATION_WARNING: Heads up! `ignite.removeComponentExample` is deprecated. Please use `ignite.removePluginComponentExample` instead.') diff --git a/packages/ignite-cli/src/extensions/ignite/removeDebugConfig.js b/src/extensions/ignite/removeDebugConfig.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/removeDebugConfig.js rename to src/extensions/ignite/removeDebugConfig.js diff --git a/packages/ignite-cli/src/extensions/ignite/removeModule.js b/src/extensions/ignite/removeModule.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/removeModule.js rename to src/extensions/ignite/removeModule.js diff --git a/packages/ignite-cli/src/extensions/ignite/removePluginComponentExample.js b/src/extensions/ignite/removePluginComponentExample.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/removePluginComponentExample.js rename to src/extensions/ignite/removePluginComponentExample.js diff --git a/packages/ignite-cli/src/extensions/ignite/removePluginScreenExamples.js b/src/extensions/ignite/removePluginScreenExamples.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/removePluginScreenExamples.js rename to src/extensions/ignite/removePluginScreenExamples.js diff --git a/packages/ignite-cli/src/extensions/ignite/removeScreenExamples.js b/src/extensions/ignite/removeScreenExamples.js similarity index 86% rename from packages/ignite-cli/src/extensions/ignite/removeScreenExamples.js rename to src/extensions/ignite/removeScreenExamples.js index 0e1342025..0e8e5fbeb 100644 --- a/packages/ignite-cli/src/extensions/ignite/removeScreenExamples.js +++ b/src/extensions/ignite/removeScreenExamples.js @@ -11,7 +11,7 @@ module.exports = (plugin, command, context) => { * {screen: 'Section.js', ancillary: ['file']}, * ]) */ - // DEPRECATED as of 3/2/17 as part of Ignite 2 Beta (https://github.com/infinitered/ignite/issues/636) + // DEPRECATED as of 3/2/17 as part of Ignite CLI Beta (https://github.com/infinitered/ignite/issues/636) async function removeScreenExamples (files) { const { ignite, print } = context print.warning('DEPRECATION_WARNING: Heads up! `ignite.removeScreenExamples` is deprecated. Please use `ignite.removePluginScreenExamples` instead.') diff --git a/packages/ignite-cli/src/extensions/ignite/setDebugConfig.js b/src/extensions/ignite/setDebugConfig.js similarity index 95% rename from packages/ignite-cli/src/extensions/ignite/setDebugConfig.js rename to src/extensions/ignite/setDebugConfig.js index 5d4b25223..880574e8f 100644 --- a/packages/ignite-cli/src/extensions/ignite/setDebugConfig.js +++ b/src/extensions/ignite/setDebugConfig.js @@ -13,7 +13,7 @@ module.exports = (plugin, command, context) => { const debugConfig = `${process.cwd()}/App/Config/DebugConfig.js` if (!filesystem.exists(debugConfig)) { - const msg = 'No `App/Config/DebugConfig.js` file found in this folder, are you sure it is an Ignite project?' + const msg = 'No `App/Config/DebugConfig.js` file found in this folder, are you sure it is an Ignite CLI project?' print.error(msg) process.exit(exitCodes.GENERIC) } diff --git a/packages/ignite-cli/src/extensions/ignite/version.js b/src/extensions/ignite/version.js similarity index 100% rename from packages/ignite-cli/src/extensions/ignite/version.js rename to src/extensions/ignite/version.js diff --git a/packages/ignite-cli/src/extensions/patching.js b/src/extensions/patching.js similarity index 100% rename from packages/ignite-cli/src/extensions/patching.js rename to src/extensions/patching.js diff --git a/packages/ignite-cli/src/extensions/reactNative.js b/src/extensions/reactNative.js similarity index 100% rename from packages/ignite-cli/src/extensions/reactNative.js rename to src/extensions/reactNative.js diff --git a/packages/ignite-cli/src/lib/addEmptyBoilerplate.js b/src/lib/addEmptyBoilerplate.js similarity index 100% rename from packages/ignite-cli/src/lib/addEmptyBoilerplate.js rename to src/lib/addEmptyBoilerplate.js diff --git a/packages/ignite-cli/src/lib/detectInstall.js b/src/lib/detectInstall.js similarity index 100% rename from packages/ignite-cli/src/lib/detectInstall.js rename to src/lib/detectInstall.js diff --git a/packages/ignite-cli/src/lib/detectedChanges.js b/src/lib/detectedChanges.js similarity index 100% rename from packages/ignite-cli/src/lib/detectedChanges.js rename to src/lib/detectedChanges.js diff --git a/packages/ignite-cli/src/lib/exitCodes.js b/src/lib/exitCodes.js similarity index 95% rename from packages/ignite-cli/src/lib/exitCodes.js rename to src/lib/exitCodes.js index d6ccaa47a..478d8117a 100644 --- a/packages/ignite-cli/src/lib/exitCodes.js +++ b/src/lib/exitCodes.js @@ -53,7 +53,7 @@ module.exports = { REACT_NATIVE_INSTALL: 9, /** - * This is not a compatible Ignite directory. + * This is not a compatible Ignite CLI directory. */ NOT_IGNITE_PROJECT: 10, diff --git a/packages/ignite-cli/src/lib/findPluginFile.js b/src/lib/findPluginFile.js similarity index 100% rename from packages/ignite-cli/src/lib/findPluginFile.js rename to src/lib/findPluginFile.js diff --git a/packages/ignite-cli/src/lib/importPlugin.js b/src/lib/importPlugin.js similarity index 92% rename from packages/ignite-cli/src/lib/importPlugin.js rename to src/lib/importPlugin.js index cc9cd1d85..3fa244b01 100644 --- a/packages/ignite-cli/src/lib/importPlugin.js +++ b/src/lib/importPlugin.js @@ -102,18 +102,6 @@ async function safelyImportPlugin (context, specs) { ignite.pluginOverrides.forEach(dir => { print.info(` β–Έ ${dir}`) }) - print.error('') - print.error( - ' During Ignite 2 alpha, please consider setting this\n environment variable:\n' - ) - print.info( - ` export IGNITE_PLUGIN_PATH=${path.resolve( - __dirname, - '..', - '..', - '..' - )}` - ) print.info( print.colors.muted( '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-' diff --git a/packages/ignite-cli/src/lib/isIgniteDirectory.js b/src/lib/isIgniteDirectory.js similarity index 100% rename from packages/ignite-cli/src/lib/isIgniteDirectory.js rename to src/lib/isIgniteDirectory.js diff --git a/packages/ignite-cli/src/lib/prependIgnite.js b/src/lib/prependIgnite.js similarity index 100% rename from packages/ignite-cli/src/lib/prependIgnite.js rename to src/lib/prependIgnite.js diff --git a/packages/ignite-cli/src/templates/plugin/README.md b/src/templates/plugin/README.md similarity index 100% rename from packages/ignite-cli/src/templates/plugin/README.md rename to src/templates/plugin/README.md diff --git a/packages/ignite-cli/src/templates/plugin/boilerplate.js.ejs b/src/templates/plugin/boilerplate.js.ejs similarity index 97% rename from packages/ignite-cli/src/templates/plugin/boilerplate.js.ejs rename to src/templates/plugin/boilerplate.js.ejs index 059948a6e..c7fb618c9 100644 --- a/packages/ignite-cli/src/templates/plugin/boilerplate.js.ejs +++ b/src/templates/plugin/boilerplate.js.ejs @@ -2,7 +2,7 @@ * This file provides an `install` function that should install React Native, * copy over any folders and template files, and install any desired plugins. * - * It's a simpler version of the one found in the Ignite source called + * It's a simpler version of the one found in the Ignite CLI source called * `ignite-ir-boilerplate-2016`. Refer to that one to see a more full featured * example of what you can do. * diff --git a/packages/ignite-cli/src/templates/plugin/boilerplate/App/App.js b/src/templates/plugin/boilerplate/App/App.js similarity index 100% rename from packages/ignite-cli/src/templates/plugin/boilerplate/App/App.js rename to src/templates/plugin/boilerplate/App/App.js diff --git a/packages/ignite-cli/src/templates/plugin/boilerplate/Tests/AppTest.js b/src/templates/plugin/boilerplate/Tests/AppTest.js similarity index 100% rename from packages/ignite-cli/src/templates/plugin/boilerplate/Tests/AppTest.js rename to src/templates/plugin/boilerplate/Tests/AppTest.js diff --git a/packages/ignite-cli/src/templates/plugin/boilerplate/ignite/ignite.json b/src/templates/plugin/boilerplate/ignite/ignite.json similarity index 100% rename from packages/ignite-cli/src/templates/plugin/boilerplate/ignite/ignite.json rename to src/templates/plugin/boilerplate/ignite/ignite.json diff --git a/packages/ignite-cli/src/templates/plugin/boilerplate/index.js.ejs.ejs b/src/templates/plugin/boilerplate/index.js.ejs.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/boilerplate/index.js.ejs.ejs rename to src/templates/plugin/boilerplate/index.js.ejs.ejs diff --git a/packages/ignite-cli/src/templates/plugin/commands/thing.js.ejs b/src/templates/plugin/commands/thing.js.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/commands/thing.js.ejs rename to src/templates/plugin/commands/thing.js.ejs diff --git a/packages/ignite-cli/src/templates/plugin/gitignore b/src/templates/plugin/gitignore similarity index 100% rename from packages/ignite-cli/src/templates/plugin/gitignore rename to src/templates/plugin/gitignore diff --git a/packages/ignite-cli/src/templates/plugin/ignite.json.ejs b/src/templates/plugin/ignite.json.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/ignite.json.ejs rename to src/templates/plugin/ignite.json.ejs diff --git a/packages/ignite-cli/src/templates/plugin/package.json.ejs b/src/templates/plugin/package.json.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/package.json.ejs rename to src/templates/plugin/package.json.ejs diff --git a/packages/ignite-cli/src/templates/plugin/plugin.js.ejs b/src/templates/plugin/plugin.js.ejs similarity index 96% rename from packages/ignite-cli/src/templates/plugin/plugin.js.ejs rename to src/templates/plugin/plugin.js.ejs index f6e5a9dca..d26a66cab 100644 --- a/packages/ignite-cli/src/templates/plugin/plugin.js.ejs +++ b/src/templates/plugin/plugin.js.ejs @@ -1,4 +1,4 @@ -// Ignite plugin for <%= props.name %> +// Ignite CLI plugin for <%= props.name %> // ---------------------------------------------------------------------------- const NPM_MODULE_NAME = 'react-native-MODULENAME' @@ -51,6 +51,6 @@ const remove = async function (context) { // ) } -// Required in all Ignite plugins +// Required in all Ignite CLI plugins module.exports = { add, remove } diff --git a/packages/ignite-cli/src/templates/plugin/templates/Example.js.ejs b/src/templates/plugin/templates/Example.js.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/templates/Example.js.ejs rename to src/templates/plugin/templates/Example.js.ejs diff --git a/packages/ignite-cli/src/templates/plugin/templates/thing.js.ejs.ejs b/src/templates/plugin/templates/thing.js.ejs.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/templates/thing.js.ejs.ejs rename to src/templates/plugin/templates/thing.js.ejs.ejs diff --git a/packages/ignite-cli/src/templates/plugin/test/add.js.ejs b/src/templates/plugin/test/add.js.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/test/add.js.ejs rename to src/templates/plugin/test/add.js.ejs diff --git a/packages/ignite-cli/src/templates/plugin/test/interface.js.ejs b/src/templates/plugin/test/interface.js.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/test/interface.js.ejs rename to src/templates/plugin/test/interface.js.ejs diff --git a/packages/ignite-cli/src/templates/plugin/test/remove.js.ejs b/src/templates/plugin/test/remove.js.ejs similarity index 100% rename from packages/ignite-cli/src/templates/plugin/test/remove.js.ejs rename to src/templates/plugin/test/remove.js.ejs diff --git a/packages/ignite-cli/tests/fast/brand/header.test.js b/tests/fast/brand/header.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/brand/header.test.js rename to tests/fast/brand/header.test.js diff --git a/packages/ignite-cli/tests/fast/cli/_mockGluegunBuilder.js b/tests/fast/cli/_mockGluegunBuilder.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/_mockGluegunBuilder.js rename to tests/fast/cli/_mockGluegunBuilder.js diff --git a/packages/ignite-cli/tests/fast/cli/cliConfig.test.js b/tests/fast/cli/cliConfig.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/cliConfig.test.js rename to tests/fast/cli/cliConfig.test.js diff --git a/packages/ignite-cli/tests/fast/cli/cliEmpty.test.js b/tests/fast/cli/cliEmpty.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/cliEmpty.test.js rename to tests/fast/cli/cliEmpty.test.js diff --git a/packages/ignite-cli/tests/fast/cli/cliError.test.js b/tests/fast/cli/cliError.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/cliError.test.js rename to tests/fast/cli/cliError.test.js diff --git a/packages/ignite-cli/tests/fast/cli/cliVersionViaSwitches.test.js b/tests/fast/cli/cliVersionViaSwitches.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/cliVersionViaSwitches.test.js rename to tests/fast/cli/cliVersionViaSwitches.test.js diff --git a/packages/ignite-cli/tests/fast/cli/cliWtf.test.js b/tests/fast/cli/cliWtf.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/cli/cliWtf.test.js rename to tests/fast/cli/cliWtf.test.js diff --git a/packages/ignite-cli/tests/fast/extensions/findIgnitePlugins.test.js b/tests/fast/extensions/findIgnitePlugins.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/extensions/findIgnitePlugins.test.js rename to tests/fast/extensions/findIgnitePlugins.test.js diff --git a/packages/ignite-cli/tests/fast/extensions/ignite.test.js b/tests/fast/extensions/ignite.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/extensions/ignite.test.js rename to tests/fast/extensions/ignite.test.js diff --git a/packages/ignite-cli/tests/fast/fixtures/ignite-valid-plugin/package.json b/tests/fast/fixtures/ignite-valid-plugin/package.json similarity index 100% rename from packages/ignite-cli/tests/fast/fixtures/ignite-valid-plugin/package.json rename to tests/fast/fixtures/ignite-valid-plugin/package.json diff --git a/packages/ignite-cli/tests/fast/lib/detectInstall.test.js b/tests/fast/lib/detectInstall.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/lib/detectInstall.test.js rename to tests/fast/lib/detectInstall.test.js diff --git a/packages/ignite-cli/tests/fast/lib/detectedChanges.test.js b/tests/fast/lib/detectedChanges.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/lib/detectedChanges.test.js rename to tests/fast/lib/detectedChanges.test.js diff --git a/packages/ignite-cli/tests/fast/lib/exitCodes.test.js b/tests/fast/lib/exitCodes.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/lib/exitCodes.test.js rename to tests/fast/lib/exitCodes.test.js diff --git a/packages/ignite-cli/tests/fast/lib/isIgniteDirectory.test.js b/tests/fast/lib/isIgniteDirectory.test.js similarity index 100% rename from packages/ignite-cli/tests/fast/lib/isIgniteDirectory.test.js rename to tests/fast/lib/isIgniteDirectory.test.js diff --git a/packages/ignite-cli/tests/integration/ignite-cli/badCommands.test.js b/tests/integration/ignite-cli/badCommands.test.js similarity index 91% rename from packages/ignite-cli/tests/integration/ignite-cli/badCommands.test.js rename to tests/integration/ignite-cli/badCommands.test.js index bf76cce1e..686514917 100644 --- a/packages/ignite-cli/tests/integration/ignite-cli/badCommands.test.js +++ b/tests/integration/ignite-cli/badCommands.test.js @@ -2,7 +2,7 @@ const test = require('ava') const execa = require('execa') const { contains } = require('ramda') -const IGNITE = '../ignite-cli/bin/ignite' +const IGNITE = './bin/ignite' test('unknown command', async t => { const result = await execa(IGNITE, ['OMGWTFBBQ']) diff --git a/packages/ignite-cli/tests/integration/ignite-cli/noArgs.test.js b/tests/integration/ignite-cli/noArgs.test.js similarity index 88% rename from packages/ignite-cli/tests/integration/ignite-cli/noArgs.test.js rename to tests/integration/ignite-cli/noArgs.test.js index e9cc7b1bc..1e7f5c6c8 100644 --- a/packages/ignite-cli/tests/integration/ignite-cli/noArgs.test.js +++ b/tests/integration/ignite-cli/noArgs.test.js @@ -2,7 +2,7 @@ const test = require('ava') const execa = require('execa') const { contains } = require('ramda') -const IGNITE = '../ignite-cli/bin/ignite' +const IGNITE = './bin/ignite' test('with no arguments', async t => { const result = await execa(IGNITE) diff --git a/packages/ignite-cli/tests/integration/ignite-cli/version.test.js b/tests/integration/ignite-cli/version.test.js similarity index 85% rename from packages/ignite-cli/tests/integration/ignite-cli/version.test.js rename to tests/integration/ignite-cli/version.test.js index 1d79e0058..675ed8de8 100644 --- a/packages/ignite-cli/tests/integration/ignite-cli/version.test.js +++ b/tests/integration/ignite-cli/version.test.js @@ -2,8 +2,8 @@ const test = require('ava') const execa = require('execa') const jetpack = require('fs-jetpack') -const IGNITE = '../ignite-cli/bin/ignite' -const VERSION = jetpack.read('../ignite-cli/package.json', 'json').version +const IGNITE = './bin/ignite' +const VERSION = jetpack.read('./package.json', 'json').version test('ignite -v', async t => { const result = await execa(IGNITE, ['-v']) diff --git a/packages/ignite-cli/tests/integration/ignite-new/newInvalid.test.js b/tests/integration/ignite-new/newInvalid.test.js similarity index 95% rename from packages/ignite-cli/tests/integration/ignite-new/newInvalid.test.js rename to tests/integration/ignite-new/newInvalid.test.js index 5c20d9143..9fcb53867 100644 --- a/packages/ignite-cli/tests/integration/ignite-new/newInvalid.test.js +++ b/tests/integration/ignite-new/newInvalid.test.js @@ -4,7 +4,7 @@ const jetpack = require('fs-jetpack') const RUN_DIR = 'out/new' const BACK_DIR = '../..' -const IGNITE = '../../../ignite-cli/bin/ignite' +const IGNITE = '../../bin/ignite' test.before(() => { jetpack.dir(RUN_DIR)