Commit b4ac48fd authored by Bardi Harborow's avatar Bardi Harborow
Browse files

Build system overhaul.

parent 9af6bf8f
main cleanup-floating-forms cssvar-function dependabot/npm_and_yarn/stylelint-and-stylelint-config-twbs-bootstrap-15.3.0 extend-snippets feat/data-target floating-always-visible floating-labels-icons fod-main-banner form-controls-with-icons github/fork/719media/patch-13 github/fork/719media/patch-14 github/fork/719media/patch-9 github/fork/ChellyAhmed/fix-typo-reboot.md github/fork/ChellyAhmed/offcanvas-scroll-back github/fork/CtrlAltLilith/main github/fork/Elysiome/offcanvas-optional-window-resizing github/fork/JanSargsyan/main github/fork/LunicLynx/support-different-line-height-for-buttons github/fork/Psixodelik/main github/fork/Ronid1/ronid1/offcanvas_static_backdrop github/fork/RyanBerliner/tooltip-accessibility github/fork/SantiagoPVazquez/Feature-default-border-bottom-to-dropdown-item github/fork/Sir-Genius/utils github/fork/Sumit-Singh-8/main github/fork/Viktor-VERA2020/offcanvas-slide github/fork/Zivangu9/input-group-for-form-control-plaintext github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation github/fork/astagi/fix/tree-shake-modules github/fork/compnerd/dark-accordion-icon github/fork/derSascha/dropdown-dont-close-on-input-click github/fork/dev-ph1l/main github/fork/donquixote/issue-33861-utl-mixin github/fork/florianlacreuse/mixin-make-row-gutter-y github/fork/gregorw/main github/fork/iteggmbh/transitionend-dispose-race github/fork/jdelStrother/patch-1 github/fork/jonnysp/form-floating github/fork/jonnysp/independent-offcanvas github/fork/jonnysp/theme-dark-on-card-and-modal-fix github/fork/josefdlange/floating-label-placeholder-opacity github/fork/julien-deramond/enhance-change-version.js github/fork/julien-deramond/main-jd-fix-offset-content github/fork/julien-deramond/main-jd-issue-with-utitlies github/fork/julien-deramond/main-xmr-pa11y-ci-jd-add-hideElements github/fork/kyletsang/fix-tooltip-padding github/fork/lacutah/CheckboxCenteringDocumentation github/fork/lekoala/patch-3 github/fork/louismaximepiton/main-kld-lmp-collapse-proposal github/fork/louismaximepiton/main-lmp-card-inner-border-radius-fix github/fork/louismaximepiton/main-lmp-carousel-multiple-images github/fork/louismaximepiton/main-lmp-css-var-init github/fork/louismaximepiton/main-lmp-disabled-floating-label-fix github/fork/louismaximepiton/main-lmp-input-range-fix github/fork/louismaximepiton/main-lmp-shift-color github/fork/louismaximepiton/main-lmp-table-active-tr-fix github/fork/maciek-szn/switch github/fork/michael-roth/feature/19964-multiple-tab-targets github/fork/mistic100/dom-utils github/fork/nkdas91/accordion github/fork/nstungcom/fix-missing-modal-open-class github/fork/oraliahdz/animation-utilities github/fork/pine3ree/patch-7 github/fork/pouwerkerk/unindent-scss-docs-shortcode github/fork/smares/smares-no-scolling-on-modal-close github/fork/tgm-git/patch-1 gs-forms gs-toasts-with-animated-progress-bar gs/add-history-helper gs/change-version-dir-on-docs gs/data-must-set-onlu-one-instance gs/docs/fix-drop-down-error gs/event-handler-2 gs/make-docs-js-build gs/make-simple-attribute-toggler gs/popover-fix-doc gs/provide-steConfig-method gs/scrollspy-smoothscroll-option-use-browser-history gs/streamline-jqueryInterface gs/support-drop-down-in-navbar gs/test-js-generic-trigger gs/try-web-components gs/tweak-collapse-js-selector gs/use-event-handler-in-cocmponent gs/use-rollup-replace-for-version jo-docs-thanks-page jo-ssr-friendly logical-props-spacing-utils main-fod-disabled-form-check-label main-fod-nested-accordion main-fod-simpler-table-structure main-fod-table-separator main-fod-utilities-contrast main-jd-abbr-title main-jd-add-chips main-jd-add-doc-for-sass-custom-colors main-jd-add-enable-host-to-handle-web-components main-jd-browserstack-fine-tune main-jd-browserstack-updates main-jd-docs-consistent-usage-of-css-sections-step-2 main-jd-fix-docs-headers-in-white main-jd-fix-highlight-docs-border-radius main-jd-fix-placeholder-color-background-params-for-img-markup main-jd-glossary-experiment main-jd-postcss-drop-empty-css-vars main-jd-proto-doc-astro main-jd-skip-navigation-component main-jd-stackblitz-for-examples main-jd-upgrade-browserlistrc main-jd-use-host main-lmp-dark-theme-customization main-lmp-handle-scroll-target main-lmp-tab-fix main-mc-opensearch main-xmr-bundlewatch-action main-xmr-eslint-plugin-compat main-xmr-hugo-docs-vendor main-xmr-hugo-rm-ver main-xmr-linkinator-prod main-xmr-min-mangle main-xmr-pa11y-ci more-darkmode-examples nested-dropdowns patrickhlauke-issue37428 patrickhlauke-use-of-color-tweaks pr/34102 pr/37590 previous-next-docs-links sticky-thead utilities-functions-mixin v4-dev v4-dev-dropdown-hide-method v530-dev v6-postcss-custom-media v6-spinner-dots v6/gs/use-floating-ui-in-place-of-popper xmr/dev xmr/docs-png xmr/docs-svgs xmr/hugo-reorg-files xmr/js-2 xmr/markdownlint xmr/prepare-530-alpha2 xmr/xo v5.3.0-alpha1 v5.2.3 v5.2.2 v5.2.1 v5.2.0 v5.2.0-beta1 v5.1.3 v5.1.2 v5.1.1 v5.1.0 v5.0.2 v5.0.1 v5.0.0 v5.0.0-beta3 v5.0.0-beta2 v5.0.0-beta1 v5.0.0-alpha3 v5.0.0-alpha2 v5.0.0-alpha1 v4.6.2 v4.6.1 v4.6.0 v4.5.3 v4.5.2 v4.5.1 v4.5.0 v4.4.1 v4.4.0 v4.3.1 v4.3.0 v4.2.1 v4.2.0 v4.1.3 v4.1.2 v4.1.1 v4.1.0 v4.0.0 v4.0.0-beta.3 v4.0.0-beta.2 v4.0.0-beta
7 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!22598test,!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!17021v4
Showing with 1320 additions and 1669 deletions
+1320 -1669
...@@ -9,30 +9,27 @@ node_js: ...@@ -9,30 +9,27 @@ node_js:
before_install: before_install:
- if [[ `npm -v` != 4* ]]; then npm install -g npm@4; fi - if [[ `npm -v` != 4* ]]; then npm install -g npm@4; fi
- "export TRAVIS_COMMIT_MSG=\"`git log --format=%B --no-merges -n 1`\"" - "export TRAVIS_COMMIT_MSG=\"`git log --format=%B --no-merges -n 1`\""
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip browser\]'; export TWBS_DO_BROWSER=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
- if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then export TWBS_DO_VALIDATOR=0; fi
install: install:
- bundle install --deployment --jobs=3 --retry=3 - bundle install --deployment --jobs=3 --retry=3
- cp grunt/npm-shrinkwrap.json ./ - cp build/npm-shrinkwrap.json ./
- npm install - npm install
script:
- npm test
- if [ "$TWBS_TEST" = browser -a "$SAUCE_ACCESS_KEY" ]; then npm run js-test-cloud; fi
after_success: after_success:
- if [ "$TWBS_TEST" = sauce-js-unit ]; then grunt/upload-preview.sh; fi - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi
cache: cache:
directories: directories:
- node_modules - node_modules
- vendor/bundle - vendor/bundle
- "$HOME/google-cloud-sdk"
env: env:
- TWBS_TEST=core - TWBS_TEST=core
- TWBS_TEST=validate-html - TWBS_TEST=browser
- TWBS_TEST=sauce-js-unit
matrix: matrix:
exclude: exclude:
- node_js: "4" - node_js: "4"
env: TWBS_TEST=validate-html env: TWBS_TEST=browser
- node_js: "4"
env: TWBS_TEST=sauce-js-unit
notifications: notifications:
slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH
webhooks: webhooks:
......
source 'https://rubygems.org' source 'https://rubygems.org'
group :development, :test do group :development, :test do
gem 'jekyll', '~> 3.4.2' gem 'jekyll', '~> 3.4.3'
gem 'jekyll-redirect-from', '~> 0.12.1' gem 'jekyll-redirect-from', '~> 0.12.1'
gem 'jekyll-sitemap', '~> 1.0.0' gem 'jekyll-sitemap', '~> 1.1.1'
gem 'scss_lint', '~> 0.52.0' gem 'scss_lint', '~> 0.53.0'
end end
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.5.0) addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2) public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0) colorator (1.1.0)
ffi (1.9.18) ffi (1.9.18)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
jekyll (3.4.2) jekyll (3.4.3)
addressable (~> 2.4) addressable (~> 2.4)
colorator (~> 1.0) colorator (~> 1.0)
jekyll-sass-converter (~> 1.0) jekyll-sass-converter (~> 1.0)
...@@ -21,7 +21,7 @@ GEM ...@@ -21,7 +21,7 @@ GEM
jekyll (~> 3.3) jekyll (~> 3.3)
jekyll-sass-converter (1.5.0) jekyll-sass-converter (1.5.0)
sass (~> 3.4) sass (~> 3.4)
jekyll-sitemap (1.0.0) jekyll-sitemap (1.1.1)
jekyll (~> 3.3) jekyll (~> 3.3)
jekyll-watch (1.5.0) jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1) listen (~> 3.0, < 3.1)
...@@ -41,7 +41,7 @@ GEM ...@@ -41,7 +41,7 @@ GEM
rouge (1.11.1) rouge (1.11.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.4.23) sass (3.4.23)
scss_lint (0.52.0) scss_lint (0.53.0)
rake (>= 0.9, < 13) rake (>= 0.9, < 13)
sass (~> 3.4.20) sass (~> 3.4.20)
...@@ -49,10 +49,10 @@ PLATFORMS ...@@ -49,10 +49,10 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
jekyll (~> 3.4.2) jekyll (~> 3.4.3)
jekyll-redirect-from (~> 0.12.1) jekyll-redirect-from (~> 0.12.1)
jekyll-sitemap (~> 1.0.0) jekyll-sitemap (~> 1.1.1)
scss_lint (~> 0.52.0) scss_lint (~> 0.53.0)
BUNDLED WITH BUNDLED WITH
1.14.6 1.14.6
...@@ -9,151 +9,8 @@ ...@@ -9,151 +9,8 @@
module.exports = function (grunt) { module.exports = function (grunt) {
'use strict' 'use strict'
// Force use of Unix newlines
grunt.util.linefeed = '\n'
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}
var isTravis = require('is-travis')
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n',
jqueryCheck: 'if (typeof jQuery === \'undefined\') {\n' +
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\\'s JavaScript.\')\n' +
'}\n',
jqueryVersionCheck: '+function ($) {\n' +
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {\n' +
' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0\')\n' +
' }\n' +
'}(jQuery);\n\n',
// Task configuration.
clean: {
dist: 'dist',
docs: 'docs/dist'
},
// JS build configuration
babel: {
dev: {
options: {
sourceMap: true
},
files: {
'js/dist/util.js' : 'js/src/util.js',
'js/dist/alert.js' : 'js/src/alert.js',
'js/dist/button.js' : 'js/src/button.js',
'js/dist/carousel.js' : 'js/src/carousel.js',
'js/dist/collapse.js' : 'js/src/collapse.js',
'js/dist/dropdown.js' : 'js/src/dropdown.js',
'js/dist/modal.js' : 'js/src/modal.js',
'js/dist/scrollspy.js' : 'js/src/scrollspy.js',
'js/dist/tab.js' : 'js/src/tab.js',
'js/dist/tooltip.js' : 'js/src/tooltip.js',
'js/dist/popover.js' : 'js/src/popover.js'
}
},
dist: {
options: {
extends: '../../.babelrc'
},
files: {
'<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>'
}
}
},
stamp: {
options: {
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function () {\n',
footer: '\n}();'
},
bootstrap: {
files: {
src: '<%= concat.bootstrap.dest %>'
}
}
},
concat: {
options: {
// Custom function to remove all export and import statements
process: function (src) {
return src.replace(/^(export|import).*/gm, '')
}
},
bootstrap: {
src: [
'js/src/util.js',
'js/src/alert.js',
'js/src/button.js',
'js/src/carousel.js',
'js/src/collapse.js',
'js/src/dropdown.js',
'js/src/modal.js',
'js/src/scrollspy.js',
'js/src/tab.js',
'js/src/tooltip.js',
'js/src/popover.js'
],
dest: 'dist/js/<%= pkg.name %>.js'
}
},
qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},
// CSS build configuration
copy: {
docs: {
expand: true,
cwd: 'dist/',
src: [
'**/*'
],
dest: 'docs/dist/'
}
},
connect: {
server: {
options: {
port: 3000,
base: '.'
}
}
},
watch: {
src: {
files: '<%= concat.bootstrap.src %>',
tasks: ['babel:dev']
},
sass: {
files: 'scss/**/*.scss',
tasks: ['dist-css', 'docs']
},
docs: {
files: 'docs/assets/scss/**/*.scss',
tasks: ['dist-css', 'docs']
}
},
'saucelabs-qunit': { 'saucelabs-qunit': {
all: { all: {
options: { options: {
...@@ -162,160 +19,11 @@ module.exports = function (grunt) { ...@@ -162,160 +19,11 @@ module.exports = function (grunt) {
maxRetries: 3, maxRetries: 3,
maxPollRetries: 4, maxPollRetries: 4,
urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'], urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml') browsers: grunt.file.readYAML('build/sauce_browsers.yml')
}
}
},
exec: {
'clean-css': {
command: 'npm run clean-css'
},
'clean-css-docs': {
command: 'npm run clean-css-docs'
},
postcss: {
command: 'npm run postcss'
},
'postcss-docs': {
command: 'npm run postcss-docs'
},
htmlhint: {
command: 'npm run htmlhint'
},
htmllint: {
command: 'npm run htmllint'
},
jekyll: {
command: 'npm run jekyll'
},
'jekyll-github': {
command: 'npm run jekyll-github'
},
sass: {
command: 'npm run sass'
},
'sass-docs': {
command: 'npm run sass-docs'
},
'scss-lint': {
command: 'npm run scss-lint'
},
'scss-lint-docs': {
command: 'npm run scss-lint-docs'
},
uglify: {
command: 'npm run uglify'
},
'uglify-docs': {
command: 'npm run uglify-docs'
}
},
buildcontrol: {
options: {
dir: '_gh_pages',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'git@github.com:twbs/derpstrap.git',
branch: 'gh-pages'
} }
} }
},
compress: {
main: {
options: {
archive: 'bootstrap-<%= pkg.version %>-dist.zip',
mode: 'zip',
level: 9,
pretty: true
},
files: [
{
expand: true,
cwd: 'dist/',
src: ['**'],
dest: 'bootstrap-<%= pkg.version %>-dist'
}
]
}
} }
}) })
grunt.loadNpmTasks('grunt-saucelabs')
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt)
require('time-grunt')(grunt)
// Docs HTML validation task
grunt.registerTask('validate-html', ['exec:jekyll', 'exec:htmllint', 'exec:htmlhint'])
var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset
}
var isUndefOrNonZero = function (val) {
return val === undefined || val !== '0'
}
// Test task.
var testSubtasks = []
// Skip core tests if running a different subset of the test suite
if (runSubset('core') &&
// Skip core tests if this is a Savage build
process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'qunit', 'docs'])
}
// Skip HTML validation if running a different subset of the test suite
if (runSubset('validate-html') &&
isTravis &&
// Skip HTML5 validator when [skip validator] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
testSubtasks.push('validate-html')
}
// Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
// Skip Sauce if running a different subset of the test suite
runSubset('sauce-js-unit')) {
testSubtasks = testSubtasks.concat(['dist', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
// Skip Sauce on Travis when [skip sauce] is in the commit message
if (isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
testSubtasks.push('connect')
testSubtasks.push('saucelabs-qunit')
}
}
grunt.registerTask('test', testSubtasks)
// JS distribution task.
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'exec:uglify'])
grunt.registerTask('test-scss', ['exec:scss-lint'])
// CSS distribution task.
grunt.registerTask('sass-compile', ['exec:sass', 'exec:sass-docs'])
grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'exec:clean-css', 'exec:clean-css-docs'])
// Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js'])
// Default task.
grunt.registerTask('default', ['clean:dist', 'test'])
// Docs task.
grunt.registerTask('docs-css', ['exec:clean-css-docs', 'exec:postcss-docs'])
grunt.registerTask('lint-docs-css', ['exec:scss-lint-docs'])
grunt.registerTask('docs-js', ['exec:uglify-docs'])
grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
grunt.registerTask('docs-github', ['exec:jekyll-github'])
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress'])
// Publish to GitHub
grunt.registerTask('publish', ['buildcontrol:pages'])
} }
File moved
File moved
This diff is collapsed.
File moved
File moved
const fs = require('fs')
fs.readFile('package.json', (err, data) => {
if (err) throw err
const pkg = JSON.parse(data)
const year = new Date().getFullYear()
const stampTop =
`/*!
* Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')
}
(function ($) {
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
}
})(jQuery);
(function () {
`
const stampEnd = `
})()`
process.stdout.write(stampTop)
process.stdin.on('end', () => {
process.stdout.write(stampEnd);
});
process.stdin.pipe(process.stdout)
})
#!/bin/bash #!/bin/bash
# Upload built docs to preview.twbsapps.com # Upload built docs to preview.twbsapps.com
if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ]; then exit 0; fi
# Add build metadata to version # Add build metadata to version
sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml
# Fix URLs since the site's root is now a subdirectory
bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}" bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}"
# Install gcloud & gsutil openssl aes-256-cbc -K $encrypted_2b749c8e6327_key -iv $encrypted_2b749c8e6327_iv -in build/gcp-key.json.enc -out build/gcp-key.json -d
GSUTIL_VERSION=$(gsutil version | cut -d ' ' -f 3) gcloud auth activate-service-account "$GCP_SERVICE_ACCOUNT" --key-file build/gcp-key.json &> /dev/null || (echo 'GCP login failed!'; exit 1)
if [ ! -d "${HOME}/google-cloud-sdk" ] || [ "${GSUTIL_VERSION}" != '4.19' ]; then
rm -rf "${HOME}/google-cloud-sdk" # Kill Travis' outdated non-updateable preinstalled version
echo 'Installing google-cloud-sdk...'
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
time (curl -S -s https://sdk.cloud.google.com | bash &>/dev/null)
echo 'Done.'
fi
source "${HOME}/google-cloud-sdk/path.bash.inc"
openssl aes-256-cbc -K $encrypted_2b749c8e6327_key -iv $encrypted_2b749c8e6327_iv -in grunt/gcp-key.json.enc -out grunt/gcp-key.json -d
gcloud auth activate-service-account "$GCP_SERVICE_ACCOUNT" --key-file grunt/gcp-key.json &> /dev/null || (echo 'GCP login failed!'; exit 1)
echo "Uploading to http://preview.twbsapps.com/c/${TRAVIS_COMMIT} ..." echo "Uploading to http://preview.twbsapps.com/c/${TRAVIS_COMMIT} ..."
time gsutil -q -m cp -z html,css,js,svg -r "./${TRAVIS_COMMIT}" gs://preview.twbsapps.com/c/ time gsutil -q -m cp -z html,css,js,svg -r "./${TRAVIS_COMMIT}" gs://preview.twbsapps.com/c/
......
/*
* grunt-contrib-qunit
* http://gruntjs.com/
*
* Copyright (c) 2014 "Cowboy" Ben Alman, contributors
* Licensed under the MIT license.
*/
(function () {
'use strict'
// Don't re-order tests.
QUnit.config.reorder = false
// Run tests serially, not in parallel.
QUnit.config.autorun = false
// Send messages to the parent PhantomJS process via alert! Good times!!
function sendMessage() {
var args = [].slice.call(arguments)
alert(JSON.stringify(args))
}
// These methods connect QUnit to PhantomJS.
QUnit.log(function (obj) {
// What is this I don’t even
if (obj.message === '[object Object], undefined:undefined') { return }
// Parse some stuff before sending it.
var actual
var expected
if (!obj.result) {
// Dumping large objects can be very slow, and the dump isn't used for
// passing tests, so only dump if the test failed.
actual = QUnit.dump.parse(obj.actual)
expected = QUnit.dump.parse(obj.expected)
}
// Send it.
sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source)
})
QUnit.testStart(function (obj) {
sendMessage('qunit.testStart', obj.name)
})
QUnit.testDone(function (obj) {
sendMessage('qunit.testDone', obj.name, obj.failed, obj.passed, obj.total, obj.duration)
})
QUnit.moduleStart(function (obj) {
sendMessage('qunit.moduleStart', obj.name)
})
QUnit.moduleDone(function (obj) {
if (obj.failed === 0) {
console.log('\r\u221A All tests passed in "' + obj.name + '" module')
} else {
console.log('\u00D7 ' + obj.failed + ' tests failed in "' + obj.name + '" module')
}
sendMessage('qunit.moduleDone', obj.name, obj.failed, obj.passed, obj.total)
})
QUnit.begin(function () {
sendMessage('qunit.begin')
console.log('\n\nStarting test suite')
console.log('================================================\n')
})
QUnit.done(function (obj) {
sendMessage('qunit.done', obj.failed, obj.passed, obj.total, obj.runtime)
})
}())
...@@ -17,24 +17,40 @@ ...@@ -17,24 +17,40 @@
"Twitter, Inc." "Twitter, Inc."
], ],
"scripts": { "scripts": {
"change-version": "node grunt/change-version.js", "bash": "bash",
"clean-css": "cleancss --level 1 --source-map --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --source-map --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --source-map --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css", "css": "npm-run-all css-lint css-compile css-prefix css-minify",
"clean-css-docs": "cleancss --level 1 --source-map --output docs/assets/css/docs.min.css docs/assets/css/docs.min.css", "css-docs": "npm-run-all css-lint-docs css-compile-docs css-prefix-docs css-minify-docs",
"eslint": "eslint --ignore-path .eslintignore js && eslint --config js/tests/.eslintrc.json --env node grunt Gruntfile.js && eslint --config js/tests/.eslintrc.json docs/assets/js/src docs/assets/js/ie-emulation-modes-warning.js docs/assets/js/ie10-viewport-bug-workaround.js", "css-lint": "bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss",
"htmlhint": "htmlhint --config docs/.htmlhintrc _gh_pages/", "css-lint-docs": "bundle exec scss-lint --config scss/.scss-lint.yml --exclude docs/assets/scss/docs.scss docs/assets/scss/*.scss",
"htmllint": "htmllint --rc docs/.htmllintrc _gh_pages/**/*.html js/tests/visual/*.html", "css-compile": "node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css",
"jekyll": "bundle exec jekyll build", "css-compile-docs": "node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css",
"jekyll-github": "shx echo 'github: true' > $npm_config_tmp/twbsjekyll.yml && npm run jekyll -- --config _config.yml,$npm_config_tmp/twbsjekyll.yml && shx rm $npm_config_tmp/twbsjekyll.yml", "css-prefix": "postcss --config build/ --replace dist/css/*.css",
"postcss": "postcss --config grunt/ --replace dist/css/*.css", "css-prefix-docs": "postcss --config build/ --no-map --replace docs/assets/css/docs.min.css docs/examples/**/*.css",
"postcss-docs": "postcss --config grunt/ --replace docs/assets/css/docs.min.css && postcss --config grunt/ --replace docs/examples/**/*.css", "css-minify": "cleancss --level 1 --source-map --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --source-map --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --source-map --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css",
"sass": "node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css", "css-minify-docs": "cleancss --level 1 --source-map --output docs/assets/css/docs.min.css docs/assets/css/docs.min.css",
"sass-docs": "node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css", "js": "npm-run-all js-compile js-minify",
"scss-lint": "bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss", "js-docs": "npm-run-all js-lint-docs js-minify-docs",
"scss-lint-docs": "bundle exec scss-lint --config scss/.scss-lint.yml --exclude docs/assets/scss/docs.scss docs/assets/scss/*.scss", "js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/",
"uglify": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js", "js-lint-docs": "eslint --config js/tests/.eslintrc.json docs/assets/js/",
"uglify-docs": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output docs/assets/js/docs.min.js docs/assets/js/vendor/anchor.min.js docs/assets/js/vendor/clipboard.min.js docs/assets/js/vendor/holder.min.js docs/assets/js/src/application.js", "js-compile": "npm-run-all --parallel js-compile-*",
"update-shrinkwrap": "npm shrinkwrap --dev && shx mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json", "js-compile-bundle": "shx cat js/src/util.js js/src/alert.js js/src/button.js js/src/carousel.js js/src/collapse.js js/src/dropdown.js js/src/modal.js js/src/scrollspy.js js/src/tab.js js/src/tooltip.js js/src/popover.js | shx sed 's/^(import|export).*//' | babel --filename js/src/bootstrap.js | node build/stamp.js > dist/js/bootstrap.js",
"test": "npm run eslint && grunt test" "js-compile-plugins": "babel js/src/ --out-dir js/dist/ --source-maps",
"js-minify": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-docs": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output docs/assets/js/docs.min.js docs/assets/js/vendor/anchor.min.js docs/assets/js/vendor/clipboard.min.js docs/assets/js/vendor/holder.min.js docs/assets/js/src/application.js",
"js-test": "phantomjs ./node_modules/qunit-phantomjs-runner/runner.js js/tests/index.html 60",
"js-test-cloud": "ruby -run -ehttpd . -p3000 & grunt saucelabs-qunit",
"docs": "npm-run-all docs-compile docs-lint",
"docs-lint": "htmlhint --config docs/.htmlhintrc _gh_pages/ js/tests/visual/ && htmllint --rc docs/.htmllintrc _gh_pages/*.html _gh_pages/**/*.html js/tests/visual/*.html",
"docs-clean": "shx rm -r docs/dist/* && shx cp -r dist/* docs/dist/",
"docs-compile": "npm run docs-clean && bundle exec jekyll build",
"docs-serve": "npm run docs-clean && bundle exec jekyll serve",
"docs-github": "shx echo 'github: true' > $npm_config_tmp/twbsconfig.yml && npm run docs-compile -- --config _config.yml,$npm_config_tmp/twbsconfig.yml && shx rm $npm_config_tmp/twbsconfig.yml",
"docs-upload-preview": "build/upload-preview.sh",
"maintenance-dependencies": "ncu -a -x jquery && bundle update && shx echo 'Manually update docs/assets/js/vendor/*, js/tests/vendor/*, bower.json and .travis.yml'",
"maintenance-shrinkwrap": "npm shrinkwrap --dev && shx mv npm-shrinkwrap.json build/npm-shrinkwrap.json",
"release-version": "node build/change-version.js",
"release-zip": "cd dist/ && zip -r9 bootstrap-$npm_package_version-dist.zip * && shx mv bootstrap-$npm_package_version-dist.zip ..",
"test": "npm-run-all --parallel css js && npm-run-all docs"
}, },
"style": "dist/css/bootstrap.css", "style": "dist/css/bootstrap.css",
"sass": "scss/bootstrap.scss", "sass": "scss/bootstrap.scss",
...@@ -53,42 +69,39 @@ ...@@ -53,42 +69,39 @@
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^6.7.7", "autoprefixer": "^6.7.7",
"babel-eslint": "^7.1.1", "babel-cli": "^6.24.1",
"babel-plugin-transform-es2015-modules-strip": "^0.1.0", "babel-eslint": "^7.2.2",
"babel-preset-es2015": "^6.24.0", "babel-plugin-transform-es2015-modules-strip": "^0.1.1",
"clean-css-cli": "^4.0.9", "babel-preset-es2015": "^7.0.0-alpha.7",
"eslint": "^3.18.0", "clean-css-cli": "^4.0.12",
"eslint": "^3.19.0",
"grunt": "^1.0.1", "grunt": "^1.0.1",
"grunt-babel": "^6.0.0",
"grunt-build-control": "^0.7.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-compress": "^1.4.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-qunit": "^1.3.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-exec": "^2.0.0",
"grunt-saucelabs": "^9.0.0", "grunt-saucelabs": "^9.0.0",
"grunt-stamp": "^0.3.0",
"htmlhint": "^0.9.13", "htmlhint": "^0.9.13",
"htmllint-cli": "^0.0.6", "htmllint-cli": "^0.0.6",
"is-travis": "^1.0.0", "node-sass": "^4.5.2",
"load-grunt-tasks": "^3.5.2", "npm-run-all": "^4.0.2",
"node-sass": "^4.5.0", "phantomjs-prebuilt": "^2.1.14",
"postcss-cli": "^3.0.0", "postcss-cli": "^3.1.1",
"postcss-flexbugs-fixes": "^2.1.0", "postcss-flexbugs-fixes": "^2.1.1",
"qunit-phantomjs-runner": "^2.3.0",
"qunitjs": "^2.3.1",
"shelljs": "^0.7.7", "shelljs": "^0.7.7",
"shx": "^0.2.2", "shx": "^0.2.2",
"time-grunt": "^1.4.0", "uglify-js": "^2.8.22"
"uglify-js": "^2.8.14"
}, },
"engines": { "engines": {
"node": ">=4" "node": ">=4"
}, },
"files": [ "files": [
".babelrc",
".eslintignore",
"Gruntfile.js",
"dist", "dist",
"build",
"js/.eslintrc.json",
"js/**/*.js", "js/**/*.js",
"scss/.scss-lint.yml",
"scss/**/*.scss", "scss/**/*.scss",
"LICENSE" "LICENSE"
], ],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment