Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
d1575b6b
Unverified
Commit
d1575b6b
authored
4 years ago
by
Johann-S
Committed by
GitHub
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
ensure build plugins can exit in error (#30744)
Co-authored-by:
XhmikosR
<
xhmikosr@gmail.com
>
parent
f9178854
1 merge request
!31948
Examples/Floating-labels: fix bad behavior with autofill
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/build-plugins.js
+25
-17
build/build-plugins.js
with
25 additions
and
17 deletions
+25
-17
build/build-plugins.js
+
25
-
17
View file @
d1575b6b
...
...
@@ -56,7 +56,7 @@ const defaultPluginConfig = {
}
}
function
getConfigByPluginKey
(
pluginKey
)
{
const
getConfigByPluginKey
=
pluginKey
=>
{
if
(
pluginKey
===
'
Data
'
||
pluginKey
===
'
Manipulator
'
||
...
...
@@ -143,7 +143,7 @@ const domObjects = [
'
SelectorEngine
'
]
function
build
(
plugin
)
{
const
build
=
async
plugin
=>
{
console
.
log
(
`Building
${
plugin
}
plugin...`
)
const
{
external
,
globals
}
=
getConfigByPluginKey
(
plugin
)
...
...
@@ -158,24 +158,32 @@ function build(plugin) {
pluginPath
=
`
${
rootPath
}
/dom/`
}
rollup
.
rollup
({
const
bundle
=
await
rollup
.
rollup
({
input
:
bsPlugins
[
plugin
],
plugins
,
external
}).
then
(
bundle
=>
{
bundle
.
write
({
banner
:
banner
(
pluginFilename
),
format
:
'
umd
'
,
name
:
plugin
,
sourcemap
:
true
,
globals
,
file
:
path
.
resolve
(
__dirname
,
`
${
pluginPath
}
/
${
pluginFilename
}
`
)
})
.
then
(()
=>
console
.
log
(
`Building
${
plugin
}
plugin... Done!`
))
.
catch
(
error
=>
console
.
error
(
`
${
plugin
}
:
${
error
}
`
))
})
.
catch
(
error
=>
console
.
error
(
`
${
plugin
}
:
${
error
}
`
))
await
bundle
.
write
({
banner
:
banner
(
pluginFilename
),
format
:
'
umd
'
,
name
:
plugin
,
sourcemap
:
true
,
globals
,
file
:
path
.
resolve
(
__dirname
,
`
${
pluginPath
}
/
${
pluginFilename
}
`
)
})
console
.
log
(
`Building
${
plugin
}
plugin... Done!`
)
}
const
main
=
async
()
=>
{
try
{
await
Promise
.
all
(
Object
.
keys
(
bsPlugins
).
map
(
plugin
=>
build
(
plugin
)))
}
catch
(
error
)
{
console
.
error
(
error
)
process
.
exit
(
1
)
}
}
Object
.
keys
(
bsPlugins
)
.
forEach
(
plugin
=>
build
(
plugin
))
main
()
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets