Skip to content

Commit

Permalink
feat: change to module mode
Browse files Browse the repository at this point in the history
change to module mode

BREAKING CHANGE: change to module mode
  • Loading branch information
cycjimmy committed Mar 25, 2022
1 parent a035297 commit cff7d05
Show file tree
Hide file tree
Showing 38 changed files with 6,321 additions and 5,102 deletions.
9 changes: 0 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
}
]
],
"env": {
"test": {
"presets": [
[
"@babel/preset-env"
]
]
}
},
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-object-assign"
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/*
coverage/*
.release/*
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"extends": "rollup",
"root": true,
"extends": "airbnb-base",
"env": {
"browser": true,
"node": true
},
"rules": {
"import/no-cycle": 0,
"no-param-reassign": 0,
"no-bitwise": [
"error",
Expand All @@ -29,7 +31,7 @@
]
}
],
"line-comment-position": 0,
// "line-comment-position": 0,
"no-underscore-dangle": 0,
"no-multi-assign": 0,
"no-plusplus": 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy To gh-pages

on:
push:
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/nodeTestCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- master
- main
- next
- next-major
- alpha
- beta

schedule:
- cron: 0 2 * * 0
Expand All @@ -15,14 +19,40 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [ '16', '17' ]
node: [ '16' ]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run build
- run: npm run package

- name: Semantic Release Test
uses: cycjimmy/semantic-release-action@v3
with:
dry_run: true
branches: |
[
'master',
'main',
'next',
'next-major',
{
name: 'beta',
prerelease: true
},
{
name: 'alpha',
prerelease: true
}
]
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master
- main
- next
- next-major
- alpha
- beta

jobs:
test:
Expand All @@ -22,8 +26,7 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Test
run: npm run build
- run: npm run package

release:
name: release
Expand All @@ -41,12 +44,16 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build package
run: npm run package

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'main',
'next',
Expand Down Expand Up @@ -77,7 +84,7 @@ jobs:

- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: npm publish
run: npm publish ./.release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ node_modules/
.publish/
dist/
temp/
coverage

coverage/
.release/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Contributing
The repository is released under the MIT license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into master.
The repository is released under the MIT license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into main.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 cycjimmy
Copyright (c) 2017-2022 cycjimmy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ new JSMpeg.VideoElement(videoWrapper, videoUrl [, options] [, overlayOptions])
## CDN
To use via a CDN include this in your HTML:
```text
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/jsmpeg-player@5/dist/jsmpeg-player.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/jsmpeg-player@6/dist/jsmpeg-player.umd.min.js"></script>
```

## Encoding Video/Audio for [jsmpeg](https://github.com/phoboslab/jsmpeg) by [ffmpeg](https://ffmpeg.org/). E.g:
Expand Down
Loading

0 comments on commit cff7d05

Please sign in to comment.