Commit 0df7121f authored by erichsieh's avatar erichsieh

0.1.2

parent a60d3117
import service from '@utils/GraphApiService'
export function splitDocxByBookMark(baseURL, data) {
return service({
baseURL: baseURL,
url: 'Word/SplitDocxByBookMark',
method: 'post',
data
})
}
export function splitDocxByRange(baseURL, data) {
return service({
baseURL: baseURL,
url: 'Word/SplitDocxByRange',
method: 'post',
data
})
}
export function splitDocx(baseURL, data) {
return service({
baseURL: baseURL,
url: 'Word/SplitDocx',
method: 'post',
data
})
}
export function splitDocxByPageBreak(baseURL, data) {
return service({
baseURL: baseURL,
url: 'Word/SplitDocxByPageBreak',
method: 'post',
data
})
}
\ No newline at end of file
const fs = require('fs');
const path = require('path');
const join = path.join;
const resolve = dir => path.join(__dirname, '../', dir);
function getComponentEntries(path) {
let files = fs.readdirSync(resolve(path));
const componentEntries = files.reduce((fileObj, item) => {
const itemPath = join(path, item);
const isDir = fs.statSync(itemPath).isDirectory();
const [name, suffix] = item.split('.');
if (isDir) {
fileObj[item] = resolve(join(itemPath, 'index.js'));
}
else if (suffix === 'js') {
fileObj[name] = resolve(`${itemPath}`);
}
return fileObj;
}, {});
return componentEntries;
}
const buildConfig = {
outputDir: resolve('lib'),
productionSourceMap: false,
configureWebpack: {
entry: getComponentEntries('packages'),
output: {
filename: '[name]/index.js',
libraryExport: 'default',
library: '@purplevin/component',
libraryTarget: 'umd'
},
resolve: {
alias: {
'@': resolve('packages'),
'@utils': resolve('utils'),
'@config': resolve('config'),
'@api': resolve('api')
}
}
},
css: {
sourceMap: false,
extract: {
filename: '[name]/index.css'
}
},
chainWebpack: config => {
config.optimization.delete('splitChunks');
config.plugins.delete('copy');
config.plugins.delete('preload');
config.plugins.delete('prefetch');
config.plugins.delete('html');
config.plugins.delete('hmr');
config.entryPoints.delete('app');
}
};
module.exports = buildConfig;
\ No newline at end of file
const path = require('path')
const resolve = dir => path.join(__dirname, '../', dir);
module.exports = {
pages: {
index: {
entry: 'example/main.js',
template: 'public/index.html',
filename: 'index.html'
}
},
chainWebpack: config => {
config.module
.rule('js')
.include
.add('/packages')
.end()
.use('babel')
.loader('babel-loader')
.tap(options => {
return options
})
},
configureWebpack: config=>{
Object.assign(config.resolve, {
alias: {
'@': resolve('packages'),
'@utils': resolve('utils'),
'@config': resolve('config'),
'@api': resolve('api')
}
})
}
}
\ No newline at end of file
module.exports = {
prod_sz:{
VUE_APP_GRAPHAPI_URL :'https://pvapi.purplevineip.com/graphAPI/api/v1.0/'
},
prod_tp:{
VUE_APP_GRAPHAPI_URL : 'https://pvapi.purplevineip.com/graphAPI/api/v1.0/'
},
prod_test_sz:{
VUE_APP_GRAPHAPI_URL : 'https://dev.essenptl.com/graphAPITest/api/v1.0/'
},
dev_tp:{
VUE_APP_GRAPHAPI_URL : 'http://localhost:64224/api/v1.0/'
},
dev_sz:{
VUE_APP_GRAPHAPI_URL : 'http://localhost:64224/api/v1.0/'
},
dev_test_tp:{
VUE_APP_GRAPHAPI_URL : 'https://dev.essenptl.com/graphAPITest/api/v1.0/'
},
dev_test_sz:{
VUE_APP_GRAPHAPI_URL : 'https://dev.essenptl.com/graphAPITest/api/v1.0/'
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<div id="app">
Hi app
<pLink type="primary">Test</pLink>
<splitTool env="dev_test_sz"></splitTool>
</div>
</template>
......
import Vue from 'vue'
import App from './App.vue'
import purpUI from '../packages'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.use(purpUI)
new Vue({
render: h => h(App),
}).$mount('#app')
This diff is collapsed.
{"version":3,"file":"index.common.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;;;;;;;;;;;;;ACAA;AACA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACA,kDAAe,IAAI;;;ACtBnB,+BAA+B,6BAA6B,eAAe,iBAAiB,SAAS,UAAU,8BAA8B;AAC7I;AACA;;;;;ACOA,EAAE,gEAAe;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;ACpBiI,CAAC,2EAAe,2BAAG,EAAC;;ACAxJ;;;;;AEAA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC/FgG;AACvC;AACL;AACpD,CAA+F;;;AAG/F;AACsG;AACtG,gBAAgB,kBAAU;AAC1B,EAAE,sCAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA,mDAAe;;ACnBqB;AACpC;AACA;AACA,EAAE,cAAK;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+CAAe;AACf;AACA;AACA,OAAO;AACP;;ACpBwB;AACA;AACxB,8CAAe,UAAG;AACI","sources":["webpack://@purplevin/component/webpack/bootstrap","webpack://@purplevin/component/webpack/runtime/define property getters","webpack://@purplevin/component/webpack/runtime/hasOwnProperty shorthand","webpack://@purplevin/component/webpack/runtime/make namespace object","webpack://@purplevin/component/webpack/runtime/publicPath","webpack://@purplevin/component/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://@purplevin/component/./packages/aComponent/src/index.vue?67c5","webpack://@purplevin/component/packages/aComponent/src/index.vue","webpack://@purplevin/component/./packages/aComponent/src/index.vue?bcd3","webpack://@purplevin/component/./packages/aComponent/src/index.vue?bad8","webpack://@purplevin/component/./packages/aComponent/src/index.vue?10a7","webpack://@purplevin/component/./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js","webpack://@purplevin/component/./packages/aComponent/src/index.vue","webpack://@purplevin/component/./packages/index.js","webpack://@purplevin/component/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","/* eslint-disable no-var */\n// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('a',{class:[`p-link-${_vm.type}`],attrs:{\"href\":_vm.href || undefined}},[_vm._t(\"default\")],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <!-- 用传过来 href 进行跳转 --> <!-- 用传过来的 type 修改颜色 --> \r\n <a :href=\"href || undefined\" :class=\"[`p-link-${type}`]\" >\r\n <!-- 使用默认插槽来填充文本 -->\r\n <slot/>\r\n </a>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n // 等下 index.js 里面要用到\r\n name:\"pLink\",\r\n props: {\r\n // 限制类型\r\n href: String,\r\n type: {\r\n type: String,\r\n default: 'default'\r\n }\r\n }\r\n }\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n // 定义链接字体颜色\r\n .p-link-default {\r\n color: #606266;\r\n }\r\n .p-link-primary {\r\n color: #409eff;\r\n }\r\n</style>","import mod from \"-!../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","// extracted by mini-css-extract-plugin\nexport {};","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=30dd6ef1&prod&lang=scss&scoped=true&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=30dd6ef1&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=30dd6ef1&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"30dd6ef1\",\n null\n \n)\n\nexport default component.exports","import pLink from './aComponent/src'\r\n// 存放组件的数组\r\nconst components = [\r\n pLink\r\n]\r\n\r\n// 定义 install 方法,接收 Vue 作为参数。\r\nconst install = function (Vue) {\r\n // 判断是否安装\r\n if (install.installed) return\r\n // 遍历 components 数组,来进行全局注册\r\n components.map(component => {\r\n Vue.component(component.name, component)\r\n })\r\n}\r\n\r\nexport default {\r\n // 导出的对象必须具有 install,才能被 Vue.use() 方法安装\r\n install,\r\n pLink\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"name": "component",
"version": "0.1.0",
"name": "@purplevin/component",
"version": "0.1.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "component",
"version": "0.1.0",
"name": "@purplevin/component",
"version": "0.1.2",
"dependencies": {
"axios": "^0.27.2",
"core-js": "^3.8.3",
"element-ui": "^2.15.9",
"vue": "^2.6.14"
......@@ -18,6 +19,11 @@
"sass": "^1.32.7",
"sass-loader": "^12.0.0",
"vue-template-compiler": "^2.6.14"
},
"peerDependencies": {
"element-ui": "^2.15.9",
"sass-loader": "^12.0.0",
"vue": "^2.6.14"
}
},
"node_modules/@achrinza/node-ipc": {
......@@ -3144,6 +3150,11 @@
"babel-runtime": "6.x"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
......@@ -3186,6 +3197,15 @@
"postcss": "^8.1.0"
}
},
"node_modules/axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"dependencies": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"node_modules/babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
......@@ -3860,6 +3880,17 @@
"integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
"dev": true
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
......@@ -4619,6 +4650,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
......@@ -5247,7 +5286,6 @@
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"dev": true,
"funding": [
{
"type": "individual",
......@@ -5263,6 +5301,19 @@
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
......@@ -6626,7 +6677,6 @@
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
......@@ -6635,7 +6685,6 @@
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"dependencies": {
"mime-db": "1.52.0"
},
......@@ -12589,6 +12638,11 @@
"babel-runtime": "6.x"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
......@@ -12609,6 +12663,15 @@
"postcss-value-parser": "^4.2.0"
}
},
"axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"requires": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
......@@ -13115,6 +13178,14 @@
"integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
"dev": true
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
......@@ -13651,6 +13722,11 @@
"object-keys": "^1.1.1"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
......@@ -14157,8 +14233,17 @@
"follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"dev": true
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.2.0",
......@@ -15178,14 +15263,12 @@
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"requires": {
"mime-db": "1.52.0"
}
......
{
"name": "@purplevin/component",
"version": "0.1.1",
"version": "0.1.2",
"private": true,
"main": "lib/index.umd.min.js",
"scripts": {
......@@ -9,6 +9,7 @@
"lib": "vue-cli-service build --target lib --name index --dest lib packages/index.js"
},
"dependencies": {
"axios": "^0.27.2",
"core-js": "^3.8.3",
"element-ui": "^2.15.9",
"vue": "^2.6.14"
......@@ -20,6 +21,11 @@
"sass-loader": "^12.0.0",
"vue-template-compiler": "^2.6.14"
},
"peerDependencies":{
"element-ui": "^2.15.9",
"vue": "^2.6.14",
"sass-loader": "^12.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
......
import pLink from './src'
pLink.install = function (Vue) {
Vue.component(pLink.name, pLink)
}
export default pLink
\ No newline at end of file
import pLink from './aComponent/src'
import pLink from './aComponent'
import splitTool from './splitTool'
// 存放组件的数组
const components = [
pLink
pLink,
splitTool
]
// 定义 install 方法,接收 Vue 作为参数。
const install = function (Vue) {
// 判断是否安装
if (install.installed) return
// 遍历 components 数组,来进行全局注册
components.map(component => {
Vue.component(component.name, component)
// 全局注册
const install = function( Vue, opt = {} ) {
components.forEach(item => {
register( Vue, item )
})
}
export default {
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
export default install
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
/**
* 注册组件
* @param { vue } _v
* @param { component } com
*/
function register ( _v, com ) {
if(typeof _v !== 'function' && typeof com !== 'object') return
_v.component( com.name, com)
}
// 按需暴露
export {
install,
pLink
pLink,
splitTool
}
\ No newline at end of file
import splitTool from './src'
splitTool.install = function (Vue) {
Vue.component(splitTool.name, splitTool)
}
export default splitTool
\ No newline at end of file
<template>
<div>
<h3>分割文件(根據書籤)</h3>
<el-alert
title="系統將會根據書籤來分割文件, 請在需要分割的位置加上書籤,書籤名稱為分頁1,數字可由1開始持續累加"
type="info"
/>
<br>
<el-form ref="searchForm" size="small" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="Word" prop="business">
<el-upload
ref="upload"
class="upload-demo"
drag
:limit="1"
:file-list="fileList"
:action="uploadURL"
:on-change="handelFileChange"
:on-remove="handleFileRemove"
:on-exceed="handleExceed"
:auto-upload="false"
accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" :offset="10">
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="submitUpload"
>
开始转换
</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import { splitDocxByBookMark } from '@api/graphApi'
export default {
name: 'SplitWordForm',
props:{
baseUrl:{
type: String
}
},
data: function() {
return {
uploadURL: 'Word/SplitDocxByBookMark',
fileList: []
}
},
methods: {
// 上传到服务器
async submitUpload() {
console.log(this.fileList)
if (this.fileList.length <= 0) {
this.$message.error('请先选择需要上传的文件!')
return false
}
const formData = new FormData()
this.fileList.forEach(e => {
formData.append('file', e.raw)
})
const response = await splitDocxByBookMark(this.baseUrl, formData)
if (response) {
this.fileList = []
this.$refs.upload.clearFiles()
const excelFileName = response.data
this.downloadFile(excelFileName)
} else {
this.$refs.upload.abort()
this.$message.error('下载档案失败!')
}
},
// 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
handelFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.fileList.length; i++) {
if (
file.name === this.fileList[i].name &&
file.size === this.fileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.fileList.push(file)
},
handelDetailFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.detailFileList.length; i++) {
if (
file.name === this.detailFileList[i].name &&
file.size === this.detailFileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.detailFileList.push(file)
},
// 文件列表移除文件时的钩子
handleFileRemove(file, fileList) {
this.fileList = fileList
},
handleDetailFileRemove(file, fileList) {
this.detailFileList = fileList
},
handleExceed(files, fileList) {
this.$set(fileList[0], 'raw', files[0])
this.$set(fileList[0], 'name', files[0].name)
this.$refs['rebateUpload'].clearFiles()// 清除文件
this.$refs['rebateUpload'].handleStart(files[0])// 选择文件后的赋值方法
}
}
}
</script>
<template>
<div>
<h3>分割文件(根據分頁符號)</h3>
<el-alert
title="系統將會識別分頁符號來進行分割"
type="info"
/>
<br>
<el-form ref="searchForm" size="small" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="Word" prop="business">
<el-upload
ref="upload"
class="upload-demo"
drag
:limit="1"
:file-list="fileList"
:action="uploadURL"
:on-change="handelFileChange"
:on-remove="handleFileRemove"
:on-exceed="handleExceed"
:auto-upload="false"
accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" :offset="10">
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="submitUpload"
>
开始转换
</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import { splitDocxByPageBreak } from '@api/graphApi'
export default {
name: 'SplitWordForm',
props:{
baseUrl:{
type: String
}
},
data: function() {
return {
uploadURL: 'Word/SplitDocxByPageBreak',
fileList: []
}
},
methods: {
// 上传到服务器
async submitUpload() {
console.log(this.fileList)
if (this.fileList.length <= 0) {
this.$message.error('请先选择需要上传的文件!')
return false
}
const formData = new FormData()
this.fileList.forEach(e => {
formData.append('file', e.raw)
})
const response = await splitDocxByPageBreak(this.baseUrl, formData)
if (response) {
this.fileList = []
this.$refs.upload.clearFiles()
const excelFileName = response.data
this.downloadFile(excelFileName)
} else {
this.$refs.upload.abort()
this.$message.error('下载档案失败!')
}
},
// 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
handelFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.fileList.length; i++) {
if (
file.name === this.fileList[i].name &&
file.size === this.fileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.fileList.push(file)
},
handelDetailFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.detailFileList.length; i++) {
if (
file.name === this.detailFileList[i].name &&
file.size === this.detailFileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.detailFileList.push(file)
},
// 文件列表移除文件时的钩子
handleFileRemove(file, fileList) {
this.fileList = fileList
},
handleDetailFileRemove(file, fileList) {
this.detailFileList = fileList
},
handleExceed(files, fileList) {
this.$set(fileList[0], 'raw', files[0])
this.$set(fileList[0], 'name', files[0].name)
this.$refs['rebateUpload'].clearFiles()// 清除文件
this.$refs['rebateUpload'].handleStart(files[0])// 选择文件后的赋值方法
}
}
}
</script>
<template>
<div>
<h3>分割文件(設定頁碼)</h3>
<el-alert
title="請填寫CLAIMS的第一頁頁碼與ABSTRACT第一頁的頁碼,系統將自動分割為SPEC,CLAIMS,ABSTRACT共三份文件"
type="info"
/>
<br>
<el-form ref="searchForm" size="small" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="Word" prop="business">
<el-upload
ref="upload"
class="upload-demo"
drag
:limit="1"
:file-list="fileList"
:action="uploadURL"
:on-change="handelFileChange"
:on-remove="handleFileRemove"
:on-exceed="handleExceed"
:auto-upload="false"
accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
<el-form-item label="CLAIMS 頁碼" prop="isImgSetting">
<el-input v-model="form.claimsIndex" />
</el-form-item>
<el-form-item label="ABSTRACT 頁碼" prop="isImgSetting">
<el-input v-model="form.abstIndex" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" :offset="10">
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="submitUpload"
>
开始转换
</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import { splitDocxByRange } from '@api/graphApi'
export default {
name: 'SplitRangeWordForm',
props:{
baseUrl:{
type: String
}
},
data: function() {
return {
form: {
claimsIndex: 0,
abstIndex: 0
},
uploadURL: 'Word/SplitDocx',
fileList: []
}
},
methods: {
// 上传到服务器
async submitUpload() {
console.log(this.fileList)
if (this.fileList.length <= 0) {
this.$message.error('请先选择需要上传的文件!')
return false
}
const formData = new FormData()
this.fileList.forEach(e => {
formData.append('file', e.raw)
})
formData.append('claimsIndex', this.form.claimsIndex)
formData.append('abstIndex', this.form.abstIndex)
const response = await splitDocxByRange(this.baseUrl, formData)
if (response) {
this.fileList = []
this.$refs.upload.clearFiles()
const excelFileName = response.data
this.downloadFile(excelFileName)
} else {
this.$refs.upload.abort()
this.$message.error('下载档案失败!')
}
},
// 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
handelFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.fileList.length; i++) {
if (
file.name === this.fileList[i].name &&
file.size === this.fileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.fileList.push(file)
},
handelDetailFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.detailFileList.length; i++) {
if (
file.name === this.detailFileList[i].name &&
file.size === this.detailFileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.detailFileList.push(file)
},
// 文件列表移除文件时的钩子
handleFileRemove(file, fileList) {
this.fileList = fileList
},
handleDetailFileRemove(file, fileList) {
this.detailFileList = fileList
},
handleExceed(files, fileList) {
this.$set(fileList[0], 'raw', files[0])
this.$set(fileList[0], 'name', files[0].name)
this.$refs['rebateUpload'].clearFiles()// 清除文件
this.$refs['rebateUpload'].handleStart(files[0])// 选择文件后的赋值方法
}
}
}
</script>
<template>
<div>
<h3>分割文件</h3>
<el-alert
title="此功能將會自動識別文件,文件內須包含CLAIM與ABST的標題文字,將自動分割為SPEC、CLAIM、ABST文件"
type="info"
/>
<br>
<el-form ref="searchForm" size="small" label-width="160px">
<el-row>
<el-col :span="12">
<el-form-item label="Word" prop="business">
<el-upload
ref="upload"
class="upload-demo"
drag
:limit="1"
:file-list="fileList"
:action="uploadURL"
:on-change="handelFileChange"
:on-remove="handleFileRemove"
:on-exceed="handleExceed"
:auto-upload="false"
accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" :offset="10">
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="submitUpload"
>
开始转换
</el-button>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import { splitDocx } from '@api/graphApi'
export default {
name: 'SplitWordForm',
props:{
baseUrl:{
type: String
}
},
data: function() {
return {
uploadURL: 'Word/SplitDocx',
fileList: []
}
},
methods: {
// 上传到服务器
async submitUpload() {
console.log(this.fileList)
if (this.fileList.length <= 0) {
this.$message.error('请先选择需要上传的文件!')
return false
}
const formData = new FormData()
this.fileList.forEach(e => {
formData.append('file', e.raw)
})
const response = await splitDocx(this.baseUrl, formData)
if (response) {
this.fileList = []
this.$refs.upload.clearFiles()
const excelFileName = response.data
this.downloadFile(excelFileName)
} else {
this.$refs.upload.abort()
this.$message.error('下载档案失败!')
}
},
// 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
handelFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.fileList.length; i++) {
if (
file.name === this.fileList[i].name &&
file.size === this.fileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.fileList.push(file)
},
handelDetailFileChange(file, fileList) {
// 存在文件标识
let existsFileFlag = false
for (let i = 0; i < this.detailFileList.length; i++) {
if (
file.name === this.detailFileList[i].name &&
file.size === this.detailFileList[i].size
) {
// 如果存在了,赋值true
existsFileFlag = true
}
}
// 遍历的这个文件存在当前列表直接结束
if (existsFileFlag) {
// 否则不加入
fileList.pop()
// console.log(`文件已经存在:${file.name}`)
// this.handleMsg(`文件已经选择过了:${file.name})`);
this.$message({
showClose: true,
message: `文件已经选择过了:${file.name})`,
type: 'error'
})
return
}
this.detailFileList.push(file)
},
// 文件列表移除文件时的钩子
handleFileRemove(file, fileList) {
this.fileList = fileList
},
handleDetailFileRemove(file, fileList) {
this.detailFileList = fileList
},
handleExceed(files, fileList) {
this.$set(fileList[0], 'raw', files[0])
this.$set(fileList[0], 'name', files[0].name)
this.$refs['rebateUpload'].clearFiles()// 清除文件
this.$refs['rebateUpload'].handleStart(files[0])// 选择文件后的赋值方法
}
}
}
</script>
<template>
<el-card>
<el-tabs type="border-card">
<el-tab-pane label="分割文件(識別標題)">
<SplitWordForm :baseUrl="baseUrl" />
</el-tab-pane>
<el-tab-pane label="分割文件(根據頁碼)">
<SplitRangeWordForm :baseUrl="baseUrl" />
</el-tab-pane>
<el-tab-pane label="分割文件(根據分頁符號)">
<SplitPageBreakWordForm :baseUrl="baseUrl" />
</el-tab-pane>
<el-tab-pane label="分割文件(根據書籤)">
<SplitBookMarkWordForm :baseUrl="baseUrl" />
</el-tab-pane>
</el-tabs>
</el-card>
</template>
<script>
import SplitWordForm from './components/SplitWordForm'
import SplitRangeWordForm from './components/SplitRangeWordForm'
import SplitPageBreakWordForm from './components/SplitPageBreakWordForm.vue'
import SplitBookMarkWordForm from './components/SplitBookMarkWordForm.vue'
import config from '@config/index.js'
export default {
name: 'SplitTool',
props:{
env:{
type: String,
default: 'prod_sz'
}
},
computed:{
baseUrl(){
console.log('config', config, this.env)
return config[this.env].VUE_APP_GRAPHAPI_URL
}
},
components: { SplitWordForm, SplitRangeWordForm, SplitPageBreakWordForm, SplitBookMarkWordForm }
}
</script>
import graphRequest from '@utils/GraphApiService'
import Vue from 'vue'
Vue.mixin({
methods: {
async downloadFile(excelFileName) {
try {
const formData = new FormData()
formData.append('fileName', excelFileName)
const response = await graphRequest.post('Word/DownloadFile', formData, { responseType: 'blob' })
if (response) {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
downloadElement.download = excelFileName.split('\\').pop().split('/').pop()
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement)
window.URL.revokeObjectURL(href)
}
} catch (error) {
console.log('error', error)
this.$refs.upload.abort()
this.$message.error('下载档案失败!')
}
}
}
})
import axios from 'axios'
import { Message } from 'element-ui'
// create an axios instance
const GraphApiService = axios.create({
baseURL: 'https://pvapi.purplevineip.com/graphAPI/api/v1.0',
// withCredentials: true, // send cookies when cross-domain requests
timeout: 300000, // request timeout
headers: {
'Content-Type': 'application/json'
}
})
// 請求攔截
GraphApiService.interceptors.request.use(
confing => {
return confing
},
error => {
console.log(error) // for debug
return Promise.reject(error)
}
)
// 響應攔截
GraphApiService.interceptors.response.use(
response => {
const res = response.data
if (
res.type &&
(res.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
res.type === 'application/zip')
) {
return res
}
if (res.status !== 200) {
// if the custom code is not 200, it is judged as an error.
Message({
message: res.message || 'Error',
type: 'error',
duration: 5 * 1000
})
return Promise.reject(new Error(res.message || 'Error'))
} else {
return res
}
},
error => {
console.log('err' + error) // for debug
Message({
message: error.message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
)
export default GraphApiService
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
pages:{
index:{
entry: 'example/main.js',
template: 'public/index.html',
filename: 'index.html'
}
},
chainWebpack: config => {
config.module
.rule('js')
.include
.add('/packages')
.end()
.use('babel')
.loader('babel-loader')
.tap(options => {
return options
})
}
})
const devConfig = require('./config/config.dev');
const buildConfig = require('./config/config.build');
module.exports = process.env.NODE_ENV === 'production' ? buildConfig : devConfig;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment