mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Update AdminLTE
- from 2.4.5 to 2.4.18 (cannot detect any issues) - set default scancycle for Apple Devices to 1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap's Gruntfile
|
||||
* http://getbootstrap.com
|
||||
* Copyright 2013-2016 Twitter, Inc.
|
||||
* https://getbootstrap.com/
|
||||
* Copyright 2013-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -104,7 +104,7 @@ module.exports = function (grunt) {
|
||||
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>',
|
||||
stripBanners: false
|
||||
},
|
||||
bootstrap: {
|
||||
core: {
|
||||
src: [
|
||||
'js/transition.js',
|
||||
'js/alert.js',
|
||||
@@ -125,78 +125,90 @@ module.exports = function (grunt) {
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
compress: {
|
||||
warnings: false
|
||||
},
|
||||
compress: true,
|
||||
mangle: true,
|
||||
preserveComments: /^!|@preserve|@license|@cc_on/i
|
||||
ie8: true,
|
||||
output: {
|
||||
comments: /^!|@preserve|@license|@cc_on/i
|
||||
}
|
||||
},
|
||||
core: {
|
||||
src: '<%= concat.bootstrap.dest %>',
|
||||
src: '<%= concat.core.dest %>',
|
||||
dest: 'dist/js/<%= pkg.name %>.min.js'
|
||||
},
|
||||
customize: {
|
||||
src: configBridge.paths.customizerJs,
|
||||
dest: 'docs/assets/js/customize.min.js'
|
||||
},
|
||||
docsJs: {
|
||||
docs: {
|
||||
src: configBridge.paths.docsJs,
|
||||
dest: 'docs/assets/js/docs.min.js'
|
||||
}
|
||||
},
|
||||
|
||||
qunit: {
|
||||
options: {
|
||||
inject: 'js/tests/unit/phantom.js'
|
||||
},
|
||||
files: 'js/tests/index.html'
|
||||
},
|
||||
|
||||
less: {
|
||||
compileCore: {
|
||||
options: {
|
||||
ieCompat: true,
|
||||
strictMath: true,
|
||||
sourceMap: true,
|
||||
outputSourceFiles: true
|
||||
},
|
||||
core: {
|
||||
options: {
|
||||
strictMath: true,
|
||||
sourceMap: true,
|
||||
outputSourceFiles: true,
|
||||
sourceMapURL: '<%= pkg.name %>.css.map',
|
||||
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
|
||||
},
|
||||
src: 'less/bootstrap.less',
|
||||
dest: 'dist/css/<%= pkg.name %>.css'
|
||||
},
|
||||
compileTheme: {
|
||||
theme: {
|
||||
options: {
|
||||
strictMath: true,
|
||||
sourceMap: true,
|
||||
outputSourceFiles: true,
|
||||
sourceMapURL: '<%= pkg.name %>-theme.css.map',
|
||||
sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map'
|
||||
},
|
||||
src: 'less/theme.less',
|
||||
dest: 'dist/css/<%= pkg.name %>-theme.css'
|
||||
},
|
||||
docs: {
|
||||
options: {
|
||||
sourceMapURL: 'docs.css.map',
|
||||
sourceMapFilename: 'docs/assets/css/docs.css.map'
|
||||
},
|
||||
src: 'docs/assets/less/docs.less',
|
||||
dest: 'docs/assets/css/docs.css'
|
||||
},
|
||||
docsIe: {
|
||||
options: {
|
||||
sourceMap: false
|
||||
},
|
||||
src: 'docs/assets/less/ie10-viewport-bug-workaround.less',
|
||||
dest: 'docs/assets/css/ie10-viewport-bug-workaround.css'
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
postcss: {
|
||||
options: {
|
||||
browsers: configBridge.config.autoprefixerBrowsers
|
||||
map: {
|
||||
inline: false,
|
||||
sourcesContent: true
|
||||
},
|
||||
processors: [
|
||||
require('autoprefixer')(configBridge.config.autoprefixer)
|
||||
]
|
||||
},
|
||||
core: {
|
||||
options: {
|
||||
map: true
|
||||
},
|
||||
src: 'dist/css/<%= pkg.name %>.css'
|
||||
},
|
||||
theme: {
|
||||
options: {
|
||||
map: true
|
||||
},
|
||||
src: 'dist/css/<%= pkg.name %>-theme.css'
|
||||
},
|
||||
docs: {
|
||||
src: ['docs/assets/css/src/docs.css']
|
||||
src: 'docs/assets/css/docs.css'
|
||||
},
|
||||
examples: {
|
||||
options: {
|
||||
map: false
|
||||
},
|
||||
expand: true,
|
||||
cwd: 'docs/examples/',
|
||||
src: ['**/*.css'],
|
||||
@@ -204,76 +216,47 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
csslint: {
|
||||
stylelint: {
|
||||
options: {
|
||||
csslintrc: 'less/.csslintrc'
|
||||
configFile: 'grunt/.stylelintrc',
|
||||
reportNeedlessDisables: false
|
||||
},
|
||||
dist: [
|
||||
'dist/css/bootstrap.css',
|
||||
'dist/css/bootstrap-theme.css'
|
||||
'less/**/*.less'
|
||||
],
|
||||
docs: [
|
||||
'docs/assets/less/**/*.less'
|
||||
],
|
||||
examples: [
|
||||
'docs/examples/**/*.css'
|
||||
],
|
||||
docs: {
|
||||
options: {
|
||||
ids: false,
|
||||
'overqualified-elements': false
|
||||
},
|
||||
src: 'docs/assets/css/src/docs.css'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
options: {
|
||||
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released
|
||||
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly
|
||||
compatibility: 'ie8',
|
||||
keepSpecialComments: '*',
|
||||
sourceMap: true,
|
||||
sourceMapInlineSources: true,
|
||||
advanced: false
|
||||
level: {
|
||||
1: {
|
||||
specialComments: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minifyCore: {
|
||||
core: {
|
||||
src: 'dist/css/<%= pkg.name %>.css',
|
||||
dest: 'dist/css/<%= pkg.name %>.min.css'
|
||||
},
|
||||
minifyTheme: {
|
||||
theme: {
|
||||
src: 'dist/css/<%= pkg.name %>-theme.css',
|
||||
dest: 'dist/css/<%= pkg.name %>-theme.min.css'
|
||||
},
|
||||
docs: {
|
||||
src: [
|
||||
'docs/assets/css/ie10-viewport-bug-workaround.css',
|
||||
'docs/assets/css/src/pygments-manni.css',
|
||||
'docs/assets/css/src/docs.css'
|
||||
],
|
||||
src: 'docs/assets/css/docs.css',
|
||||
dest: 'docs/assets/css/docs.min.css'
|
||||
}
|
||||
},
|
||||
|
||||
csscomb: {
|
||||
options: {
|
||||
config: 'less/.csscomb.json'
|
||||
},
|
||||
dist: {
|
||||
expand: true,
|
||||
cwd: 'dist/css/',
|
||||
src: ['*.css', '!*.min.css'],
|
||||
dest: 'dist/css/'
|
||||
},
|
||||
examples: {
|
||||
expand: true,
|
||||
cwd: 'docs/examples/',
|
||||
src: '**/*.css',
|
||||
dest: 'docs/examples/'
|
||||
},
|
||||
docs: {
|
||||
src: 'docs/assets/css/src/docs.css',
|
||||
dest: 'docs/assets/css/src/docs.css'
|
||||
}
|
||||
},
|
||||
|
||||
copy: {
|
||||
fonts: {
|
||||
expand: true,
|
||||
@@ -313,41 +296,6 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
htmlmin: {
|
||||
dist: {
|
||||
options: {
|
||||
collapseBooleanAttributes: true,
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
decodeEntities: false,
|
||||
minifyCSS: {
|
||||
compatibility: 'ie8',
|
||||
keepSpecialComments: 0
|
||||
},
|
||||
minifyJS: true,
|
||||
minifyURLs: false,
|
||||
processConditionalComments: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
removeOptionalAttributes: true,
|
||||
removeOptionalTags: true,
|
||||
removeRedundantAttributes: true,
|
||||
removeScriptTypeAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
removeTagWhitespace: false,
|
||||
sortAttributes: true,
|
||||
sortClassName: true
|
||||
},
|
||||
expand: true,
|
||||
cwd: '_gh_pages',
|
||||
dest: '_gh_pages',
|
||||
src: [
|
||||
'**/*.html',
|
||||
'!examples/**/*.html'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
pug: {
|
||||
options: {
|
||||
pretty: true,
|
||||
@@ -366,67 +314,40 @@ module.exports = function (grunt) {
|
||||
htmllint: {
|
||||
options: {
|
||||
ignore: [
|
||||
'Attribute "autocomplete" not allowed on element "button" at this point.',
|
||||
'Attribute "autocomplete" is only allowed when the input type is "color", "date", "datetime", "datetime-local", "email", "hidden", "month", "number", "password", "range", "search", "tel", "text", "time", "url", or "week".',
|
||||
'Element "img" is missing required attribute "src".'
|
||||
]
|
||||
],
|
||||
noLangDetect: true
|
||||
},
|
||||
src: '_gh_pages/**/*.html'
|
||||
src: ['_gh_pages/**/*.html', 'js/tests/**/*.html']
|
||||
},
|
||||
|
||||
watch: {
|
||||
src: {
|
||||
files: '<%= jshint.core.src %>',
|
||||
tasks: ['jshint:core', 'qunit', 'concat']
|
||||
tasks: ['jshint:core', 'exec:karma', 'concat']
|
||||
},
|
||||
test: {
|
||||
files: '<%= jshint.test.src %>',
|
||||
tasks: ['jshint:test', 'qunit']
|
||||
tasks: ['jshint:test', 'exec:karma']
|
||||
},
|
||||
less: {
|
||||
files: 'less/**/*.less',
|
||||
tasks: 'less'
|
||||
}
|
||||
},
|
||||
|
||||
'saucelabs-qunit': {
|
||||
all: {
|
||||
options: {
|
||||
build: process.env.TRAVIS_JOB_ID,
|
||||
throttled: 10,
|
||||
maxRetries: 3,
|
||||
maxPollRetries: 4,
|
||||
urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
|
||||
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
|
||||
}
|
||||
tasks: ['less', 'copy']
|
||||
},
|
||||
docs: {
|
||||
files: 'docs/assets/less/**/*.less',
|
||||
tasks: ['less']
|
||||
}
|
||||
},
|
||||
|
||||
exec: {
|
||||
npmUpdate: {
|
||||
command: 'npm update'
|
||||
}
|
||||
},
|
||||
|
||||
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'
|
||||
}
|
||||
]
|
||||
browserstack: {
|
||||
command: 'cross-env BROWSER=true karma start grunt/karma.conf.js'
|
||||
},
|
||||
karma: {
|
||||
command: 'karma start grunt/karma.conf.js'
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -441,16 +362,14 @@ module.exports = function (grunt) {
|
||||
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset;
|
||||
};
|
||||
var isUndefOrNonZero = function (val) {
|
||||
return val === undefined || val !== '0';
|
||||
return typeof 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', 'csslint:dist', 'test-js', 'docs']);
|
||||
if (runSubset('core')) {
|
||||
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'stylelint:dist', 'test-js', 'docs']);
|
||||
}
|
||||
// Skip HTML validation if running a different subset of the test suite
|
||||
if (runSubset('validate-html') &&
|
||||
@@ -458,24 +377,23 @@ module.exports = function (grunt) {
|
||||
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') &&
|
||||
// Skip Sauce on Travis when [skip sauce] is in the commit message
|
||||
isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
|
||||
testSubtasks.push('connect');
|
||||
testSubtasks.push('saucelabs-qunit');
|
||||
// Only run BrowserStack tests if there's a BrowserStack access key
|
||||
if (typeof process.env.BROWSER_STACK_USERNAME !== 'undefined' &&
|
||||
// Skip BrowserStack if running a different subset of the test suite
|
||||
runSubset('browserstack') &&
|
||||
// Skip BrowserStack on Travis when [skip browserstack] is in the commit message
|
||||
isUndefOrNonZero(process.env.TWBS_DO_BROWSERSTACK)) {
|
||||
testSubtasks.push('exec:browserstack');
|
||||
}
|
||||
|
||||
grunt.registerTask('test', testSubtasks);
|
||||
grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']);
|
||||
grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'exec:karma']);
|
||||
|
||||
// JS distribution task.
|
||||
grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']);
|
||||
|
||||
// CSS distribution task.
|
||||
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
|
||||
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);
|
||||
grunt.registerTask('dist-css', ['less:core', 'less:theme', 'postcss:core', 'postcss:theme', 'cssmin:core', 'cssmin:theme']);
|
||||
|
||||
// Full distribution task.
|
||||
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']);
|
||||
@@ -483,7 +401,9 @@ module.exports = function (grunt) {
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'test']);
|
||||
|
||||
grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); });
|
||||
grunt.registerTask('build-glyphicons-data', function () {
|
||||
generateGlyphiconsData.call(this, grunt);
|
||||
});
|
||||
|
||||
// task for building customizer
|
||||
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
|
||||
@@ -494,18 +414,17 @@ module.exports = function (grunt) {
|
||||
});
|
||||
|
||||
grunt.registerTask('commonjs', 'Generate CommonJS entrypoint module in dist dir.', function () {
|
||||
var srcFiles = grunt.config.get('concat.bootstrap.src');
|
||||
var srcFiles = grunt.config.get('concat.core.src');
|
||||
var destFilepath = 'dist/js/npm.js';
|
||||
generateCommonJSModule(grunt, srcFiles, destFilepath);
|
||||
});
|
||||
|
||||
// Docs task.
|
||||
grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
|
||||
grunt.registerTask('lint-docs-css', ['csslint:docs', 'csslint:examples']);
|
||||
grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']);
|
||||
grunt.registerTask('docs-css', ['less:docs', 'less:docsIe', 'postcss:docs', 'postcss:examples', 'cssmin:docs']);
|
||||
grunt.registerTask('lint-docs-css', ['stylelint:docs', 'stylelint:examples']);
|
||||
grunt.registerTask('docs-js', ['uglify:docs', 'uglify:customize']);
|
||||
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
|
||||
grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']);
|
||||
grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']);
|
||||
|
||||
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);
|
||||
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github']);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user