main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | # find-yarn-workspace-root
|
---|
2 |
|
---|
3 | 
|
---|
4 |
|
---|
5 | Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com
|
---|
6 |
|
---|
7 | ## Installation
|
---|
8 |
|
---|
9 | ```bash
|
---|
10 | yarn add find-yarn-workspace-root
|
---|
11 | ```
|
---|
12 |
|
---|
13 | ## Usage
|
---|
14 |
|
---|
15 | ```js
|
---|
16 | const findWorkspaceRoot = require('find-yarn-workspace-root');
|
---|
17 |
|
---|
18 | const workspaceRoot = findWorkspaceRoot(__dirname); // Absolute path or null
|
---|
19 | ```
|
---|
20 |
|
---|
21 | ## Contributing
|
---|
22 |
|
---|
23 | Contributions are welcome! Just clone this repository and install the dependencies:
|
---|
24 |
|
---|
25 | ```bash
|
---|
26 | git clone https://github.com/square/find-yarn-workspace-root.git
|
---|
27 | cd find-yarn-workspace-root
|
---|
28 | yarn
|
---|
29 | ```
|
---|
30 |
|
---|
31 | Note that you'll need `node` and `yarn` installed. Next, verify the tests all pass:
|
---|
32 |
|
---|
33 | ```bash
|
---|
34 | yarn test
|
---|
35 | ```
|
---|
36 |
|
---|
37 | Then create a branch for your bugfix/feature, make changes and update the tests, and submit a pull request. Please do not change the version in `package.json` when submitting a pull request. We determine the next version automatically based on the commits since the last release.
|
---|
38 |
|
---|
39 | > *NOTE*: Commit messages follow the [Angular commit message guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits).
|
---|
40 |
|
---|
41 | ## Releases
|
---|
42 |
|
---|
43 | To trigger a release, bump the version using `standard-version`:
|
---|
44 |
|
---|
45 | 1. To update the CHANGELOG, bump the version in `package.json`, and create a git tag, run:
|
---|
46 |
|
---|
47 | ```bash
|
---|
48 | $(yarn bin)/standard-version
|
---|
49 | ```
|
---|
50 |
|
---|
51 | 2. `git push && git push --tags`
|
---|
52 |
|
---|
53 | 3. `npm publish`
|
---|
54 |
|
---|
55 | ---
|
---|
56 | Copyright 2017 Square, Inc.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.