1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Make use of the package.json version_short property more.

This commit is contained in:
XhmikosR 2018-12-13 13:14:49 +02:00
parent c031584bcd
commit a074cb66d7
4 changed files with 10 additions and 7 deletions

2
.gitignore vendored
View file

@ -1,7 +1,7 @@
# Ignore docs files
_gh_pages
_site
site/docs/4.1/dist/
site/docs/**/dist/
# Ignore ruby files
.ruby-version

View file

@ -1,8 +1,7 @@
'use strict'
const path = require('path')
const pkg = require(path.resolve(__dirname, '../package.json'))
const year = new Date().getFullYear()
const pkg = require('../package.json')
const year = new Date().getFullYear()
function getBanner(pluginFilename) {
return `/*!

View file

@ -17,6 +17,8 @@ const fs = require('fs')
const path = require('path')
const sh = require('shelljs')
const pkg = require('../package.json')
sh.config.fatal = true
const configFile = path.join(__dirname, '../_config.yml')
@ -34,7 +36,7 @@ const files = [
configPropertyName: 'js_hash'
},
{
file: 'site/docs/4.1/assets/js/vendor/jquery-slim.min.js',
file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`,
configPropertyName: 'jquery_hash'
},
{

View file

@ -1,6 +1,8 @@
/* eslint-env node */
/* eslint no-process-env: 0 */
const ip = require('ip')
const pkg = require('../../package.json')
const {
browsers,
browsersKeys
@ -8,7 +10,7 @@ const {
const path = require('path')
const jsCoveragePath = path.resolve(__dirname, '../coverage')
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'
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : `site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`
const bundle = process.env.BUNDLE === 'true'
const browserStack = process.env.BROWSER === 'true'
@ -92,7 +94,7 @@ if (bundle) {
conf.browsers = browsersKeys
reporters.push('BrowserStack')
files = files.concat([
'site/docs/4.1/assets/js/vendor/jquery-slim.min.js',
`site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`,
'js/dist/util.js',
'js/dist/tooltip.js',
'js/dist/!(util|index|tooltip).js' // include all of our js/dist files except util.js, index.js and tooltip.js