提交 60bd5a1e 编写于 作者: Q qiang

update: uni-h5 add src

上级 9847a1e6
......@@ -4,6 +4,11 @@ const {
const Service = require('@vue/cli-service')
const del = require('del')
const copy = require('copy')
const path = require('path')
const jsonfile = require('jsonfile')
const service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd(), {
inlineOptions: require('./vue.config.js')
})
......@@ -17,4 +22,31 @@ service.run('build', {
}).catch(err => {
error(err)
process.exit(1)
})
})
if (process.env.UNI_WATCH === 'false') {
const packagePath = path.join(__dirname, `../packages/uni-${process.env.UNI_PLATFORM}`)
const packageJsonPath = path.join(packagePath, 'package.json')
del(path.join(packagePath, '{lib,src}'))
.then(() => {
copy([path.join(__dirname, '../{lib,src}/**/*')], packagePath, function (err, file) {
if (err) {
throw err
}
})
})
jsonfile.readFile(path.join(__dirname, '../package.json'))
.then(origin => {
return jsonfile.readFile(packageJsonPath)
.then(obj => {
obj.dependencies = origin.dependencies
return obj
})
})
.then(obj => {
return jsonfile.writeFile(packageJsonPath, obj, { spaces: 2 })
})
.catch(err => {
throw err
})
}
......@@ -15,7 +15,10 @@
"build:runtime": "npm run lint && npm run build:mp-weixin && npm run build:mp-qq && npm run build:mp-alipay && npm run build:mp-baidu && npm run build:mp-toutiao && npm run build:app-plus",
"test:unit": "cross-env NODE_ENV=test UNI_PLATFORM=h5 mocha-webpack --require tests/unit/setup.js --webpack-config build/webpack.config.test.js tests/unit/**/*.spec.js"
},
"dependencies": {},
"dependencies": {
"base64-arraybuffer": "^0.2.0",
"intersection-observer": "^0.7.0"
},
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "^3.4.1",
......@@ -25,11 +28,12 @@
"@vue/test-utils": "^1.0.0-beta.25",
"babel-eslint": "^10.0.1",
"babylon": "^6.18.0",
"base64-arraybuffer": "^0.2.0",
"browserslist": "^4.4.2",
"caniuse-lite": "^1.0.30000940",
"chai": "^4.1.2",
"copy": "^0.3.2",
"cross-env": "^5.2.0",
"del": "^5.0.0",
"eslint": "^5.5.0",
"eslint-config-standard": "^12.0.0",
"eslint-loader": "^2.1.0",
......@@ -38,9 +42,9 @@
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"intersection-observer": "^0.7.0",
"jsdom": "^13.0.0",
"jsdom-global": "^3.0.2",
"jsonfile": "^5.0.0",
"rollup": "^0.67.4",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-replace": "^2.1.0",
......
/lib/
/src/
\ No newline at end of file
!/lib/
!/src/
\ No newline at end of file
{
"name": "@dcloudio/uni-h5",
"version": "0.6.1",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "fxy060608",
"license": "Apache-2.0"
}
{
"name": "@dcloudio/uni-h5",
"version": "0.7.0",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "fxy060608",
"license": "Apache-2.0",
"dependencies": {
"base64-arraybuffer": "^0.2.0",
"intersection-observer": "^0.7.0"
}
}
const path = require('path')
module.exports = {
src: path.join(__dirname, 'src'),
lib: path.join(__dirname, 'lib')
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册