wavesurfer.js 7.0.0-alpha.44 → 7.0.0-alpha.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,15 +9,20 @@ Try it out:
9
9
  npm install --save wavesurfer.js@alpha
10
10
  ```
11
11
 
12
- Import like this:
12
+ Import from a CDN or a local file like this:
13
13
 
14
14
  ```
15
- import WaveSurfer from 'wavesurfer.js'
15
+ import WaveSurfer from 'https://unpkg.com/wavesurfer.js@alpha'
16
+ ```
17
+
18
+ Or, as a script tag which exposes `WaveSurfer` as a global variable:
19
+ ```
20
+ <script src="https://unpkg.com/wavesurfer.js@alpha"></script>
16
21
  ```
17
22
 
18
23
  To import a plugin, e.g. the Timeline plugin:
19
24
  ```
20
- import Timeline from 'wavesurfer.js/dist/plugins/timeline'
25
+ import Timeline from 'https://unpkg.com/wavesurfer.js@alpha/plugins/timeline.js'
21
26
  ```
22
27
 
23
28
  TypeScript types are included in the package, so there's no need to install `@types/wavesurfer.js`.
@@ -16,7 +16,7 @@
16
16
  */
17
17
  // @ts-nocheck
18
18
  import BasePlugin from '../base-plugin.js';
19
- import FFT from './spectrogram-fft.js';
19
+ import FFT from './spectrogram-fft.mjs';
20
20
  export default class SpectrogramPlugin extends BasePlugin {
21
21
  static create(options) {
22
22
  return new SpectrogramPlugin(options || {});
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "wavesurfer.js",
3
- "version": "7.0.0-alpha.44",
3
+ "version": "7.0.0-alpha.45",
4
4
  "license": "BSD-3-Clause",
5
5
  "author": "katspaugh",
6
6
  "homepage": "https://wavesurfer-js.org",
7
7
  "keywords": [
8
8
  "waveform",
9
+ "spectrogram",
9
10
  "audio",
10
11
  "player",
11
12
  "music",
@@ -22,6 +23,14 @@
22
23
  "import": "./dist/wavesurfer.js",
23
24
  "require": "./dist/wavesurfer.min.js"
24
25
  },
26
+ "plugins/*": {
27
+ "import": "./dist/plugins/*.js",
28
+ "require": "./dist/plugins/*.min.js"
29
+ },
30
+ "plugins/*.js": {
31
+ "import": "./dist/plugins/*.js",
32
+ "require": "./dist/plugins/*.min.js"
33
+ },
25
34
  "./dist/plugins/*": {
26
35
  "import": "./dist/plugins/*.js",
27
36
  "require": "./dist/plugins/*.min.js"
@@ -35,14 +44,14 @@
35
44
  "build:dev": "tsc -w --target ESNext",
36
45
  "build:umd": "webpack && webpack --config webpack.config.plugins.js",
37
46
  "build": "tsc && npm run build:umd",
38
- "deploy": "yarn build && yarn docs && rm public/dist && rm public/examples && mv dist public/ && mv examples public/",
47
+ "deploy": "yarn build && yarn docs",
39
48
  "prepublishOnly": "npm run build",
40
- "docs": "typedoc src/wavesurfer.ts src/plugins/* --out public/docs",
49
+ "docs": "typedoc src/wavesurfer.ts src/plugins/*.ts --out docs",
41
50
  "lint": "eslint --ext .ts src --fix",
42
51
  "prettier": "prettier -w '**/*.{js,ts,css}' --ignore-path .gitignore",
43
52
  "cypress": "cypress open",
44
53
  "test": "cypress run",
45
- "serve": "cd public && browser-sync start --server --port 9090 --watch '*' --no-ghost-mode --no-ui --cwd",
54
+ "serve": "browser-sync start --server --port 9090 --watch '*' --no-ghost-mode --no-ui -b 'Google Chrome' --startPath '/examples'",
46
55
  "start": "npm run build:dev & npm run serve"
47
56
  },
48
57
  "devDependencies": {