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*?** **Do you want to request a *feature* or report a *bug*?**
@ -8,4 +8,4 @@
**What is the expected behavior?** **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 /node_modules
/packages/*/build/ /packages/*/build/
/packages/*/node_modules/ /packages/*/node_modules/
/packages/*/yarn.lock
/coverage /coverage
lerna-debug.log lerna-debug.log
npm-debug.log* npm-debug.log*

View File

@ -1,5 +1,5 @@
## master ## master
## metro-bundler 0.1.0 ## metro 0.1.0
* Initial Release * 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) ## [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`. 1. Fork the repo and create your branch from `master`.
```sh ```sh
git clone https://github.com/facebook/metro-bundler git clone https://github.com/facebook/metro
cd metro-bundler cd metro
git checkout -b my_branch 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 ## 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 ### Code Conventions
@ -85,4 +85,4 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
## License ## 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 BSD License
For metro-bundler software For Metro software
Copyright (c) 2014-present, Facebook, Inc. All rights reserved. Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

View File

@ -1,6 +1,6 @@
Additional Grant of Patent Rights Version 2 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 Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software
(“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable

View File

@ -1,7 +1,7 @@
# Metro Bundler # Metro Bundler
[![CircleCI Build Status](https://circleci.com/gh/facebook/metro-bundler.svg?style=shield)](https://circleci.com/gh/facebook/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-bundler.svg)](http://badge.fury.io/js/metro-bundler) [![npm version](https://badge.fury.io/js/metro.svg)](http://badge.fury.io/js/metro)
🚇 The JavaScript bundler for React Native. 🚇 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 ## 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 version: 2
jobs: jobs:
test-node-9: test-node-9:
working_directory: ~/metro-bundler/packager/metro-bundler working_directory: ~/metro/packager/metro
docker: docker:
- image: circleci/node:9 - image: circleci/node:9
steps: steps:
@ -24,7 +24,7 @@ jobs:
- run: yarn run test-ci - run: yarn run test-ci
test-node-8: test-node-8:
working_directory: ~/metro-bundler/packager/metro-bundler working_directory: ~/metro/packager/metro
docker: docker:
- image: circleci/node:8 - image: circleci/node:8
steps: steps:
@ -35,7 +35,7 @@ jobs:
- run: yarn run test-ci - run: yarn run test-ci
test-node-6: test-node-6:
working_directory: ~/metro-bundler/packager/metro-bundler working_directory: ~/metro/packager/metro
docker: docker:
- image: circleci/node:6 - image: circleci/node:6
steps: steps:
@ -47,21 +47,21 @@ jobs:
- run: yarn run test-ci - run: yarn run test-ci
deploy: deploy:
working_directory: ~/metro-bundler/packager/metro-bundler working_directory: ~/metro/packager/metro
docker: docker:
- image: circleci/node:8 - image: circleci/node:8
steps: steps:
- checkout - checkout
- restore-cache: *restore-cache - restore-cache: *restore-cache
- run: - run:
working_directory: packages/metro-bundler working_directory: packages/metro
command: yarn --no-progress command: yarn --no-progress
- save-cache: *save-cache - save-cache: *save-cache
- run: - run:
working_directory: ~/metro-bundler/ working_directory: ~/metro/
run: yarn build run: yarn build
- run: - run:
working_directory: packages/metro-bundler working_directory: packages/metro
command: | command: |
yarn prepare-release yarn prepare-release
npm publish npm publish

View File

@ -6,21 +6,21 @@ title: Getting Started
Install Metro using `npm`: Install Metro using `npm`:
``` ```
npm install --save-dev metro-bundler npm install --save-dev metro
``` ```
Or via [`yarn`](https://yarnpkg.com/en/package/jest): 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: 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 ```js
const metroBundler = require('metro-bundler'); const metroBundler = require('metro');
``` ```
Within the object returned, two main methods are given: 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'; 'use strict';
const http = require('http'); const http = require('http');
const metroBundler = require('metro-bundler'); const metroBundler = require('metro');
const TerminalReporter = require('metro-bundler/src/lib/TerminalReporter'); const TerminalReporter = require('metro/src/lib/TerminalReporter');
const Terminal = require('metro-bundler/src/lib/Terminal'); const Terminal = require('metro/src/lib/Terminal');
const metroBundlerServer = metroBundler.createServer({ const metroBundlerServer = metroBundler.createServer({
assetRegistryPath: __dirname, assetRegistryPath: __dirname,

View File

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

View File

@ -1,12 +1,12 @@
{ {
"version": "0.22.1", "version": "0.22.1",
"name": "metro-bundler", "name": "metro",
"description": "🚇 The JavaScript bundler for React Native.", "description": "🚇 The JavaScript bundler for React Native.",
"main": "src/index.js", "main": "src/index.js",
"bin": "src/cli.js", "bin": "src/cli.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@github.com:facebook/metro-bundler.git" "url": "git@github.com:facebook/metro.git"
}, },
"scripts": { "scripts": {
"prepare-release": "test -d build && rm -rf src.real && mv src src.real && mv build src", "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 = [ const cacheKeyParts = [
'metro-bundler-cache', 'metro-cache',
VERSION, VERSION,
opts.cacheVersion, opts.cacheVersion,
stableProjectRoots stableProjectRoots

View File

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

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