Skip to content

Commit

Permalink
better workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jan 12, 2018
1 parent 29a4624 commit 4d1cdb3
Show file tree
Hide file tree
Showing 21 changed files with 3,496 additions and 1,558 deletions.
61 changes: 61 additions & 0 deletions .eslintrc
@@ -0,0 +1,61 @@
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"env": {
"browser": true
},
"rules": {
"no-console": 0,
"no-extra-parens": 1,
"block-scoped-var": 1,
"curly": 1,
"eqeqeq": 1,
"no-global-assign": 1,
"no-implicit-globals": 1,
"no-labels": 1,
"no-multi-str": 1,
"comma-spacing": 1,
"comma-style": 1,
"func-call-spacing": 1,
"indent": 1,
"keyword-spacing": 1,
"linebreak-style": 1,
"lines-around-comment": 1,
"no-multiple-empty-lines": 1,
"space-infix-ops": 1,
"arrow-spacing": 1,
"no-var": 1,
"prefer-const": 1,
"no-unsafe-negation": 1,
"array-callback-return": 1,
"dot-location": 1,
"dot-notation": 1,
"no-eval": 1,
"no-extend-native": 1,
"no-extra-label": 1,
"semi": 1,
"space-before-blocks": 1,
"space-before-function-paren": 1,
"space-in-parens": 1,
"space-unary-ops": 1,
"spaced-comment": 1,
"arrow-body-style": 1,
"arrow-parens": 1,
"no-restricted-imports": 1,
"no-duplicate-imports": 1,
"no-useless-computed-key": 1,
"no-useless-rename": 1,
"rest-spread-spacing": 1,
"no-trailing-spaces": 1
},
"globals": {
"require": false,
"module": false,
"Hls": false,
"flvjs": false,
"dashjs": false
}
}
8 changes: 7 additions & 1 deletion .travis.yml
@@ -1,3 +1,9 @@
language: node_js

node_js:
- "6.1"
- "node"

cache:
yarn: true
directories:
- node_modules
54 changes: 27 additions & 27 deletions demo/demo.js
@@ -1,4 +1,4 @@
var ap1 = new APlayer({
const ap1 = new APlayer({
element: document.getElementById('player1'),
narrow: false,
autoplay: true,
Expand All @@ -10,8 +10,8 @@ var ap1 = new APlayer({
music: {
title: 'Preparation',
author: 'Hans Zimmer/Richard Harvey',
url: 'http://devtest.qiniudn.com/Preparation.mp3',
pic: 'http://devtest.qiniudn.com/Preparation.jpg'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/preparation.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/preparation.jpg'
}
});
ap1.on('play', function () {
Expand All @@ -36,7 +36,7 @@ ap1.on('error', function () {
console.log('error');
});

var ap2 = new APlayer({
const ap2 = new APlayer({
element: document.getElementById('player2'),
narrow: true,
autoplay: false,
Expand All @@ -47,12 +47,12 @@ var ap2 = new APlayer({
music: {
title: 'Preparation',
author: 'Hans Zimmer/Richard Harvey',
url: 'http://devtest.qiniudn.com/Preparation.mp3',
pic: 'http://devtest.qiniudn.com/Preparation.jpg'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/preparation.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/preparation.jpg'
}
});

var ap3 = new APlayer({
const ap3 = new APlayer({
element: document.getElementById('player3'),
narrow: false,
autoplay: false,
Expand All @@ -63,13 +63,13 @@ var ap3 = new APlayer({
music: {
title: '回レ!雪月花',
author: '小倉唯',
url: 'http://devtest.qiniudn.com/回レ!雪月花.mp3',
pic: 'http://devtest.qiniudn.com/回レ!雪月花.jpg',
lrc: "回レ!雪月花.lrc"
url: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.jpg',
lrc: "https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.lrc"
}
});

var ap4 = new APlayer({
const ap4 = new APlayer({
element: document.getElementById('player4'),
narrow: false,
autoplay: false,
Expand All @@ -81,25 +81,25 @@ var ap4 = new APlayer({
{
title: 'あっちゅ~ま青春!',
author: '七森中☆ごらく部',
url: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3',
pic: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.jpg'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.jpg'
},
{
title: 'secret base~君がくれたもの~',
author: '茅野愛衣',
url: 'http://devtest.qiniudn.com/secret base~.mp3',
pic: 'http://devtest.qiniudn.com/secret base~.jpg'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
},
{
title: '回レ!雪月花',
author: '小倉唯',
url: 'http://devtest.qiniudn.com/回レ!雪月花.mp3',
pic: 'http://devtest.qiniudn.com/回レ!雪月花.jpg'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.jpg'
}
]
});

var ap5 = new APlayer({
const ap5 = new APlayer({
element: document.getElementById('player5'),
narrow: false,
autoplay: false,
Expand All @@ -112,23 +112,23 @@ var ap5 = new APlayer({
{
title: 'あっちゅ~ま青春!',
author: '七森中☆ごらく部',
url: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.mp3',
pic: 'http://devtest.qiniudn.com/あっちゅ~ま青春!.jpg',
lrc: 'あっちゅ~ま青春!.lrc'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/yuruyuri.lrc'
},
{
title: 'secret base~君がくれたもの~',
author: '茅野愛衣',
url: 'http://devtest.qiniudn.com/secret base~.mp3',
pic: 'http://devtest.qiniudn.com/secret base~.jpg',
lrc: 'secret base~君がくれたもの~.lrc'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.lrc'
},
{
title: '回レ!雪月花',
author: '小倉唯',
url: 'http://devtest.qiniudn.com/回レ!雪月花.mp3',
pic: 'http://devtest.qiniudn.com/回レ!雪月花.jpg',
lrc: '回レ!雪月花.lrc'
url: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.jpg',
lrc: 'https://moeplayer.b0.upaiyun.com/aplayer/snowmoonflowers.lrc'
}
]
});
3 changes: 1 addition & 2 deletions demo/index.html
Expand Up @@ -43,6 +43,7 @@
font-size: 18px;
}
</style>
<script src="APlayer.js"></script>
</head>
<body>
<div class="container">
Expand Down Expand Up @@ -93,8 +94,6 @@ <h3>With playlist and lyrics</h3>
<h3>Narrow</h3>
<div id="player2" class="aplayer"></div>
</div>
<script src="../dist/APlayer.min.js"></script>
<script src="demo.js"></script>
<a href="https://github.com/DIYgod/APlayer" target="_blank" class="github-corner"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
</body>
</html>
43 changes: 0 additions & 43 deletions demo/secret base~君がくれたもの~.lrc

This file was deleted.

51 changes: 0 additions & 51 deletions demo/あっちゅ~ま青春!.lrc

This file was deleted.

0 comments on commit 4d1cdb3

Please sign in to comment.