mirror of
https://github.com/status-im/metro.git
synced 2025-01-23 09:30:55 +00:00
npm package has src/
rather than build/
Summary: We use custom npm scripts (`prepare-release`, `cleanup-release`) to - move `src` to `src.orig`, and `build` to `src` before creating the tarball - move everything back afterwards We run these scripts with lerna before and after publishing. Custom hooks avoid problems with `prepublishOnly` and `postpublish` not being run at opportune times, `prepack` and `postpack` not being supported by npm v4 and yarn, and using `lerna run prepublishOnly` resulting in duplicated execution of the command. This ensures that development is closer to what is pulled in from npm. Reviewed By: jeanlauliac Differential Revision: D5310133 fbshipit-source-id: 6b9885c88b936ef3fe5f1858738ad63d581a8731
This commit is contained in:
parent
a0fcbd7f11
commit
08699062d5
@ -1,6 +1,6 @@
|
||||
{
|
||||
"lerna": "2.0.0-beta.38",
|
||||
"version": "0.8.1",
|
||||
"lerna": "2.0.0-rc.5",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
@ -43,7 +43,8 @@
|
||||
"lint": "eslint . --cache",
|
||||
"lint-fix": "eslint . --fix --cache",
|
||||
"postinstall": "node ./scripts/postinstall.js && node ./scripts/build.js",
|
||||
"publish": "yarn run build-clean && yarn run build && lerna publish",
|
||||
"publish": "yarn run build-clean && yarn run build && lerna run prepare-release && lerna publish",
|
||||
"postpublish": "lerna run cleanup-release",
|
||||
"test-ci": "yarn run typecheck && yarn run lint && yarn run build && yarn run jest-coverage -- -i && node scripts/mapCoverage.js && codecov",
|
||||
"test": "yarn run typecheck && yarn run lint && yarn run build && yarn run jest && yarn run test-examples",
|
||||
"typecheck": "flow check",
|
||||
|
@ -1,4 +1,5 @@
|
||||
**/__mocks__/**
|
||||
**/__tests__/**
|
||||
src
|
||||
build
|
||||
src.real
|
||||
yarn.lock
|
||||
|
@ -2,11 +2,15 @@
|
||||
"version": "0.8.1",
|
||||
"name": "metro-bundler",
|
||||
"description": "🚇 The JavaScript bundler for React Native.",
|
||||
"main": "build/index.js",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:facebook/metro-bundler.git"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare-release": "test -d build && rm -rf src.real && mv src src.real && mv build src",
|
||||
"cleanup-release": "test ! -e build && mv src build && mv src.real src"
|
||||
},
|
||||
"dependencies": {
|
||||
"absolute-path": "^0.0.0",
|
||||
"async": "^2.4.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user