Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-system
Commits
fb29acbe
Commit
fb29acbe
authored
Jul 19, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改主入口以及打包命令
parent
1ce6ca9e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
137 deletions
+13
-137
package.json
package.json
+5
-6
develop.html
src/dev-local/develop.html
+0
-28
develop.js
src/dev-local/develop.js
+0
-44
main.js
src/main.js
+8
-35
vue.config.js
vue.config.js
+0
-24
No files found.
package.json
View file @
fb29acbe
...
...
@@ -5,18 +5,17 @@
"author"
:
"kuangshu <252019869@qq.com>"
,
"private"
:
true
,
"scripts"
:
{
"dev"
:
"vue-cli-service serve --port 8891"
,
"dev:local"
:
"vue-cli-service serve ./src/dev-local/develop.js --port 8899"
,
"start"
:
"npm run dev:local"
,
"dev"
:
"vue-cli-service serve --port 8899"
,
"start"
:
"npm run dev"
,
"lint"
:
"eslint --ext .js,.vue src"
,
"build"
:
"vue-cli-service build --modern"
,
"build:dev"
:
"cross-env npm run buildapp:dev
&& npm run buildlib:dev
"
,
"build:dev"
:
"cross-env npm run buildapp:dev"
,
"buildapp:dev"
:
"vue-cli-service build --modern --mode dev"
,
"buildlib:dev"
:
"vue-cli-service build --target lib --name manageShell ./src/lib/main.js --modern --mode dev"
,
"build:test"
:
"cross-env npm run buildapp:test
&& npm run buildlib:test
"
,
"build:test"
:
"cross-env npm run buildapp:test"
,
"buildapp:test"
:
"vue-cli-service build --modern --mode test"
,
"buildlib:test"
:
"vue-cli-service build --target lib --name manageShell ./src/lib/main.js --modern --mode test"
,
"build:master"
:
"cross-env npm run buildapp:master
&& npm run buildlib:master
"
,
"build:master"
:
"cross-env npm run buildapp:master"
,
"buildapp:master"
:
"vue-cli-service build --modern --mode master"
,
"buildlib:master"
:
"vue-cli-service build --target lib --name manageShell ./src/lib/main.js --modern --mode master"
,
"build:prod"
:
"vue-cli-service build --modern"
,
...
...
src/dev-local/develop.html
deleted
100644 → 0
View file @
1ce6ca9e
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>ic_logo.ico"
/>
<script
src=
"<%= BASE_URL %>system.js"
></script>
<script
src=
"https://unpkg.com/vue@2.6.10/dist/vue.js"
></script>
<script
src=
"https://unpkg.com/vuex@3.1.0/dist/vuex.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"
></script>
<title>
多彩综合管理系统
</title>
</head>
<body>
<noscript>
<strong>
We're sorry but hello-world doesn't work properly without JavaScript
enabled. Please enable it to continue.
</strong>
</noscript>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
</body>
<script
src=
"https://webapi.amap.com/maps?v=1.4.12&key=dd6103c90f2f17310a8711f2d330a0a6"
></script>
<script
src=
"https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"
></script>
<script
src=
"https://unpkg.com/@antv/data-set"
></script>
</html>
src/dev-local/develop.js
deleted
100644 → 0
View file @
1ce6ca9e
import
{
createSystem
}
from
'../lib/main'
;
import
asyncRouterMap
from
'../router/asyncRoutes'
;
import
utils
from
'../lib/utils'
;
let
constantRouter
=
[
{
path
:
'/asd'
,
name
:
'asd'
,
component
:
{
template
:
'<div>asdasdasd</div>'
,
},
},
];
const
routeFilter
=
(
routes
,
allRoute
)
=>
{
if
(
allRoute
&&
allRoute
.
length
)
{
let
addRoute
=
utils
.
route
.
formatRouteLink
(
allRoute
);
for
(
let
index
=
0
;
index
<
addRoute
.
length
;
index
++
)
{
const
element
=
addRoute
[
index
];
if
(
element
.
children
)
{
routes
=
routes
.
concat
(
element
.
children
);
}
else
if
(
element
.
menuCode
===
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
)
{
routes
.
unshift
(
element
);
}
}
}
return
{
allRoute
,
routes
,
};
};
createSystem
({
basePath
:
process
.
env
.
VUE_APP_BASE_URL
,
routers
:
asyncRouterMap
,
constantRouter
:
constantRouter
,
whiteList
:
'/asd'
,
routeFilter
:
routeFilter
,
});
// const script = document.createElement('script');
// script.text = `
// `;
// document.body.appendChild(script);
src/main.js
View file @
fb29acbe
import
CreatSystem
from
'./lib/main'
;
import
{
createSystem
}
from
'./lib/main'
;
import
asyncRouterMap
from
'./router/asyncRoutes'
;
window
.
manageShell
=
{
default
:
CreatSystem
};
window
.
allAasyncRouterMap
=
[...
asyncRouterMap
];
import
utils
from
'./lib/utils'
;
const
routeFilter
=
(
routes
,
allRoute
)
=>
{
if
(
allRoute
&&
allRoute
.
length
)
{
let
addRoute
=
System
.
utils
.
route
.
formatRouteLink
(
allRoute
);
let
addRoute
=
utils
.
route
.
formatRouteLink
(
allRoute
);
for
(
let
index
=
0
;
index
<
addRoute
.
length
;
index
++
)
{
const
element
=
addRoute
[
index
];
if
(
element
.
children
)
{
...
...
@@ -23,33 +21,8 @@ const routeFilter = (routes, allRoute) => {
routes
,
};
};
const
script
=
document
.
createElement
(
'script'
);
script
.
text
=
`
manageShell.default.createSystem({
basePath: '
${
process
.
env
.
VUE_APP_BASE_URL
}
',
routers: allAasyncRouterMap,
routeFilter: function(routes, allRoute) {
if (allRoute && allRoute.length) {
let addRoute = manageShell.default.utils.route.formatRouteLink(
allRoute
);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode ===
${
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
}
) {
routes.unshift(element);
}
}
}
return {
allRoute,
routes,
};
},
});
`
;
document
.
body
.
appendChild
(
script
);
createSystem
({
basePath
:
process
.
env
.
VUE_APP_BASE_URL
,
routers
:
asyncRouterMap
,
routeFilter
:
routeFilter
,
});
vue.config.js
View file @
fb29acbe
const
Path
=
require
(
'path'
);
let
isLib
=
(()
=>
{
let
index
=
process
.
argv
.
findIndex
(
value
=>
value
===
'--target'
);
if
(
index
>
-
1
)
{
return
process
.
argv
[
index
+
1
]
&&
process
.
argv
[
index
+
1
]
===
'lib'
;
}
else
{
return
false
;
}
})();
let
isLocal
=
(()
=>
{
return
/develop/
.
test
(
process
.
argv
[
3
]);
})();
module
.
exports
=
{
publicPath
:
process
.
env
.
VUE_APP_BASE_URL
,
outputDir
:
isLib
?
Path
.
join
(
'dist'
,
'lib'
)
:
'dist'
,
configureWebpack
:
{
externals
:
[
{
...
...
@@ -25,14 +11,4 @@ module.exports = {
},
],
},
chainWebpack
:
config
=>
{
if
(
!
isLib
&&
isLocal
)
{
config
.
plugin
(
'html'
).
tap
(
args
=>
{
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
args
[
0
].
template
=
Path
.
join
(
'src'
,
'dev-local'
,
'develop.html'
);
}
return
args
;
});
}
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment