mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 08:34:08 +02:00
Reorganize docs for easier deploys
With the current docs directory setup, I'm making too many mistakes and have to manually address path changes and directory moves on deploy. This makes for a frustrating experience developing locally and shipping releases. With this PR, we're basically back to the same setup from v3—duplicating the dist directory into our docs directory. Not the most ideal, but very straightforward for me as the release manager.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<!-- jQuery -->
|
||||
<script>
|
||||
(function () {
|
||||
var path = '../../assets/js/vendor/jquery-slim.min.js'
|
||||
var path = '../../site/docs/4.1/assets/js/vendor/jquery-slim.min.js'
|
||||
// get jquery param from the query string.
|
||||
var jQueryVersion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
document.write('<script src="' + path + '"><\/script>')
|
||||
}())
|
||||
</script>
|
||||
<script src="../../assets/js/vendor/popper.min.js"></script>
|
||||
<script src="../../site/docs/4.1/assets/js/vendor/popper.min.js"></script>
|
||||
|
||||
<!-- QUnit -->
|
||||
<link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css" media="screen">
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/* eslint no-process-env: 0 */
|
||||
|
||||
module.exports = (config) => {
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'assets/js/vendor/jquery-slim.min.js'
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'site/docs/4.1/assets/js/vendor/jquery-slim.min.js'
|
||||
|
||||
config.set({
|
||||
basePath: '../..',
|
||||
@@ -17,7 +17,7 @@ module.exports = (config) => {
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
jqueryFile,
|
||||
'assets/js/vendor/popper.min.js',
|
||||
'site/docs/4.1/assets/js/vendor/popper.min.js',
|
||||
'dist/js/bootstrap.js',
|
||||
'js/tests/unit/*.js'
|
||||
],
|
||||
|
@@ -4,7 +4,7 @@ const path = require('path')
|
||||
const jsCoveragePath = path.resolve(__dirname, '../coverage')
|
||||
|
||||
module.exports = (config) => {
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'assets/js/vendor/jquery-slim.min.js'
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'site/docs/4.1/assets/js/vendor/jquery-slim.min.js'
|
||||
|
||||
config.set({
|
||||
basePath: '../..',
|
||||
@@ -20,7 +20,7 @@ module.exports = (config) => {
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
jqueryFile,
|
||||
'assets/js/vendor/popper.min.js',
|
||||
'site/docs/4.1/assets/js/vendor/popper.min.js',
|
||||
'js/coverage/dist/util.js',
|
||||
'js/coverage/dist/tooltip.js',
|
||||
'js/coverage/dist/!(util|index|tooltip).js', // include all of our js/dist files except util.js, index.js and tooltip.js
|
||||
|
Reference in New Issue
Block a user