Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regions plugin: move classes to separate files #1934

Merged
merged 35 commits into from
May 11, 2020

Conversation

marizuccara
Copy link
Contributor

@marizuccara marizuccara commented May 4, 2020

regions.js file was splitted in two files, one containing the RegionsPlugin class, another the Region class.
This approach is useful because separating two conceptually different objects allows to treat them as different modules. In this way creating a Custom Plugin that extends the RegionsPlugin is simpler, and allows you to decide whether to leave Region class unchanged, or extends it too.

Breaking changes in the internal API:

  • Splitted regions.js in index.js and region.js and moved both files in src/plugin/regions/ directory.
  • Modified the plugins' build file, so to build the entry point are considered also nested directories

Related Issues and other PRs:

PR #1928

marizuccara and others added 30 commits October 7, 2019 13:00
… HTML5 audio tag and use it with WebAudio features.
- Put the possibility of handle audio tag with API Web Audio directly in the MediaElement backend, setting a new wavesurfer boolean parameter, 'mediaElementWebAudio', to true.
- fixed version number and switch-case
…for Region class, and moved both to plugin/regions dir

- added findInDirectory function in the plugin build file, so the plugins entries can be found also if in deeper directories, recursively
@coveralls
Copy link

coveralls commented May 4, 2020

Coverage Status

Coverage remained the same at 80.62% when pulling 94a3071 on marizuccara:master into f33cfc8 on katspaugh:master.

Copy link
Contributor

@thijstriemstra thijstriemstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! See inline comment. Can you also add a changelog entry (i would use version 3.4.0).

src/plugin/regions/regions.js Outdated Show resolved Hide resolved
marizuccara added 2 commits May 9, 2020 15:25
# Conflicts:
#	CHANGES.md
#	src/plugin/regions/region.js
CHANGES.md Outdated Show resolved Hide resolved
- updated the way of building plugins, in particular using parent directory name for the plugin when its name is index.js
- updated versioning and comments
@thijstriemstra thijstriemstra changed the title Splitting Regions plugin class regions plugin: move classes to separate files May 11, 2020
Copy link
Contributor

@thijstriemstra thijstriemstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants