-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Framework: Add lerna to publish @automattic/simple-components
Add `lerna` (a monorepo tool) to Calypso, and use it to publish [`@automattic/simple-components`](https://www.npmjs.com/package/@automattic/simple-components) as a separate npm. This involves adding a `package.json`, `.gitignore`, and `.npmignore` to `client/components`, and an `alias` field to Calypso's webpack configs. Since we want Calypso (and possibly other consumers) to continue to use untranspiled code (to benefit from features such as tree-shaking), the npms we produce should contain both transpiled and untranspiled versions of the code. See http://2ality.com/2017/07/npm-packages-via-babel.html, and for more information, http://2ality.com/2017/04/transpiling-dependencies-babel.html and http://2ality.com/2017/06/pkg-esnext.html.
- Loading branch information
Showing
9 changed files
with
4,920 additions
and
2,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cjs | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @format */ | ||
|
||
// Keep in sync with the `files` field in package.json! | ||
// TODO: Can we auto-generate at build time? | ||
|
||
export { Badge } from './badge'; | ||
export { Button } from './button'; | ||
export { Main } from './main'; | ||
export { Notice } from './notice'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@automattic/simple-components", | ||
"version": "0.1.0-alpha.7", | ||
"description": "React components, as used on WordPress.com", | ||
"scripts": { | ||
"build": "npx babel --only ./index.js,./badge/,./button/,./main/,./notice/ --out-dir cjs .", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/automattic/wp-calypso.git" | ||
}, | ||
"keywords": [ | ||
"wordpress", | ||
"react", | ||
"components" | ||
], | ||
"author": "Automattic", | ||
"license": "GPL-2.0+", | ||
"bugs": { | ||
"url": "https://github.com/automattic/wp-calypso/issues" | ||
}, | ||
"homepage": "https://github.com/Automattic/wp-calypso/blob/master/docs/components.md", | ||
"main": "./cjs/index.js", | ||
"esnext": "./index.js", | ||
"files": [ | ||
"index.js", | ||
"cjs/", | ||
"badge/", | ||
"button/", | ||
"main/", | ||
"notice" | ||
], | ||
"dependencies": { | ||
"classnames": "^2.2.6", | ||
"gridicons": "^3.0.1", | ||
"i18n-calypso": "^1.9.1", | ||
"lodash": "^4.17.10", | ||
"prop-types": "^15.6.2", | ||
"react": "^16.4.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"packages": [ | ||
"client/components" | ||
], | ||
"version": "independent" | ||
} |
Oops, something went wrong.