Skip to content

Commit

Permalink
Fix publish (#35)
Browse files Browse the repository at this point in the history
* v2.0.2

* v2.0.3

* Fix publish
  • Loading branch information
Siegrift authored Dec 9, 2022
1 parent 8d0fa0c commit f439d9f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1,506 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ contribute just follow these steps:

## Publishing

To publish run:

```sh
# This needs to be run with "npm run" and not "yarn"
# See: https://github.com/sindresorhus/np/issues/432#issuecomment-583732143
# We could set the publishConfig correctly, but using NPM is good enough
npm run publish-new-version
```
To release a new version follow these steps:

1. `git checkout master && git pull` - ensure you are on the "master" branch with latest changes
2. `yarn version` - choose "x.y.z" as the version to be released
3. `git show` - verify the changes of the version commit
4. `yarn build` - only build the package after the "yarn version" command so the bundled
"package.json" uses the updated version
5. `yarn publish --access public`
6. `git push --follow-tags` - to push the commits to a "main" branch
13 changes: 10 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,16 @@ <h2>Contribution</h2>
<a href="#publishing" id="publishing" style="color: inherit; text-decoration: none;">
<h2>Publishing</h2>
</a>
<p>To publish run:</p>
<pre><code class="language-sh"><span class="hl-6"># This needs to be run with &quot;npm run&quot; and not &quot;yarn&quot;</span><br/><span class="hl-6"># See: https://github.com/sindresorhus/np/issues/432#issuecomment-583732143</span><br/><span class="hl-6"># We could set the publishConfig correctly, but using NPM is good enough</span><br/><span class="hl-1">npm run publish-new-version</span>
</code></pre>
<p>To release a new version follow these steps:</p>
<ol>
<li><code>git checkout master &amp;&amp; git pull</code> - ensure you are on the &quot;master&quot; branch with latest changes</li>
<li><code>yarn version</code> - choose &quot;x.y.z&quot; as the version to be released</li>
<li><code>git show</code> - verify the changes of the version commit</li>
<li><code>yarn build</code> - only build the package after the &quot;yarn version&quot; command so the bundled
&quot;package.json&quot; uses the updated version</li>
<li><code>yarn publish --access public</code></li>
<li><code>git push --follow-tags</code> - to push the commits to a &quot;main&quot; branch</li>
</ol>
</div></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
Expand Down
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@siegrift/tsfunct",
"version": "2.0.1",
"version": "2.0.3",
"repository": {
"type": "git",
"url": "git+https://github.com/Siegrift/tsfunct.git"
},
"author": "Siegrift <e.tesarr@gmail.com>",
"license": "MIT",
"main": "./index.js",
"types": "./index.d.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand All @@ -19,22 +19,21 @@
"@types/jest": "^29.2.4",
"@types/node": "^18.11.12",
"jest": "^29.3.1",
"np": "^7.6.2",
"prettier": "^2.8.1",
"ts-jest": "^29.0.3",
"tsd": "^0.25.0",
"typedoc": "^0.23.21",
"typedoc-plugin-missing-exports": "^1.0.0",
"typescript": "^4.9.4"
},
"scripts": {
"build": "yarn tsc --build . && cp package.json dist && cp README.md dist",
"clean": "rm -rf build dist docs",
"checks": "python3 check-exports.py && node check-docs.js",
"docs": "yarn clean && DOCS_OUT_DIR=docs yarn docs:raw",
"docs": "DOCS_OUT_DIR=docs yarn docs:raw",
"docs:raw": "typedoc src/index.ts --out $DOCS_OUT_DIR --gitRevision master && cp -r ./assets/* $DOCS_OUT_DIR/assets",
"lint": "prettier --check .",
"lint:fix": "prettier --write .",
"publish-new-version": "np",
"test-watch": "jest --watch",
"test": "jest"
},
Expand All @@ -45,8 +44,5 @@
"homepage": "https://github.com/Siegrift/tsfunct#readme",
"directories": {
"doc": "docs"
},
"dependencies": {
"typedoc-plugin-missing-exports": "^1.0.0"
}
}
Loading

0 comments on commit f439d9f

Please sign in to comment.