mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-06-15 02:19:42 +08:00
Introduces a monorepo structure, relies on yarn workspaces to share
dependencies, and lerna for syncing versions across the monorepo.
* Create 2 workspaces:
'packages' and 'website'
* Create 2 public packages:
'babel-plugin-react-native-web' and 'react-native-web'
* Create 1 private package:
'benchmarks'
A simple release script runs the tests, builds the package assets,
increments the package version numbers, git commits and tags, publishes
the package to npm, pushes the changes to github, and releases the
website update.
Close #657
20 lines
557 B
JavaScript
20 lines
557 B
JavaScript
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
const execSync = require('child_process').execSync;
|
|
|
|
const version = process.argv.slice(2)[0];
|
|
|
|
console.log(`Publishing ${version}`);
|
|
// use lerna to bump versions and dependencies
|
|
execSync(`./node_modules/.bin/lerna publish --skip-git --skip-npm --repo-version ${version} --yes`);
|
|
// add changes
|
|
execSync('git add .');
|
|
// commit and tag
|
|
execSync(`git commit -m "${version}" && git tag -m ${version} "${version}"`);
|
|
// publish to npm
|
|
execSync('yarn publish');
|
|
// push to github
|
|
execSync('git push --tags origin master');
|