mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
More config tweaks.
This commit is contained in:
parent
1ecb74e007
commit
cab6f7d16c
@ -3,8 +3,8 @@
|
||||
[
|
||||
"es2015",
|
||||
{
|
||||
"modules": false,
|
||||
"loose": true
|
||||
"loose": true,
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
11
Gruntfile.js
11
Gruntfile.js
@ -16,17 +16,8 @@ module.exports = function (grunt) {
|
||||
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
}
|
||||
|
||||
var path = require('path')
|
||||
var isTravis = require('is-travis')
|
||||
|
||||
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' })
|
||||
|
||||
Object.keys(configBridge.paths).forEach(function (key) {
|
||||
configBridge.paths[key].forEach(function (val, i, arr) {
|
||||
arr[i] = path.join('./docs', val)
|
||||
})
|
||||
})
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
|
||||
@ -75,7 +66,7 @@ module.exports = function (grunt) {
|
||||
},
|
||||
dist: {
|
||||
options: {
|
||||
extends: '../../js/.babelrc'
|
||||
extends: '../../.babelrc'
|
||||
},
|
||||
files: {
|
||||
'<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>'
|
||||
|
@ -5,7 +5,7 @@
|
||||
"class-style": "dash",
|
||||
"doctype-first": true,
|
||||
"doctype-html5": true,
|
||||
"fig-req-figcaption": true,
|
||||
"fig-req-figcaption": false,
|
||||
"html-valid-content-model": false,
|
||||
"id-class-ignore-regex": "(onclick|content|[a-z]+([A-Z][a-z])+)",
|
||||
"id-class-style": "dash",
|
||||
|
@ -25,9 +25,10 @@
|
||||
{% if site.github %}
|
||||
<script src="{{ site.baseurl }}/assets/js/docs.min.js"></script>
|
||||
{% else %}
|
||||
{% for file in site.data.configBridge.paths.docsJs %}
|
||||
<script src="{{ site.baseurl }}/{{ file }}"></script>
|
||||
{% endfor %}
|
||||
<script src="{{ site.baseurl }}/assets/js/vendor/anchor.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/assets/js/vendor/clipboard.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/assets/js/vendor/holder.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
|
||||
{% endif %}
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
|
@ -1,10 +0,0 @@
|
||||
require 'yaml'
|
||||
|
||||
module Bridge
|
||||
class Generator < Jekyll::Generator
|
||||
def generate(site)
|
||||
path = File.join(site.source, "../grunt/configBridge.json")
|
||||
site.data["configBridge"] = YAML.load_file(path)
|
||||
end
|
||||
end
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"paths": {
|
||||
"docsJs": [
|
||||
"assets/js/vendor/anchor.min.js",
|
||||
"assets/js/vendor/clipboard.min.js",
|
||||
"assets/js/vendor/holder.min.js",
|
||||
"assets/js/src/application.js"
|
||||
]
|
||||
}
|
||||
}
|
@ -6,8 +6,7 @@ if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ]; then exit 0; fi
|
||||
# Add build metadata to version
|
||||
sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml
|
||||
# Fix URLs since the site's root is now a subdirectory
|
||||
echo "baseurl: /c/${TRAVIS_COMMIT}" >> _config.yml
|
||||
bundle exec jekyll build --destination "$TRAVIS_COMMIT"
|
||||
bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}"
|
||||
|
||||
# Install gcloud & gsutil
|
||||
GSUTIL_VERSION=$(gsutil version | cut -d ' ' -f 3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user