Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !10633

Customizer: Include config.json in bootstrap.zip

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/stuartpb/patch-2 into master 11 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: stuartpb

Part of my suggested solution for #9951 (closed)

Compare
  • master (base)

and
  • latest version
    2abac4a8
    1 commit, 2 years ago

1 file
+ 9
- 3

    Preferences

    File browser
    Compare changes
assets/js/customizer.js
+ 9
- 3
  • View file @ 2abac4a8


@@ -107,7 +107,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
})
}
function generateZip(css, js, fonts, complete) {
function generateZip(css, js, fonts, config, complete) {
if (!css && !js) return showError('<strong>Ruh roh!</strong> No Bootstrap files selected.', new Error('no Bootstrap'))
var zip = new JSZip()
@@ -132,6 +132,10 @@ window.onload = function () { // wait for load in a dumb way because B-0
fontsFolder.file(fileName, fonts[fileName])
}
}
if (config) {
zip.file('config.json', config)
}
var content = zip.generate({type:"blob"})
@@ -262,14 +266,16 @@ window.onload = function () { // wait for load in a dumb way because B-0
var $downloadBtn = $('#btn-download')
$compileBtn.on('click', function (e) {
var config = getCustomizerData()
e.preventDefault()
$compileBtn.attr('disabled', 'disabled')
generateZip(generateCSS(), generateJavascript(), generateFonts(), function (blob) {
generateZip(generateCSS(), generateJavascript(), generateFonts(), config, function (blob) {
$compileBtn.removeAttr('disabled')
saveAs(blob, "bootstrap.zip")
createGist(getCustomizerData())
createGist(config)
})
})
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
js
1
js
    Assign labels
  • Manage project labels

Milestone
v3.0.1
v3.0.1
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: twbs/bootstrap!10633
Source branch: github/fork/stuartpb/patch-2

Menu

Explore Projects Groups Snippets