{
"name": "currency-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x"
}
}
{
"name": "currency-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x"
}
}
{
"name": "address-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x"
}
}
{
"name": "awesome-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"material-ui": "1.x"
}
}
{
"name": "currency-input",
"version": "1.1.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x",
"awesome-input": "1.0.0"
}
}
{
"name": "address-input",
"version": "1.1.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x",
"awesome-input": "1.0.0"
}
}
{
"name": "currency-input",
"version": "1.1.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x",
"awesome-input": "1.0.0"
}
}
{
"name": "address-input",
"version": "1.1.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"meow": "2.x",
"awesome-input": "1.0.0"
}
}
{
"name": "awesome-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"material-ui": "1.x"
}
}
awesome-input
1. Fix Bug
2. Unit Test
3. npm publish awesome-input@1.0.1
address-input
1. npm install awesome-input@1.0.1
2. Verify Fix
3. npm publish address-input@1.1.1
currency-input
1. npm install awesome-input@1.0.1
2. Verify Fix
3. npm publish currency-input@1.1.1
{
"name": "email-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"email-validator": "4.x",
"awesome-input": "1.1.0"
}
}
{
"name": "awesome-input",
"version": "1.1.0",
"dependencies": {
"react": "16.x",
"material-ui": "1.x"
}
}
awesome-input
1. Add new feature
2. Unit Test
3. npm publish awesome-input@1.1.0
email-input
1. npm install awesome-input@1.1.0
2. Integrate awesome-input
3. Unit Test
4. npm publish email-input@1.0.0
address-input
1. npm install awesome-input@1.1.0
2. Integrate awesome-input
3. Unit Test
4. npm publish address-input@1.2.0
currency-input
1. npm install awesome-input@1.0.1
2. Integrate awesome-input
3. Unit Test AND FOUND A BUG, SHIT!
awesome-input
1. Fix Bug
2. Unit Test
3. npm publish awesome-input@1.1.1
email-input
1. npm install awesome-input@1.1.1
2. Unit Test
3. npm publish email-input@1.0.1
address-input
1. npm install awesome-input@1.1.1
2. Unit Test
3. npm publish address-input@1.2.1
currency-input
1. npm install awesome-input@1.1.1
2. Integrate awesome-input
3. Unit Test AND GREAT, NO BUG!
4. npm publish currency-input@1.2.1
node_modules
email-input
awesome-input
node_modules
address-input
awesome-input
node_modules
currency-input
awesome-input
awesome-input
symlink
{
"name": "awesome-design",
"version": "1.0.0",
"dependencies": {
"email-input": "1.0.1",
"address-input": "1.2.1",
"currency-input": "1.2.1"
}
}
import EmailInput from 'email-input';
import AddressInput from 'address-input';
import CurrencyInput from 'currency-input';
export { EmailInput, AddressInput, CurrencyInput };
import { EmailInput } from 'awesome-design';
awesome-design/index.js
user-feature/index.js
{
"name": "email-input",
"version": "1.0.0",
"dependencies": {
"react": "16.x",
"lodash": "3.x",
"email-validator": "4.x",
"awesome-input": "^1.1.0"
}
}
MORE GIT REPOS MAKE YOUR GITHUB PROFILE LOOK MORE IMPRESSIVE
shawn / awesome-input
email-input
address-input
currency-input
awesome-design
email-input
address-input
currency-input
awesome-design
import EmailInput from './email-input/src/index.js';
import AddressInput from './address-input/src/index.js';
import CurrencyInput from './currency-input/src/index.js';
class AwesomeDesignDemo extends React.Component {
render() {
return (
<Demo>
<EmailInput />
<AddressInput />
<CurrencyInput />
</Demo>
);
}
}
awesome-design/demo.js
{
"packages": [
"widgets/*",
"utils/*"
],
"npmClient": "yarn"
}
https://en.wikipedia.org/wiki/Glob_(programming)
email-input
widgets
lerna.json
address-input
awesome-design
package.json
package.json
currency-util
utils
test
package.json
docs
__mocks__
email-input
widgets
lerna.json
address-input
awesome-design
package.json
package.json
currency-util
utils
test
package.json
docs
__mocks__
@shawn/email-input
@shawn/address-input
@shawn/currency-util
...
if dependency not in lerna project:
npm install
else if dependency version satisfy the local version in lerna project:
symlink local copy to node_modules
else:
npm install
email-input
widgets
lerna.json
awesome-input
awesome-design
package.json
package.json
email-util
utils
package.json
node_modules
{
"name": "@shawn/email-input",
"dependencies": {
"awesome-input": "^0.5.0",
"email-util": "^0.6.0",
"react": "16.3.0"
}
}
widgets/email-input/package.json
{
"name": "@shawn/awesome-input",
"version": "0.5.5"
}
widgets/awesome-input/package.json
{
"name": "@shawn/email-input",
"version": "0.9.1"
}
widgets/email-util/package.json
awesome-input
email-input
react
email-input
widgets
lerna.json
awesome-input
awesome-design
package.json
package.json
email-util
utils
package.json
node_modules
{
"name": "@shawn/email-input",
"dependencies": {
"awesome-input": "^0.5.0",
"email-util": "^0.6.0",
"react": "16.3.0"
}
}
widgets/email-input/package.json
{
"name": "@shawn/awesome-input",
"version": "0.5.5"
}
widgets/awesome-input/package.json
{
"name": "@shawn/email-input",
"version": "0.9.1"
}
widgets/email-util/package.json
awesome-input
email-input (from npm)
react (from npm)
if dependency not in lerna project:
npm install
else:
symlink local copy to node_modules
email-input
widgets
lerna.json
awesome-input
awesome-design
package.json
package.json
email-util
utils
package.json
node_modules
{
"name": "@shawn/email-input",
"dependencies": {
"awesome-input": "^0.5.0",
"email-util": "^0.6.0",
"react": "16.3.0"
}
}
widgets/email-input/package.json
{
"name": "@shawn/awesome-input",
"version": "0.5.5"
}
widgets/awesome-input/package.json
{
"name": "@shawn/email-input",
"version": "0.9.1"
}
widgets/email-util/package.json
awesome-input
email-input
react (from npm)
lerna
changed
show changes since last git tag
lerna
version
lerna
publish
update version,
git commit, git tag,
git push
npm publish
lerna info Looking for changed packages since v1.0.0
@shawn/awesome-input
@shawn/currency-input
@shawn/email-input
@shawn/address-input
@shawn/awesome-design
lerna success found 5 package ready to publish
lerna info Looking for changed packages since v1.0.0
...
? Select a new version for @shawn/awesome-input (currently 1.0.0) Minor (1.1.0)
...
Changes:
- @shawn/awesome-input: 1.0.0 => 1.1.0
- @shawn/currency-input: 1.0.0 => 1.1.0
- @shawn/email-input: 1.0.0 => 1.1.0
- @shawn/address-input: 1.0.0 => 1.1.0
- @shawn/awesome-design: 1.0.0 => 1.1.0
? Are you sure you want to create these versions? (ynH)
...
- @shawn/awesome-design: 1.0.0 => 1.1.0
? Are you sure you want to create these versions? Yes
lerna info publish Publishing packages to npm...
Successfully published:
- @shawn/awesome-input@1.1.0
- @shawn/currency-input@1.1.0
- @shawn/email-input@1.1.0
- @shawn/address-input@1.1.0
- @shawn/awesome-design@1.1.0
in every package that has "test" npm script
in every package
@shawn/awesome-input: yarn run v1.0.2
@shawn/awesomeness: yarn run v1.0.2
@shawn/happiness: yarn run v1.0.2
@shawn/debounce-utils: yarn run v1.0.2
@shawn/debounce-utils: jest
@shawn/happiness: jest
@shawn/awesomeness: yarn run v1.0.2
https://confluence.garenanow.com/display/SPCFE/Lerna+Extras