Skip to content

Commit d34525e

Browse files
committed
ES6 and sourcemaps
1 parent 4c22637 commit d34525e

6 files changed

Lines changed: 494 additions & 506 deletions

File tree

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -183,26 +183,6 @@ $ npm run build
183183

184184
+ [hexo-tag-aplayer](https://github.com/grzhan/hexo-tag-aplayer)
185185

186-
## Todo
187-
188-
- [x] 播放进度拖拽控制
189-
- [x] 音量控制
190-
- [x] 分享到微博
191-
- [x] 加载样式及错误处理
192-
- [x] 窄样式 及 移动版样式
193-
- [x] 歌词展示
194-
- [x] 默认选项
195-
- [x] 移动端兼容性
196-
- [x] 播放列表
197-
- [x] 播放暂停按钮切换动画
198-
199-
## Issues
200-
201-
- [ ] 在 Firefox 中调整进度后, 播放到最后时音乐总时间会自动变长
202-
- [ ] 移动端各种浏览器触发事件的时机不同
203-
- [ ] 移动版 Safari 和 部分 Android 浏览器不支持 volume
204-
- [ ] 部分 Android 浏览器不支持 duration
205-
206186

207187
## LICENSE
208188

dist/APlayer.min.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/APlayer.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ var uglify = require('gulp-uglify');
55
var concat = require('gulp-concat');
66
var cssNano = require('gulp-cssnano');
77
var rename = require('gulp-rename');
8+
var babel = require("gulp-babel");
9+
var sourcemaps = require("gulp-sourcemaps");
810
var browserSync = require('browser-sync').create();
911

1012
// Launch the server
@@ -28,10 +30,15 @@ gulp.task('copy', function () {
2830
// Build js files
2931
gulp.task('compressJS', function() {
3032
gulp.src(['src/*.js'])
33+
.pipe(sourcemaps.init())
34+
.pipe(babel({
35+
presets: ['es2015']
36+
}))
3137
.pipe(uglify())
3238
.pipe(rename({
3339
suffix: ".min"
3440
}))
41+
.pipe(sourcemaps.write("."))
3542
.pipe(gulp.dest('dist'))
3643
.pipe(browserSync.stream());
3744
});

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aplayer",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"description": "Wow, such a beautiful html5 music player",
55
"main": "dist/APlayer.min.js",
66
"scripts": {
@@ -24,13 +24,16 @@
2424
},
2525
"homepage": "https://github.com/DIYgod/APlayer#readme",
2626
"devDependencies": {
27+
"babel-preset-es2015": "^6.6.0",
2728
"browser-sync": "^2.10.0",
2829
"gulp": "^3.9.0",
2930
"gulp-autoprefixer": "^3.1.0",
31+
"gulp-babel": "^6.1.2",
3032
"gulp-concat": "^2.6.0",
3133
"gulp-cssnano": "^2.1.0",
3234
"gulp-rename": "^1.2.2",
3335
"gulp-sass": "^2.1.0",
36+
"gulp-sourcemaps": "^1.6.0",
3437
"gulp-uglify": "^1.5.1"
3538
}
3639
}

0 commit comments

Comments
 (0)