Commit Graph

46 Commits

Author SHA1 Message Date
Tom Atterton 5219585ef9 Ignore DevDependencies when generating template. (#20542)
Summary:
Regarding [Add devDependenices support for templates](c4ab03a18e).

Once a project is created using the custom template command with devDependencies inside, the devDependenices.json file is also copied to the new projects directory.

By adding this to the ignore paths we stop the devDependenices being copied into the new projects directory.
Pull Request resolved: https://github.com/facebook/react-native/pull/20542

Differential Revision: D9182795

Pulled By: hramos

fbshipit-source-id: 543c8ca67612a981c22fc83c8d54a25ddc0ca5fc
2018-08-06 12:32:24 -07:00
Eli White aba4ec0c09 Prettier RN local-cli
Reviewed By: yungsters

Differential Revision: D7962462

fbshipit-source-id: 0afe2092af8703895de91a6d1400315c3173aa6d
2018-05-11 13:00:50 -07:00
Luciano Lima c4ab03a18e Add devDependencies support for templates
Summary:
Add devDependencies support to React Native templates.
Template can have a devDependencies.json file with devDependencies inside.
Using separate files to dependencies and devDependencies, it maintains compatibility with the current version.

Allows React Native templates to have devDependencies, which can help applications to have better organization, quality and testability. It's possible start a new app with some dependencies for dev support like prettier, reactotron, eslint packages and others.

Add a devDependencies.json file with at least one dependency (like prettier)

[CLI] [FEATURE] [local-cli/generator/templates.js] - Add support to devDependencies for react native templates
Closes https://github.com/facebook/react-native/pull/18164

Differential Revision: D7660744

Pulled By: hramos

fbshipit-source-id: 6fbb13832d2d1bd0c06bada0842c890dd99cf331
2018-04-17 16:44:51 -07:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Semen Zhydenko d2c569795c Typos in comments and log messages
Summary:
No code changes, no testing required.

alligned -> aligned
allignment -> alignment
completly -> completely
conseptually -> conceptually
decendents -> descendants
indefinetly -> indefinitely
dimention -> dimension
doesnt -> doesn't
safegaurd -> safeguard
intialization -> initialization
hierachy -> hierarchy
happend -> happened
gaurd -> guard
programatically -> programmatically
initalized -> initialized
immidiately -> immediately
occured -> occurred
unkown -> unknown
neccessary -> necessary
neccesarily -> necessarily
occuring -> occurring
comoponent -> component
propogate -> propagate
recieved -> received
referece -> reference
perfomance -> performance
recieving -> receiving
subsquently -> subsequently
scoll -> scroll
suprisingly -> surprisingly
targetting -> targeting
tranform -> transform
symetrical -> symmetrical
wtih -> with
Closes https://github.com/facebook/react-native/pull/17578

Differential Revision: D6718791

Pulled By: shergin

fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
2018-01-12 22:18:45 -08:00
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
Ville Immonen 6e99e314b2 Move HelloWorld template to a single index.js entry point
Summary:
This change (initially discussed in https://github.com/react-community/create-react-native-app/issues/26) moves the HelloWorld project template from two nearly identical entry points (`index.android.js` and `index.ios.js`) to a single, minimal `index.js` entry point. The root component is created in `App.js`. This unifies the project structure between `react-native init` and Create React Native App and allows CRNA's eject to use the entry point from the HelloWorld template without any hacks to customize it. Also examples in the docs can be just copy-pasted to `App.js` the same way in both HelloWorld and CRNA apps without having to first learn about  `AppRegistry.registerComponent`.

* Created a new project from the template using `./scripts/test-manual-e2e.sh` and verified that:
  * The app builds, starts and runs both on Android and iOS.
  * Editing and reloading changes works.
  * The new files (`index.js`, `App.js`, `__tests__/App.js`) get created in the project folder.

<img width="559" alt="screen shot 2017-08-01 at 19 10 51" src="https://user-images.githubusercontent.com/497214/28835171-300a12b6-76ed-11e7-81b2-623639c3b8f6.png">
<img width="467" alt="screen shot 2017-08-01 at 19 09 12" src="https://user-images.githubusercontent.com/497214/28835180-33d285e0-76ed-11e7-8d68-2b3bc44bf585.png">

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15312

Differential Revision: D5556276

Pulled By: hramos

fbshipit-source-id: 068fdf7e51381c2bc50321522f2be0db47296c5e
2017-08-03 14:02:43 -07:00
Martin Konicek 17c175a149 CLI: Add support for templates fetched from npm
Summary:
This PR allows anyone to publish templates for React Native.

It's possible for people to publish modules for React Native, we should also support custom templates. A suggestion from a Cordova mantainer where they did the same thing suggests this is useful:
https://github.com/mkonicek/AppTemplateFeedback/issues/1

I published a sample template [react-native-template-demo](https://www.npmjs.com/package/react-native-template-demo).

(GitHub: https://github.com/mkonicek/react-native-template-demo)

With this PR anyone can then use that template:

`react-native init MyApp --template demo`

The convention is: if someone publishes an npm package called `react-native-template-foo`, people can use it by running `react-native init MyApp --template foo`.

Use a template called `react-native-template-demo` from npm:

`react-native init MyApp --template demo`

Use a local template:

`react-native init MyApp --template file:///path_to/react-native-template-dem
Closes https://github.com/facebook/react-native/pull/12548

Differential Revision: D4620567

Pulled By: mkonicek

fbshipit-source-id: bb40d457a7fec28edb577f08137e73241072de3a
2017-02-27 14:04:57 -08:00
Martin Konicek a54d449e94 CLI: Add support for project templates
Summary:
Currently it is not trivial for people to get started with React Native. `react-native init MyApp` just creates a simple app with a single screen. People have to spend time figuring out how to add more screens, or how to accomplish very basic tasks such as rendering a list of data or handling text input.

Let's add an option: `react-native init --template navigation` - this creates a "starter" app which can be easily tweaked into the actual app the person wants to build.

**Test plan (required)**

- Checked that 'react-native init MyApp' still works as before:

<img width="487" alt="screenshot 2017-02-02 16 56 28" src="https://cloud.githubusercontent.com/assets/346214/22559344/b2348ebe-e968-11e6-9032-d1c33216f490.png">

<img width="603" alt="screenshot 2017-02-02 16 58 04" src="https://cloud.githubusercontent.com/assets/346214/22559370/c96a2ca6-e968-11e6-91f7-7afb967920fc.png">

- Ran 'react-native init MyNavApp --template'. This prints the available templates:

```
$ react-native init MyNavApp
Closes https://github.com/facebook/react-native/pull/12170

Differential Revision: D4516241

Pulled By: mkonicek

fbshipit-source-id: 8ac081157919872e92947ed64ea64fb48078614d
2017-02-06 12:31:25 -08:00
Eric Vicenti bc74dd1e14 Eject CLI command to re-create native folders
Summary:
The iOS and Android native folders of a React Native app can be difficult to maintain. This introduces a new workflow for creating and maintaining the native code of your app.

Now it will be possible to:

1. Remove the native iOS or Android folders
2. Create an `app.json` for your app, with at least a `name` and `displayName`
3. Run `react-native eject`, and the native code for your app will be generated

Then, as usual, you can run `react-native run-ios` and `react-native run-android`, to build and launch your app

For apps that don't have any native code, it will be possible to ignore the `ios` and `android` folders from version control.

Eject step tested in RN app by deleting native folders.

mkonicek, what is the best way to test `react-native init`?

As follow-up items, we can enable the following:

- Configuring app icon and launch screen from the `app.json`
- Automatically run `react-native link` for native libraries
- A
Closes https://github.com/facebook/react-native/pull/12162

Differential Revision: D4509138

Pulled By: ericvicenti

fbshipit-source-id: 0ee213e68f0a3d44bfce337e3ec43e5024bacc66
2017-02-03 12:58:46 -08:00
Martin Konicek 8c7f36021a Fix instructions in 'react-native init'
Summary: This was buggy and didn't print the folder we need to cd into.

Reviewed By: mkonicek

Differential Revision:
D4313396
Ninja: OSS only

fbshipit-source-id: 0e15baf818065b63e939def60a1366e2251aac7d
2016-12-12 09:13:30 -08:00
Martin Konicek 3aa25f7917 Allow git to merge pbxproj files
Summary:
Follow on in https://github.com/facebook/react-native/pull/10864.

**Motivation**

ncuillery Is has a lot of experience with upgrading RN projects (see his [talk](http://www.slideshare.net/ncuillery/introducing-the-new-reactnative-upgrade)) and is rewriting 'react-native upgrade' to use git.

He tells me that we actually want git to merge changes in the .pbxproj file. In his words: "Making the project.pbxproj invisible for "git diff" means that react-native-git-upgrade will never be able to upgrade the project.pbxproj."

Note the git docs explicitly recommend not to use git to merge .pbxproj files: https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Binary-Files

ncuillery do we have an alternative? Some ideas:

1. Use a 3rd-party tool in 'react-native upgrade' to merge the .pbxproj file?
2. We could always re-generate and overwrite the .pbxproj file (never merge) and then run 'react-native link' to update native 3rd-party dependencies in the Xcode project?
3. Last resort: stay away
Closes https://github.com/facebook/react-native/pull/11047

Differential Revision: D4220521

fbshipit-source-id: 823c735856b519be114aa4349ca1392910f00445
2016-11-22 17:58:29 -08:00
Martin Konicek 9712d335e2 Fix handling of dotfiles in 'react-native init' and 'react-native upgrade'
Summary:
Followup for CLI rewrite (a477aec10d). See the comment in the code for details.

**Test plan (required)**

- Published to Sinopia locally ([docs](https://github.com/facebook/react-native/tree/master/react-native-cli))
- Ran 'react-native init MyApp', the correct files were created (no more .npmignore, but have .gitignore):

      $ cd MyApp
      $ ls -a
      .			.flowconfig		__tests__		ios
      ..			.gitattributes		android			node_modules
      .babelrc		.gitignore		index.android.js	package.json
      .buckconfig		.watchmanconfig		index.ios.js		yarn.lock

- Changed .flowconfig, ran 'react-native upgrade'. Saw a prompt "Do you want to overwrite .flowconfig", tried answering first 'n' and then 'y'. When answering 'y' the file was overwritten by the version from the template as expected.
Closes https://github.com/facebook/react-native/pull/11051

Differential Revision: D4214831

Pulled By: ericvicenti

fbshipit-source-id: 7c6aae4f97c7d45e7241bf017ed2f6527d5d29fe
2016-11-21 12:58:29 -08:00
Martin Konicek a477aec10d Rewrite 'react-native init' and 'react-native upgrade' without using Yeoman in preparation for templates support
Summary:
This is the manually imported version of https://github.com/facebook/react-native/pull/10786

This was mostly straigthforward by replacing the local-cli folder with the version I had in my local git checkout,
plus a few other files I listed with git diff --name-only.

Reviewed By: hramos

Differential Revision: D4201118

fbshipit-source-id: 4d0fb54b0edda9de1abba427958e420fd2ac105c
2016-11-18 18:28:51 -08:00
Dustin Ingram 07dc35e4ad Add .gitattributes file, treat .pbxproj as binary
Summary:
By default, the `.pbxproj` file generated by React Native should be treated as binary data to prevent Git from possibly automatically converting or fixing CRLF issues with this file, which would break it.

See https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#identifying-binary-files-znTLIVhvhG (where it specifically mentions `.pbxproj` files) for more information.
Closes https://github.com/facebook/react-native/pull/10864

Differential Revision: D4162492

fbshipit-source-id: 2c8f2f0ab2bb41c23b1460ef6cba672ef38f6310
2016-11-10 17:58:41 -08:00
Martin Konicek c02c7f3024 CLI: Only use yarn if global CLI uses it
Summary:
Check that 'react-native init' itself used yarn to install React Native.
When using an old global react-native-cli@1.0.0 (or older), we don't want to install React Native with npm, and React + Jest with yarn. Let's be safe and not mix yarn and npm in a single project.

**Test plan**

Publish the code in this PR to Sinopia, use that when creating a new project.

Using old CLI:

    npm install -g react-native-cli@1.0.0
    react-native init AwesomeApp

The generated project doesn't contain `yarn.lock` (everything was installed with the npm client).

 ---

Using new CLI:

    npm install -g react-native-cli@1.2.0
    react-native init AwesomeApp

The generated project contains `yarn.lock`, output shows that yarn is used to install React Native, React, Jest.

 ---

In both cases the project runs and Reload JS works:

![screenshot 2016-11-04 17 20 50](https://cloud.githubusercontent.com/assets/346214/20015719/719effb0-a2b4-11e6-84a0-43474314009b.png)
Closes https://github.com/facebook/react-native/pull/10752

Differential Revision: D4131812

Pulled By: bestander

fbshipit-source-id: efaaf97a27005e2c2d10cae5d07afe108d5c0dee
2016-11-04 11:28:40 -07:00
Ben Bodenmiller dc0a5ec75d ignore all keystore files
Summary:
Ignore all keystore files as we do not want users to accidentally check in their keystore file.
Closes https://github.com/facebook/react-native/pull/10214

Differential Revision: D4118169

Pulled By: bestander

fbshipit-source-id: a81fc99afd1715d52dfdce8c47dfc10808470008
2016-11-02 11:15:10 -07:00
Martin Konicek 94711bfb06 Use yarn when available
Summary:
**Motivation**

`react-native init` takes minutes even on a fast network. Yarn makes it much quicker.

When yarn is not installed on the system:

<img width="440" alt="screenshot 2016-10-31 22 21 19" src="https://cloud.githubusercontent.com/assets/346214/19873897/7bad5662-9fb9-11e6-85fb-ad4879949dad.png">

When yarn is installed:

<img width="441" alt="screenshot 2016-10-31 22 02 20" src="https://cloud.githubusercontent.com/assets/346214/19873898/7baf4c56-9fb9-11e6-96b3-007f93d2438a.png">

Also added the option `react-native init AwesomeApp --npm` as a fallback in case yarn is not stable enough for some people (I saw some Github issues that yarn hangs for example; for me it works great though).

**Test plan**
1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. `react-native init AwesomeApp`

***Tested the following setups***

- New CLI - uses yarn, new react-native - uses yarn
- Old CLI (1.0.0) - doesn't use yarn, new react-native - uses yarn
-
Closes https://github.com/facebook/react-native/pull/10626

Differential Revision: D4110883

Pulled By: bestander

fbshipit-source-id: 8a3427e2bc9158cf5fadd8ddf5b31e4b50ce6453
2016-11-01 09:28:52 -07:00
Cristian Carlesso 6d3e074dd4 Adding Jest preset so that people can configure Jest using react-native as preset
Reviewed By: cpojer

Differential Revision: D4081817

fbshipit-source-id: 43cf2ec467ea69651705162b6a58e0b3f1ad1dbf
2016-10-31 12:58:35 -07:00
kentaromiura 8689b0f21c Adding jest and jest babel preset to the react-native init command
Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
2016-09-09 17:43:42 -07:00
Martin Konicek a2c1170da5 Mention double tapping R to reload in the app template
Summary:
This is a pretty useful trick to know, let's promote it :)

The formatting is consistent with iOS: https://github.com/facebook/react-native/blob/master/local-cli/generator/templates/index.ios.js

<img width="443" alt="screen shot 2016-06-23 at 4 04 47 pm" src="https://cloud.githubusercontent.com/assets/346214/16304185/fc94f6d6-395c-11e6-9f2c-0167217d1514.png">
Closes https://github.com/facebook/react-native/pull/8354

Differential Revision: D3475790

Pulled By: mkonicek

fbshipit-source-id: 06a43cf73b31d91faac72280d680f8eb95f50145
2016-06-23 06:43:27 -07:00
Konstantin Raev f22e9353a7 Made react installed via reac-native init strict to unbreak 15.1.0
Summary:
React@15.1.0 is incompatible with React-Native@0.26.
This PR was cherry-picked to 0.26-stable branch now.

What this change does:
- react-native-cli (major release bump) saves exact versions of react-native and react (only in npm2) dependencies into package.json
- local-cli saves exact version of react (only npm3) dependency into package.json
Closes https://github.com/facebook/react-native/pull/7879

Differential Revision: D3384705

Pulled By: davidaurelio

fbshipit-source-id: d4dff418f9659bd083ae8826433a4e7c0355d03b
2016-06-03 03:43:31 -07:00
MIYOKAWA, Nobuyoshi 8f9a3aa0e2 Add .iml to ignore target.
Summary:
Sorry for trivial one, but I feel no need to share '.iml' in a project, so it should be ignored.
Closes https://github.com/facebook/react-native/pull/7689

Differential Revision: D3334367

fbshipit-source-id: 2a68aa93084a51d0b3d24427c71bc7c12e41ed78
2016-05-23 04:58:24 -07:00
Tomas Roos cd9271567f Add flow directive to index.android.js
Summary:
iOS template contains flow directive in top comment. Android should too for consistency.
Closes https://github.com/facebook/react-native/pull/7482

Differential Revision: D3281131

fbshipit-source-id: d9a77196faed5e41753d09768721e1da1e6cc60a
2016-05-10 03:11:21 -07:00
Mike Grabowski d9349a7b79 Update imports in generated projects
Summary:Fixes warnings when React API is used by requiring 'react-native'.
Closes https://github.com/facebook/react-native/pull/7060

Differential Revision: D3196109

Pulled By: mkonicek

fb-gh-sync-id: b47afc138cd7909ad53c0d67a65e3a124b87134b
fbshipit-source-id: b47afc138cd7909ad53c0d67a65e3a124b87134b
2016-04-19 05:11:27 -07:00
James Ide c30d125050 Honor the version of "react" under peerDeps when setting up a new project
Summary:We need this since React 15.0.0 is coming and will break `react-native init`, which currently installs the latest version of React. We'll need some changes to React Native to support 15 that Sebastian is actively working on, but till that lands we want `react-native init` to continue working.
Closes https://github.com/facebook/react-native/pull/6846

Differential Revision: D3148182

Pulled By: sebmarkbage

fb-gh-sync-id: 3df5bc184c0b82d2c9c320c620256c7c8568d90b
fbshipit-source-id: 3df5bc184c0b82d2c9c320c620256c7c8568d90b
2016-04-07 00:07:21 -07:00
Konstantin Raev ce1261a3dd Added BUCK to generated app with react-native-cli init
Summary:BUCK is faster than Gradle.
For example `gradle app:installDebug` vs `buck install app` is ~7 seconds vs ~2 seconds with warm caches.
This is just the beginning to allow people to become familiar with BUCK.
It is enough for running the app locally and testing on a device.

Gradle is still used for dependency resolution.
Closes https://github.com/facebook/react-native/pull/6733

Differential Revision: D3126328

Pulled By: bestander

fb-gh-sync-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
fbshipit-source-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
2016-04-01 08:54:19 -07:00
Kyle Corbitt 322f210e64 flowconfig adds flow/ folder
Summary:This change adds the `flow/` folder to the generated `.flowconfig` in new/upgraded projects. The absence of this folder was causing flow bugs to appear in projects consuming react-native that weren't visible in react-native itself. By including the same definition in consuming projects these errors disappear. Fixes https://github.com/facebook/react-native/issues/6428.

**Test plan (required)**

Tested `react-native upgrade` with this change and ensured that the generated `.flowconfig` works and didn't throw flow errors.
Closes https://github.com/facebook/react-native/pull/6430

Differential Revision: D3071701

fb-gh-sync-id: f28f4d8f7e63669386766b6f226144adeda32c85
shipit-source-id: f28f4d8f7e63669386766b6f226144adeda32c85
2016-03-21 06:26:34 -07:00
Vsevolod Ivanov 081a413340 Deleted unnecessary 'use strict' in new project templates
Summary:Hello there!

Since React Native generates `index.*.js` files with usage of ES6 modules, `'use strict'` became unnecessary.

http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
> Module code is always strict mode code.
Closes https://github.com/facebook/react-native/pull/6322

Differential Revision: D3017181

Pulled By: vjeux

fb-gh-sync-id: 39e0fe703b8d8a0093b952f2c18a36d0d28e1020
shipit-source-id: 39e0fe703b8d8a0093b952f2c18a36d0d28e1020
2016-03-06 09:01:24 -08:00
Adam Miskiewicz 9f01f96770 Move `react` to peerDependencies
Summary:
This PR moves `react` from dependencies to peerDependencies.

In general, this would have only been important for those people using packages that depend on `react` and were using npm@2...npm@3 would automatically de-dupe.

However, when #5812 gets merged, dependencies will be scoped to react-native (on both npm@2 & npm@3), thus breaking projects that are using a package like `react-redux` for example, which depends on `react`. There would be two copies of React installed, and due to the use of haste modules in `react`, this would break the packager and cause naming collisions.

This PR does three things -

1. Moves the dependency from dependencies to peerDependencies
2. Updates the local-cli to run `npm install react --save` when a new project is initialized.
3. Updates `react-native upgrade` to warn if `react` is not listed in the package.json's dependencies.

**Note: This will require a shrinkwrap update.**
Closes https://github.com/facebook/react-native/pull/5813

Reviewed By: svcscm

Differential Revision: D2918380

Pulled By: androidtrunkagent

fb-gh-sync-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
shipit-source-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
2016-02-09 15:38:37 -08:00
Patrick Puritscher bde2f30474 Update templates to ES2015
Summary:
I don't know the reasons, why the templates are written with the `react.createClass`method. Today I see lot's of examples using the **ES6 way**. In my own projects I'm using this way, too.

I removed `use strict`, since *Module code is always strict mode code*, according to the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code).

Maybe we should **discuss** the usage of ES6 in the templates.
Closes https://github.com/facebook/react-native/pull/4891

Reviewed By: svcscm

Differential Revision: D2789493

Pulled By: androidtrunkagent

fb-gh-sync-id: 90e70f787017c61dc64cbc9f0beb02331fa749ec
2015-12-25 02:17:30 -08:00
Felix Oghină 7e53ee1095 add upgrade cli command
Reviewed By: mkonicek

Differential Revision: D2559885

fb-gh-sync-id: 785bd6ad855da30c00b170e737a7dd0f3e756430
2015-10-23 03:37:28 -07:00
Martín Bigio c6c97cbd9d Introduce default config
Reviewed By: frantic

Differential Revision: D2561344

fb-gh-sync-id: 651b8a199069f78e1ace2897ba4c0352aab7e3ea
2015-10-21 03:04:04 -07:00
Felix Oghină 71adc24974 Revert "Update rn-cli.config.js"
This reverts commit 8d592650c9.
2015-10-21 11:02:08 +01:00
Martin Konicek e612690413 Add license headers to local-cli
Reviewed By: martinbigio

Differential Revision: D2559969

fb-gh-sync-id: d8cd52435213729ff73a1f039eb0378b28f8d10e
2015-10-20 09:55:21 -07:00
Martín Bigio 8d592650c9 Update rn-cli.config.js 2015-10-19 19:07:34 -04:00
Martín Bigio 5977f494fc Allow user to configure transformer through cl argument
Reviewed By: frantic

Differential Revision: D2547435

fb-gh-sync-id: 77016ee5beba854a4cb58e9ac04b91a7dd76cf3e
2015-10-16 13:26:22 -07:00
Martín Bigio a102e6f587 Breaking change: Move `bundle` to `private-cli`
Summary: @​public

We need to start using the `private-cli` for the new asset system. Note this is a breaking change! People will have to upgrade their workflows/scripts to start using the new cli. Otherwise we'd need to build a thin adapter that is aware of both APIs which is something we;d like to avoid. The major API changes are:
  - API is now `entry-file` based instead of `url` based.
  - /s/--out/--bundle-output
  - /s/--out/--sourcemap-output

Also these parameters have no longer default values, you need to specify them. For instance, if you want to generate the sourcemaps you need to pass in the `--sourcemap-output` option

Lastly, additional project roots or asset roots need to be specified on the `rn-cli.config.js`.

Reviewed By: @frantic

Differential Revision: D2533877

fb-gh-sync-id: a45f9095fdf9442a9106ea7bb6a6b7f651d25273
2015-10-13 11:48:30 -07:00
Martín Bigio 144f8598c2 Introduce configuration template
Summary: @​public

We're rolling out a replacement for `local-cli`. As part of the process we moved many hardcoded values into a JS based configuration file.

Reviewed By: @vjeux

Differential Revision: D2533111

fb-gh-sync-id: 7250bddee9989b089ded409104e098ef15d79498
2015-10-13 06:44:14 -07:00
Atticus White 56abd6ab41 add android .gradle and build directories to sample app gitignore 2015-10-01 15:09:44 -04:00
Aaron Chiu 2566ed8089 merge the root .flowconfig and local-cli/generator/templates/_flowconfig
Test Plan: flow check && scripts/e2e-tests.sh
2015-09-23 21:47:43 +01:00
Pieter De Baets 64eb8741ee Bump flow version 2015-09-18 19:28:38 -07:00
Pieter De Baets 81c81501d5 Update generator's flow config 2015-09-15 11:20:24 -07:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00
Felix Oghină 3b7bffa2a1 [e2e] fix e2e tests
* use new _flowconfig in generator template
* increase sinopia max_body_size
* remove breaking `cd` command from e2e-test.sh
2015-08-18 11:51:03 +01:00
Felix Oghină f83675d191 [cli] convert project generation to use yeoman 2015-08-12 12:04:27 +01:00