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
c3fe53cd
Commit
c3fe53cd
authored
7 years ago
by
Johann-S
Browse files
Options
Download
Email Patches
Plain Diff
Use rollup to add our copyright instead of a custom script
parent
9936bf59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/rollup.config.js
+9
-1
build/rollup.config.js
build/stamp.js
+0
-19
build/stamp.js
package.json
+0
-1
package.json
with
9 additions
and
21 deletions
+9
-21
build/rollup.config.js
+
9
-
1
View file @
c3fe53cd
const
path
=
require
(
'
path
'
)
const
babel
=
require
(
'
rollup-plugin-babel
'
)
const
resolve
=
require
(
'
rollup-plugin-node-resolve
'
)
const
pkg
=
require
(
path
.
resolve
(
__dirname
,
'
../package.json
'
))
const
BUNDLE
=
process
.
env
.
BUNDLE
===
'
true
'
const
year
=
new
Date
().
getFullYear
()
var
fileDest
=
'
bootstrap.js
'
var
external
=
[
'
jquery
'
,
'
popper.js
'
]
...
...
@@ -39,5 +41,11 @@ module.exports = {
name
:
'
bootstrap
'
,
external
:
external
,
globals
:
globals
,
plugins
:
plugins
plugins
:
plugins
,
banner
:
`/*!
* Bootstrap v
${
pkg
.
version
}
(
${
pkg
.
homepage
}
)
* Copyright 2011-
${
year
}
${
pkg
.
author
}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
`
}
This diff is collapsed.
Click to expand it.
build/stamp.js
deleted
100644 → 0
+
0
-
19
View file @
9936bf59
const
fs
=
require
(
'
fs
'
)
const
path
=
require
(
'
path
'
)
const
pkg
=
require
(
path
.
resolve
(
__dirname
,
'
../package.json
'
))
const
year
=
new
Date
().
getFullYear
()
const
pathBoostrap
=
path
.
resolve
(
__dirname
,
'
../dist/js/bootstrap.js
'
)
const
pathBootstrapBundle
=
path
.
resolve
(
__dirname
,
'
../dist/js/bootstrap.bundle.js
'
)
const
contentFile
=
fs
.
readFileSync
(
pathBoostrap
,
{
encoding
:
'
UTF8
'
})
const
contentBundleFile
=
fs
.
readFileSync
(
pathBootstrapBundle
,
{
encoding
:
'
UTF8
'
})
const
stamp
=
`/*!
* Bootstrap v
${
pkg
.
version
}
(
${
pkg
.
homepage
}
)
* Copyright 2011-
${
year
}
${
pkg
.
author
}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
`
fs
.
writeFileSync
(
pathBoostrap
,
`
${
stamp
}${
contentFile
}
`
,
{
encoding
:
'
UTF8
'
})
fs
.
writeFileSync
(
pathBootstrapBundle
,
`
${
stamp
}${
contentBundleFile
}
`
,
{
encoding
:
'
UTF8
'
})
This diff is collapsed.
Click to expand it.
package.json
+
0
-
1
View file @
c3fe53cd
...
...
@@ -36,7 +36,6 @@
"js-compile-standalone"
:
"rollup --environment BUNDLE:false --config build/rollup.config.js"
,
"js-compile-bundle"
:
"rollup --environment BUNDLE:true --config build/rollup.config.js"
,
"js-compile-plugins"
:
"babel --no-babelrc js/src/ --out-dir js/dist/ --source-maps --presets=es2015 --plugins=transform-es2015-modules-strip"
,
"postjs-compile"
:
"node build/stamp.js"
,
"js-minify"
:
"npm-run-all --parallel js-minify-*"
,
"js-minify-standalone"
:
"uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.min.js dist/js/bootstrap.js"
,
"js-minify-bundle"
:
"uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js"
,
...
...
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