Skip to content

Commit 2d55e89

Browse files
authored
Documentation and cleaning up the publishing process (#301)
* Add some instructions about publishing a new version of the library * Use the script prepack instead of prepublishOnly for publishing, and make sure we update dependencies before building
2 parents 484a39c + 6e8cd30 commit 2d55e89

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

PUBLISHING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Publishing a new version of this package
2+
3+
1. run `yarn publish`. This will ask you the new version, login into npm, build
4+
the package, commit and tag before pushing to npm.
5+
If you want to stop at any moment, you can ctrl-c, and depending on the moment,
6+
you'll need to rollback manually.
7+
2. On github, you need to edit the branch protection rules, and uncheck the
8+
option "Do not allow bypassing the above settings".
9+
3. Then you can push to github with the tags: `git push upstream HEAD --tags`. This
10+
is the only case you're allowed to push directly to github.
11+
4. Check the option "Do not allow bypassing the above settings" again.
12+
5. On github, go to the tags page, then create a new release from the new tag
13+
(this is an option in the "..." menu at the right).
14+
6. Click "Generate releases notes" then follow the format of previous releases.
15+
16+
17+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"build:examples": "yarn clean:examples && yarn build:dev",
3333
"build:dev": "cross-env BABEL_ENV=es6 webpack --config examples/webpack.config.js --progress --profile",
3434
"start": "webpack serve --config examples/webpack.config.js",
35-
"prepublishOnly": "yarn build"
35+
"prepack": "yarn --frozen-lockfile && yarn build"
3636
},
3737
"author": "Vivek Kumar Bansal <[email protected]>",
3838
"license": "MIT",

0 commit comments

Comments
 (0)