Skip to content

Commit

Permalink
7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Jul 29, 2023
1 parent 201d68d commit a012cdc
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 224 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wavesurfer.js",
"version": "7.0.7",
"version": "7.1.0",
"license": "BSD-3-Clause",
"author": "katspaugh",
"description": "Navigable audio waveform player",
Expand Down Expand Up @@ -46,7 +46,7 @@
"build": "rm -rf dist && tsc && rollup -c",
"deploy": "yarn build && yarn docs",
"prepublishOnly": "npm run build",
"docs": "typedoc --titleLink '/' src/wavesurfer.ts src/plugins/*.ts --out docs",
"docs": "npx typedoc --titleLink '/' src/wavesurfer.ts src/plugins/*.ts --out docs",
"gpt-docs": "node ./scripts/gpt-docs.js",
"lint": "eslint --ext .ts src --fix",
"prettier": "prettier -w '**/*.{js,ts,css}' --ignore-path .gitignore",
Expand All @@ -64,14 +64,11 @@
"@typescript-eslint/parser": "^5.57.0",
"cypress": "^12.9.0",
"cypress-image-snapshot": "^4.0.1",
"dotenv": "^16.3.1",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.7",
"rollup": "^3.26.2",
"ts-loader": "^9.4.2",
"typedoc": "^0.24.6",
"typescript": "^5.0.4"
}
}
42 changes: 0 additions & 42 deletions scripts/gpt-docs.js

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ fi

FILE_NAME=$(echo "$PLUGIN_NAME" | sed -e 's/\(.*\)/\L\1/')

cat ./scripts/plugin-template.ts.template | sed "s/PluginName/$PLUGIN_NAME/g" > "./src/plugins/${FILE_NAME}.ts"
cat ./scripts/plugin-template.ts.template | sed "s/Template/$PLUGIN_NAME/g" > "./src/plugins/${FILE_NAME}.ts"
18 changes: 9 additions & 9 deletions scripts/plugin.ts.template
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
/**
* The PluginName plugin
* The Template plugin
*/

import BasePlugin, { type BasePluginEvents } from '../base-plugin.js'

export type PluginNamePluginOptions = {
export type TemplatePluginOptions = {
}

const defaultOptions = {
}

export type PluginNamePluginEvents = BasePluginEvents & {
export type TemplatePluginEvents = BasePluginEvents & {
}

export class PluginNamePlugin extends BasePlugin<PluginNamePluginEvents, PluginNamePluginOptions> {
protected options: PluginNamePluginOptions & typeof defaultOptions
export class TemplatePlugin extends BasePlugin<TemplatePluginEvents, TemplatePluginOptions> {
protected options: TemplatePluginOptions & typeof defaultOptions

constructor(options?: PluginNamePluginOptions) {
constructor(options?: TemplatePluginOptions) {
super(options || {})

this.options = Object.assign({}, defaultOptions, options)
}

public static create(options?: PluginNamePluginOptions) {
return new PluginNamePlugin(options)
public static create(options?: TemplatePluginOptions) {
return new TemplatePlugin(options)
}

/** Called by wavesurfer, don't call manually */
Expand All @@ -39,4 +39,4 @@ export class PluginNamePlugin extends BasePlugin<PluginNamePluginEvents, PluginN
}
}

export default PluginNamePlugin
export default TemplatePlugin
Loading

0 comments on commit a012cdc

Please sign in to comment.