Skip to content

Commit

Permalink
Merge pull request #3 from Deltares/add-npm-deploy
Browse files Browse the repository at this point in the history
Add npm publish workflow
  • Loading branch information
ceesvoesenek authored Jan 15, 2025
2 parents fcdb111 + 8ef361a commit 01b5867
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish to NPM

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@deltares/webgl-streamline-visualiser",
"private": true,
"name": "@deltares/webgl-streamline-visualizer",
"private": false,
"version": "0.0.0",
"type": "module",
"files": [
"dist"
],
"module": "./dist/webgl-streamline-visualiser.js",
"module": "./dist/webgl-streamline-visualizer.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/webgl-streamline-visualiser.js"
"import": "./dist/webgl-streamline-visualizer.js"
}
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const PRODUCTION_BUILD_OPTIONS: BuildOptions = {
// Only build ES module, this library is only relevant for use in the
// browser.
formats: ['es'],
name: 'webgl-streamline-visualiser',
fileName: 'webgl-streamline-visualiser'
name: 'webgl-streamline-visualizer',
fileName: 'webgl-streamline-visualizer'
},
rollupOptions: {
// Do not bundle MapLibre; applications using this streamlines library as a
Expand Down

0 comments on commit 01b5867

Please sign in to comment.