Skip to content

Commit 0808766

Browse files
committed
release 0.0.2: library proof of concept
create "noteplayer"symlink and use it in demo
1 parent 09c222d commit 0808766

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
1313
"lint:eslint": "eslint . --fix",
1414
"lint": "run-s lint:*",
15-
"format": "prettier --write src/"
15+
"format": "prettier --write src/",
16+
"create_link": "cd .. && npm link && cd demo && npm link noteplayer"
1617
},
1718
"dependencies": {
1819
"@tailwindcss/vite": "^4.1.4",

demo/src/components/PlayNote.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
</template>
2525

2626
<script setup lang="ts">
27+
import { getAudioContext } from 'noteplayer'
2728
import { computed, ref, watch } from 'vue'
28-
import { getAudioContext } from '../../../src/index'
2929
3030
const note_frequency = ref(440)
3131
const note_frequency_text = 'Frequency'

demo/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import tailwindcss from '@tailwindcss/vite'
44
import vue from '@vitejs/plugin-vue'
55
import { defineConfig } from 'vite'
66

7+
import path from 'node:path'
78
import vueDevTools from 'vite-plugin-vue-devtools'
89

910
// https://vite.dev/config/
@@ -12,6 +13,8 @@ export default defineConfig({
1213
resolve: {
1314
alias: {
1415
'@': fileURLToPath(new URL('./src', import.meta.url)),
16+
noteplayer: path.resolve(__dirname, '../dist'),
1517
},
18+
preserveSymlinks: true,
1619
},
1720
})

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
{
22
"name": "noteplayer",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "",
55
"main": "./dist/ index.js",
66
"types": "./dist/index.d.ts",
7-
"type":"module",
7+
"type": "module",
88
"scripts": {
99
"build": "tsup"
1010
},
11-
"files":["dist","README.md"],
11+
"files": [
12+
"dist",
13+
"README.md"
14+
],
1215
"repository": {
1316
"type": "git",
1417
"url": "git+https://github.com/J43fura/noteplayer.js.git"
1518
},
16-
"keywords": ["music", "note", "player", "audio", "WebAudio"],
19+
"keywords": [
20+
"music",
21+
"note",
22+
"player",
23+
"audio",
24+
"WebAudio"
25+
],
1726
"author": "J43fura",
1827
"license": "ISC",
1928
"bugs": {
@@ -24,4 +33,4 @@
2433
"tsup": "^8.4.0",
2534
"typescript": "^5.8.3"
2635
}
27-
}
36+
}

0 commit comments

Comments
 (0)