mirror of https://github.com/Kylart/KawAnime.git
re added tests and removed after build
This commit is contained in:
parent
f18c0e05cb
commit
74c880bbd2
|
@ -53,7 +53,7 @@ test_script:
|
|||
- npm --version
|
||||
- npm run lint
|
||||
- npm run dist:win
|
||||
# - npm run test
|
||||
- npm run test
|
||||
|
||||
deploy_script:
|
||||
- IF [%APPVEYOR_REPO_BRANCH%]==[master] npm run publish:win && npm run publish:portable
|
|
@ -11,9 +11,8 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development vue-cli-service electron:serve",
|
||||
"start": "cross-env NODE_ENV=production npm run build:after && electron dist/bundled/background.js",
|
||||
"start": "cross-env NODE_ENV=production electron dist/bundled/background.js",
|
||||
"build": "vue-cli-service electron:build",
|
||||
"build:after": "node scripts/afterBuild.js",
|
||||
"build:bindings": "cmake-js build -d bindings -O bindings/build",
|
||||
"move:libs": "node scripts/moveLibs.js",
|
||||
"collect:dylibs": "./collect-dylib-deps.sh",
|
||||
|
@ -32,7 +31,7 @@
|
|||
"install:deps": "bash bindings/scripts/install.sh",
|
||||
"postinstall": "npm run compile:bindings && node scripts/postinstall && electron-builder install-app-deps",
|
||||
"postuninstall": "electron-builder install-app-deps",
|
||||
"test": "cross-env IS_TEST=true npm run build:after && mocha --reporter mochawesome"
|
||||
"test": "cross-env IS_TEST=true mocha --reporter mochawesome"
|
||||
},
|
||||
"dependencies": {
|
||||
"buttercup": "^2.16.1",
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
const { resolve, extname } = require('path')
|
||||
const { copyFileSync, readdirSync, mkdirSync, existsSync } = require('fs')
|
||||
|
||||
const NATIVE_ADDON_RELEASE_PATH = resolve(__dirname, '..', 'bindings', 'build', 'Release')
|
||||
const BUNDLE_PATH = resolve(__dirname, '..', 'dist', 'bundled')
|
||||
|
||||
const MPV_PUBLIC_PATH = resolve(__dirname, '..', 'public', 'mpv')
|
||||
const MPV_PATH = resolve(__dirname, '..', 'dist', 'mpv')
|
||||
|
||||
const actions = {
|
||||
win32: windows
|
||||
}
|
||||
|
||||
function moveNativeAddonFiles () {
|
||||
const nativeFiles = readdirSync(NATIVE_ADDON_RELEASE_PATH)
|
||||
|
||||
nativeFiles.forEach((filename) => {
|
||||
if (['.dll', '.lib'].includes(extname(filename))) {
|
||||
console.log(`Moving ${filename} to ${BUNDLE_PATH}`)
|
||||
|
||||
copyFileSync(
|
||||
resolve(NATIVE_ADDON_RELEASE_PATH, filename),
|
||||
resolve(BUNDLE_PATH, filename)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function moveMPVFiles () {
|
||||
const mpvFiles = readdirSync(MPV_PUBLIC_PATH)
|
||||
|
||||
if (!existsSync(MPV_PATH)) mkdirSync(MPV_PATH)
|
||||
|
||||
mpvFiles.forEach((filename) => {
|
||||
if (['.dll', '.node'].includes(extname(filename))) {
|
||||
console.log(`Moving ${filename} to ${MPV_PATH}`)
|
||||
|
||||
copyFileSync(
|
||||
resolve(MPV_PUBLIC_PATH, filename),
|
||||
resolve(MPV_PATH, filename)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function windows () {
|
||||
moveNativeAddonFiles()
|
||||
moveMPVFiles()
|
||||
}
|
||||
|
||||
(
|
||||
actions[process.platform] || (() => {})
|
||||
)()
|
Loading…
Reference in New Issue