mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
dev init
This commit is contained in:
1 parent
0130455888
commit
d62405e8ff
4 files changed
+92
-31
No files matched your search
+28
-4
@@ -3,9 +3,10 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "ArtPlayer is a modern HTML5 video player",
|
"description": "ArtPlayer is a modern HTML5 video player",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "lerna bootstrap",
|
"bootstrap": "node ./node_modules/.bin/lerna bootstrap",
|
||||||
"publish": "lerna publish",
|
"publish": "node ./node_modules/.bin/lerna publish",
|
||||||
"build": "lerna run build",
|
"dev": "node ./node_modules/.bin/cross-env NODE_ENV=development node ./script/dev.js",
|
||||||
|
"build": "node ./node_modules/.bin/cross-env NODE_ENV=production node ./script/build.js",
|
||||||
"test": "node ./node_modules/.bin/mocha-chrome ./docs/test/index.html --mocha '{\"ui\":\"bdd\"}'",
|
"test": "node ./node_modules/.bin/mocha-chrome ./docs/test/index.html --mocha '{\"ui\":\"bdd\"}'",
|
||||||
"lint": "node ./node_modules/.bin/eslint packages/*/src"
|
"lint": "node ./node_modules/.bin/eslint packages/*/src"
|
||||||
},
|
},
|
||||||
@@ -24,14 +25,37 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.1.2",
|
||||||
|
"@babel/plugin-external-helpers": "^7.0.0",
|
||||||
|
"@babel/plugin-transform-runtime": "^7.1.0",
|
||||||
|
"@babel/preset-env": "^7.1.0",
|
||||||
|
"@babel/runtime": "^7.1.2",
|
||||||
|
"autoprefixer": "^9.3.1",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
|
"browser-env": "^3.2.5",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
|
"chalk": "^2.4.1",
|
||||||
|
"cross-env": "^5.2.0",
|
||||||
|
"cssnano": "^4.1.7",
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^5.9.0",
|
||||||
"eslint-config-airbnb-base": "^13.1.0",
|
"eslint-config-airbnb-base": "^13.1.0",
|
||||||
"eslint-config-prettier": "^3.3.0",
|
"eslint-config-prettier": "^3.3.0",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
|
"glob": "^7.1.3",
|
||||||
|
"inquirer": "^6.2.0",
|
||||||
"lerna": "^3.4.3",
|
"lerna": "^3.4.3",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"mocha-chrome": "^1.1.0"
|
"mocha-chrome": "^1.1.0",
|
||||||
|
"node-sass": "^4.9.4",
|
||||||
|
"ora": "^3.0.0",
|
||||||
|
"rollup": "^0.67.0",
|
||||||
|
"rollup-plugin-babel": "^4.0.3",
|
||||||
|
"rollup-plugin-commonjs": "^9.2.0",
|
||||||
|
"rollup-plugin-eslint": "^5.0.0",
|
||||||
|
"rollup-plugin-node-resolve": "^3.4.0",
|
||||||
|
"rollup-plugin-postcss": "^1.6.2",
|
||||||
|
"rollup-plugin-replace": "^2.1.0",
|
||||||
|
"rollup-plugin-svgo": "^1.0.1",
|
||||||
|
"rollup-plugin-uglify": "^6.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,11 +4,6 @@
|
|||||||
"description": "Danmu plugin for ArtPlayer",
|
"description": "Danmu plugin for ArtPlayer",
|
||||||
"main": "dist/artplayer-plugin-subtitle.js",
|
"main": "dist/artplayer-plugin-subtitle.js",
|
||||||
"style": "dist/artplayer-plugin-subtitle.css",
|
"style": "dist/artplayer-plugin-subtitle.css",
|
||||||
"scripts": {
|
|
||||||
"dev": "cross-env NODE_ENV=development rollup -c -m -w",
|
|
||||||
"build": "cross-env NODE_ENV=production rollup -c",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||||
@@ -22,26 +17,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme"
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.1.2",
|
|
||||||
"@babel/plugin-external-helpers": "^7.0.0",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.1.0",
|
|
||||||
"@babel/preset-env": "^7.1.0",
|
|
||||||
"@babel/runtime": "^7.1.2",
|
|
||||||
"autoprefixer": "^9.3.1",
|
|
||||||
"browser-env": "^3.2.5",
|
|
||||||
"cross-env": "^5.2.0",
|
|
||||||
"cssnano": "^4.1.7",
|
|
||||||
"node-sass": "^4.9.4",
|
|
||||||
"rollup": "^0.67.0",
|
|
||||||
"rollup-plugin-babel": "^4.0.3",
|
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
|
||||||
"rollup-plugin-eslint": "^5.0.0",
|
|
||||||
"rollup-plugin-node-resolve": "^3.4.0",
|
|
||||||
"rollup-plugin-postcss": "^1.6.2",
|
|
||||||
"rollup-plugin-replace": "^2.1.0",
|
|
||||||
"rollup-plugin-svgo": "^1.0.1",
|
|
||||||
"rollup-plugin-uglify": "^6.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Whitespace-only changes.
@@ -0,0 +1,63 @@
|
|||||||
|
const path = require('path');
|
||||||
|
const babel = require('rollup-plugin-babel');
|
||||||
|
const commonjs = require('rollup-plugin-commonjs');
|
||||||
|
const nodeResolve = require('rollup-plugin-node-resolve');
|
||||||
|
const postcss = require('rollup-plugin-postcss');
|
||||||
|
const { eslint } = require('rollup-plugin-eslint');
|
||||||
|
const autoprefixer = require('autoprefixer');
|
||||||
|
const cssnano = require('cssnano');
|
||||||
|
const replace = require('rollup-plugin-replace');
|
||||||
|
const svgo = require('rollup-plugin-svgo');
|
||||||
|
const { uglify } = require('rollup-plugin-uglify');
|
||||||
|
const { version, homepage, name } = require('./package.json');
|
||||||
|
|
||||||
|
const isProd = process.env.NODE_ENV === 'production';
|
||||||
|
|
||||||
|
const banner =
|
||||||
|
'/*!\n' +
|
||||||
|
` * ${name}.js v${version}\n` +
|
||||||
|
` * Github: ${homepage}\n` +
|
||||||
|
` * (c) 2017-${new Date().getFullYear()} Harvey Zack\n` +
|
||||||
|
' * Released under the MIT License.\n' +
|
||||||
|
' */\n';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/index.js',
|
||||||
|
output: {
|
||||||
|
name,
|
||||||
|
file: isProd ? `dist/${name}.js` : path.join(process.cwd(), '../../', `docs/uncompiled/${name}.js`),
|
||||||
|
format: 'umd',
|
||||||
|
exports: 'named',
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
eslint({
|
||||||
|
exclude: ['node_modules/**', 'src/**/*.scss', 'src/**/*.svg'],
|
||||||
|
}),
|
||||||
|
postcss({
|
||||||
|
plugins: [autoprefixer, cssnano],
|
||||||
|
extract: isProd ? `dist/${name}.css` : path.join(process.cwd(), '../../', `docs/uncompiled/${name}.css`),
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
commonjs(),
|
||||||
|
babel({
|
||||||
|
runtimeHelpers: true,
|
||||||
|
exclude: 'node_modules/**',
|
||||||
|
presets: [['@babel/env', { modules: false }]],
|
||||||
|
plugins: ['@babel/plugin-external-helpers', '@babel/plugin-transform-runtime'],
|
||||||
|
}),
|
||||||
|
svgo({
|
||||||
|
raw: true,
|
||||||
|
}),
|
||||||
|
replace({
|
||||||
|
exclude: 'node_modules/**',
|
||||||
|
__ENV__: JSON.stringify(process.env.NODE_ENV || 'development'),
|
||||||
|
__VERSION__: version,
|
||||||
|
}),
|
||||||
|
isProd &&
|
||||||
|
uglify({
|
||||||
|
output: {
|
||||||
|
preamble: banner,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
||||||
Reference in new issue
Block a user