Rename metro-bundler to metro

Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
This commit is contained in:
cpojer 2017-11-30 11:56:25 +00:00
parent 9249ebcea7
commit 0f7ad193c7
225 changed files with 72 additions and 71 deletions

View File

@ -1,4 +1,4 @@
<!-- *Before creating an issue please make sure you are using the latest version of metro-bundler, try re-installing your node_modules folder and run metro-bundler once with `--reset-cache` to see if that fixes the problem you are experiencing.* -->
<!-- *Before creating an issue please make sure you are using the latest version of Metro, try re-installing your node_modules folder and run Metro once with `--reset-cache` to see if that fixes the problem you are experiencing.* -->
**Do you want to request a *feature* or report a *bug*?**
@ -8,4 +8,4 @@
**What is the expected behavior?**
**Please provide your exact metro-bundler configuration and mention your metro-bundler, node, yarn/npm version and operating system.**
**Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.**

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/node_modules
/packages/*/build/
/packages/*/node_modules/
/packages/*/yarn.lock
/coverage
lerna-debug.log
npm-debug.log*

View File

@ -1,5 +1,5 @@
## master
## metro-bundler 0.1.0
## metro 0.1.0
* Initial Release

View File

@ -1,6 +1,6 @@
# Contributing to metro-bundler
# Contributing to Metro
metro-bundler is one of Facebook's open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have.
Metro is one of Facebook's open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have.
## [Code of Conduct](https://code.facebook.com/codeofconduct)
@ -23,8 +23,8 @@ The core team will be monitoring for pull requests. When we get one, we'll run s
1. Fork the repo and create your branch from `master`.
```sh
git clone https://github.com/facebook/metro-bundler
cd metro-bundler
git clone https://github.com/facebook/metro
cd metro
git checkout -b my_branch
```
@ -69,7 +69,7 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
## How to Get in Touch
* Discord - [#metro-bundler](https://discordapp.com/channels/102860784329052160/103622435865104384) on [Reactiflux](http://www.reactiflux.com/)
* Discord - [#metro](https://discordapp.com/channels/102860784329052160/103622435865104384) on [Reactiflux](http://www.reactiflux.com/)
### Code Conventions
@ -85,4 +85,4 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
## License
By contributing to metro-bundler, you agree that your contributions will be licensed under its BSD license.
By contributing to Metro, you agree that your contributions will be licensed under its BSD license.

View File

@ -1,6 +1,6 @@
BSD License
For metro-bundler software
For Metro software
Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

View File

@ -1,6 +1,6 @@
Additional Grant of Patent Rights Version 2
"Software" means the metro-bundler software distributed by Facebook, Inc.
"Software" means the Metro software distributed by Facebook, Inc.
Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software
(“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable

View File

@ -1,7 +1,7 @@
# Metro Bundler
[![CircleCI Build Status](https://circleci.com/gh/facebook/metro-bundler.svg?style=shield)](https://circleci.com/gh/facebook/metro-bundler)
[![npm version](https://badge.fury.io/js/metro-bundler.svg)](http://badge.fury.io/js/metro-bundler)
[![CircleCI Build Status](https://circleci.com/gh/facebook/metro.svg?style=shield)](https://circleci.com/gh/facebook/metro)
[![npm version](https://badge.fury.io/js/metro.svg)](http://badge.fury.io/js/metro)
🚇 The JavaScript bundler for React Native.
@ -13,4 +13,4 @@ This project was previously part of the [react-native](https://github.com/facebo
## Installation & Documentation
See [the Metro website](https://facebook.github.io/metro-bundler/) for documentation.
See [the Metro website](https://facebook.github.io/metro/) for documentation.

View File

@ -13,7 +13,7 @@ aliases:
version: 2
jobs:
test-node-9:
working_directory: ~/metro-bundler/packager/metro-bundler
working_directory: ~/metro/packager/metro
docker:
- image: circleci/node:9
steps:
@ -24,7 +24,7 @@ jobs:
- run: yarn run test-ci
test-node-8:
working_directory: ~/metro-bundler/packager/metro-bundler
working_directory: ~/metro/packager/metro
docker:
- image: circleci/node:8
steps:
@ -35,7 +35,7 @@ jobs:
- run: yarn run test-ci
test-node-6:
working_directory: ~/metro-bundler/packager/metro-bundler
working_directory: ~/metro/packager/metro
docker:
- image: circleci/node:6
steps:
@ -47,21 +47,21 @@ jobs:
- run: yarn run test-ci
deploy:
working_directory: ~/metro-bundler/packager/metro-bundler
working_directory: ~/metro/packager/metro
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run:
working_directory: packages/metro-bundler
working_directory: packages/metro
command: yarn --no-progress
- save-cache: *save-cache
- run:
working_directory: ~/metro-bundler/
working_directory: ~/metro/
run: yarn build
- run:
working_directory: packages/metro-bundler
working_directory: packages/metro
command: |
yarn prepare-release
npm publish

View File

@ -6,21 +6,21 @@ title: Getting Started
Install Metro using `npm`:
```
npm install --save-dev metro-bundler
npm install --save-dev metro
```
Or via [`yarn`](https://yarnpkg.com/en/package/jest):
```
yarn add --dev metro-bundler
yarn add --dev metro
```
## Running `metro-bundler`
## Running `metro`
Right now, Metro Bundler cannot run by itself. Instead, some functions are exposed so that the configuration can be passed into it. First, require the module by doing:
```js
const metroBundler = require('metro-bundler');
const metroBundler = require('metro');
```
Within the object returned, two main methods are given:
@ -34,9 +34,9 @@ Given a set of options (same ones as the `build` method), a `metro-server` will
'use strict';
const http = require('http');
const metroBundler = require('metro-bundler');
const TerminalReporter = require('metro-bundler/src/lib/TerminalReporter');
const Terminal = require('metro-bundler/src/lib/Terminal');
const metroBundler = require('metro');
const TerminalReporter = require('metro/src/lib/TerminalReporter');
const Terminal = require('metro/src/lib/Terminal');
const metroBundlerServer = metroBundler.createServer({
assetRegistryPath: __dirname,

View File

@ -1,4 +1,4 @@
# metro-bundler
# Metro
🚇 The JavaScript bundler for React Native.

View File

@ -1,12 +1,12 @@
{
"version": "0.22.1",
"name": "metro-bundler",
"name": "metro",
"description": "🚇 The JavaScript bundler for React Native.",
"main": "src/index.js",
"bin": "src/cli.js",
"repository": {
"type": "git",
"url": "git@github.com:facebook/metro-bundler.git"
"url": "git@github.com:facebook/metro.git"
},
"scripts": {
"prepare-release": "test -d build && rm -rf src.real && mv src src.real && mv build src",

View File

@ -145,7 +145,7 @@ class Bundler {
});
const cacheKeyParts = [
'metro-bundler-cache',
'metro-cache',
VERSION,
opts.cacheVersion,
stableProjectRoots

View File

@ -151,7 +151,7 @@ const DEFAULT = ({
getPlatforms: () => [],
getPolyfillModuleNames: () => [],
// We assume the default project path is two levels up from
// node_modules/metro-bundler/
// node_modules/metro/
getProjectRoots: () => [path.resolve(__dirname, '../..')],
getProvidesModuleNodeModules: () => providesModuleNodeModules.slice(),
getSourceExts: () => [],

Some files were not shown because too many files have changed in this diff Show More