Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
c6feabe9
Commit
c6feabe9
authored
Nov 05, 2016
by
FuryBean
Committed by
GitHub
Nov 05, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #850 from QingWei-Li/feat/improve-build-demo
Improves build demo speed
parents
825fccde
12195aab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
build/cooking.demo.js
build/cooking.demo.js
+9
-6
No files found.
build/cooking.demo.js
View file @
c6feabe9
...
@@ -3,6 +3,7 @@ var config = require('./config');
...
@@ -3,6 +3,7 @@ var config = require('./config');
var
md
=
require
(
'
markdown-it
'
)();
var
md
=
require
(
'
markdown-it
'
)();
var
striptags
=
require
(
'
./strip-tags
'
);
var
striptags
=
require
(
'
./strip-tags
'
);
var
slugify
=
require
(
'
transliteration
'
).
slugify
;
var
slugify
=
require
(
'
transliteration
'
).
slugify
;
var
isProd
=
process
.
env
.
NODE_ENV
===
'
production
'
;
function
convert
(
str
)
{
function
convert
(
str
)
{
str
=
str
.
replace
(
/
(
&#x
)(\w{4})
;/gi
,
function
(
$0
)
{
str
=
str
.
replace
(
/
(
&#x
)(\w{4})
;/gi
,
function
(
$0
)
{
...
@@ -12,7 +13,10 @@ function convert(str) {
...
@@ -12,7 +13,10 @@ function convert(str) {
}
}
cooking
.
set
({
cooking
.
set
({
entry
:
'
./examples/entry.js
'
,
entry
:
isProd
?
{
docs
:
'
./examples/entry.js
'
,
'
element-ui
'
:
'
./src/index.js
'
}
:
'
./examples/entry.js
'
,
dist
:
'
./examples/element-ui/
'
,
dist
:
'
./examples/element-ui/
'
,
template
:
'
./examples/index.tpl
'
,
template
:
'
./examples/index.tpl
'
,
publicPath
:
process
.
env
.
CI_ENV
||
'
/
'
,
publicPath
:
process
.
env
.
CI_ENV
||
'
/
'
,
...
@@ -23,9 +27,10 @@ cooking.set({
...
@@ -23,9 +27,10 @@ cooking.set({
publicPath
:
'
/
'
publicPath
:
'
/
'
},
},
minimize
:
true
,
minimize
:
true
,
chunk
:
true
,
chunk
:
isProd
?
{
'
common
'
:
{
name
:
[
'
element-ui
'
,
'
manifest
'
]
}
}
:
false
,
extractCSS
:
true
,
extractCSS
:
true
,
sourceMap
:
true
,
alias
:
config
.
alias
,
alias
:
config
.
alias
,
extends
:
[
'
vue2
'
,
'
lint
'
],
extends
:
[
'
vue2
'
,
'
lint
'
],
postcss
:
config
.
postcss
postcss
:
config
.
postcss
...
@@ -84,12 +89,10 @@ var wrap = function(render) {
...
@@ -84,12 +89,10 @@ var wrap = function(render) {
};
};
};
};
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
isProd
)
{
cooking
.
add
(
'
externals.vue
'
,
'
Vue
'
);
cooking
.
add
(
'
externals.vue
'
,
'
Vue
'
);
cooking
.
add
(
'
externals.vue-router
'
,
'
VueRouter
'
);
cooking
.
add
(
'
externals.vue-router
'
,
'
VueRouter
'
);
}
}
cooking
.
add
(
'
vue.preserveWhitespace
'
,
false
);
cooking
.
add
(
'
vue.preserveWhitespace
'
,
false
);
cooking
.
add
(
'
output.chunkFilename
'
,
'
element.[id].[chunkhash:7].js
'
);
cooking
.
add
(
'
output.filename
'
,
'
element.[name].[hash:7].js
'
);
module
.
exports
=
cooking
.
resolve
();
module
.
exports
=
cooking
.
resolve
();
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