add different browserslist environments for BSv4 and BSv5
This commit is contained in:
parent
93ea349018
commit
fa72a47692
|
|
@ -1,17 +1,27 @@
|
|||
# Please see https://github.com/browserslist/browserslist for more info
|
||||
# These settings can be changed depending on what browsers your project is supporting
|
||||
|
||||
|
||||
#
|
||||
# BOOTSTRAP 4
|
||||
#
|
||||
|
||||
[bs4]
|
||||
|
||||
# General rules
|
||||
last 2 major version and not dead
|
||||
>= 0.01%
|
||||
|
||||
# Explicit inclusions
|
||||
# See https://getbootstrap.com/docs/4.6/getting-started/browsers-devices/
|
||||
>= 1%
|
||||
last 1 major version
|
||||
not dead
|
||||
Chrome >= 45
|
||||
Firefox >= 38
|
||||
Firefox ESR
|
||||
Explorer >= 10
|
||||
Firefox >= 38
|
||||
Edge >= 12
|
||||
Explorer >= 10
|
||||
iOS >= 9
|
||||
Safari >= 9
|
||||
Android >= 4.4
|
||||
|
|
@ -28,3 +38,19 @@ not Safari < 8 # no support for flex-shrink
|
|||
not Opera < 12.1 # no flexbox support
|
||||
not OperaMobile < 12.1 # no flexbox support
|
||||
not Android < 4.4 # no flexbox support
|
||||
|
||||
#
|
||||
# BOOTSTRAP 5
|
||||
# See https://getbootstrap.com/docs/5.1/getting-started/browsers-devices/
|
||||
#
|
||||
|
||||
[bs5]
|
||||
>= 0.5%
|
||||
last 2 major versions
|
||||
not dead
|
||||
Chrome >= 60
|
||||
Firefox >= 60
|
||||
Firefox ESR
|
||||
iOS >= 12
|
||||
Safari >= 12
|
||||
not Explorer <= 11
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"--blue":"#007bff","--indigo":"#6610f2","--purple":"#5533ff","--pink":"#e83e8c","--red":"#dc3545","--orange":"#fd7e14","--yellow":"#ffc107","--green":"#28a745","--teal":"#20c997","--cyan":"#17a2b8","--white":"#fff","--gray":"#6c757d","--gray-dark":"#343a40"}
|
||||
{"--bs-blue":"#0d6efd","--bs-indigo":"#6610f2","--bs-purple":"#5533ff","--bs-pink":"#d63384","--bs-red":"#dc3545","--bs-orange":"#fd7e14","--bs-yellow":"#ffc107","--bs-green":"#198754","--bs-teal":"#20c997","--bs-cyan":"#0dcaf0","--bs-white":"#fff","--bs-gray":"#6c757d","--bs-gray-dark":"#343a40"}
|
||||
|
|
@ -1,33 +1,34 @@
|
|||
'use strict'
|
||||
'use strict';
|
||||
|
||||
module.exports = ctx => {
|
||||
return {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
},
|
||||
"postcss-understrap-palette-generator" : {
|
||||
colors: [
|
||||
"--blue",
|
||||
"--indigo",
|
||||
"--purple",
|
||||
"--pink",
|
||||
"--red",
|
||||
"--orange",
|
||||
"--yellow",
|
||||
"--green",
|
||||
"--teal",
|
||||
"--cyan",
|
||||
"--white",
|
||||
"--gray",
|
||||
"--gray-dark"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports = ( ctx ) => {
|
||||
return {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true,
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false,
|
||||
env: 'bs4',
|
||||
},
|
||||
'postcss-understrap-palette-generator': {
|
||||
colors: [
|
||||
'--blue',
|
||||
'--indigo',
|
||||
'--purple',
|
||||
'--pink',
|
||||
'--red',
|
||||
'--orange',
|
||||
'--yellow',
|
||||
'--green',
|
||||
'--teal',
|
||||
'--cyan',
|
||||
'--white',
|
||||
'--gray',
|
||||
'--gray-dark',
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,38 +1,40 @@
|
|||
'use strict'
|
||||
'use strict';
|
||||
|
||||
const path = require('path')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
import multi from '@rollup/plugin-multi-entry'
|
||||
const banner = require('./banner.js')
|
||||
const path = require( 'path' );
|
||||
const { babel } = require( '@rollup/plugin-babel' );
|
||||
const { nodeResolve } = require( '@rollup/plugin-node-resolve' );
|
||||
const multi = require( '@rollup/plugin-multi-entry' );
|
||||
const banner = require( './banner.js' );
|
||||
|
||||
let fileDest = 'theme-bootstrap4.js'
|
||||
const external = ['jquery']
|
||||
const fileDest = 'theme-bootstrap4.js';
|
||||
const external = [ 'jquery' ];
|
||||
const plugins = [
|
||||
babel({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
}),
|
||||
nodeResolve(),
|
||||
multi()
|
||||
]
|
||||
babel( {
|
||||
browserslistEnv: 'bs4',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled',
|
||||
} ),
|
||||
nodeResolve(),
|
||||
multi(),
|
||||
];
|
||||
const globals = {
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
'popper.js': 'Popper'
|
||||
}
|
||||
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
'popper.js': 'Popper',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
input: [path.resolve(__dirname, '../js/bootstrap4.js'), path.resolve(__dirname, '../js/skip-link-focus-fix.js'), path.resolve(__dirname, '../js/custom-javascript.js')],
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../../js/${fileDest}`),
|
||||
format: 'umd',
|
||||
globals,
|
||||
name: 'understrap'
|
||||
},
|
||||
external,
|
||||
plugins
|
||||
}
|
||||
input: [
|
||||
path.resolve( __dirname, '../js/bootstrap4.js' ),
|
||||
path.resolve( __dirname, '../js/skip-link-focus-fix.js' ),
|
||||
path.resolve( __dirname, '../js/custom-javascript.js' ),
|
||||
],
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve( __dirname, `../../js/${ fileDest }` ),
|
||||
format: 'umd',
|
||||
globals,
|
||||
name: 'understrap',
|
||||
},
|
||||
external,
|
||||
plugins,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,33 +1,34 @@
|
|||
'use strict'
|
||||
'use strict';
|
||||
|
||||
module.exports = ctx => {
|
||||
return {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
},
|
||||
"postcss-understrap-palette-generator" : {
|
||||
colors: [
|
||||
"--bs-blue",
|
||||
"--bs-indigo",
|
||||
"--bs-purple",
|
||||
"--bs-pink",
|
||||
"--bs-red",
|
||||
"--bs-orange",
|
||||
"--bs-yellow",
|
||||
"--bs-green",
|
||||
"--bs-teal",
|
||||
"--bs-cyan",
|
||||
"--bs-white",
|
||||
"--bs-gray",
|
||||
"--bs-gray-dark"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports = ( ctx ) => {
|
||||
return {
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true,
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false,
|
||||
env: 'bs5',
|
||||
},
|
||||
'postcss-understrap-palette-generator': {
|
||||
colors: [
|
||||
'--bs-blue',
|
||||
'--bs-indigo',
|
||||
'--bs-purple',
|
||||
'--bs-pink',
|
||||
'--bs-red',
|
||||
'--bs-orange',
|
||||
'--bs-yellow',
|
||||
'--bs-green',
|
||||
'--bs-teal',
|
||||
'--bs-cyan',
|
||||
'--bs-white',
|
||||
'--bs-gray',
|
||||
'--bs-gray-dark',
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,44 +1,47 @@
|
|||
'use strict'
|
||||
'use strict';
|
||||
|
||||
const path = require('path')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import multi from '@rollup/plugin-multi-entry'
|
||||
const replace = require('@rollup/plugin-replace')
|
||||
const banner = require('./banner.js')
|
||||
const path = require( 'path' );
|
||||
const { babel } = require( '@rollup/plugin-babel' );
|
||||
const { nodeResolve } = require( '@rollup/plugin-node-resolve' );
|
||||
const commonjs = require( '@rollup/plugin-commonjs' );
|
||||
const multi = require( '@rollup/plugin-multi-entry' );
|
||||
const replace = require( '@rollup/plugin-replace' );
|
||||
const banner = require( './banner.js' );
|
||||
|
||||
let fileDest = 'theme.js'
|
||||
const external = ['jquery']
|
||||
const fileDest = 'theme.js';
|
||||
const external = [ 'jquery' ];
|
||||
const plugins = [
|
||||
babel({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
}),
|
||||
replace({
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
preventAssignment: true
|
||||
}),
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
multi()
|
||||
]
|
||||
babel( {
|
||||
browserslistEnv: 'bs5',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled',
|
||||
} ),
|
||||
replace( {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
preventAssignment: true,
|
||||
} ),
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
multi(),
|
||||
];
|
||||
const globals = {
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
}
|
||||
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
'@popperjs/core': 'Popper',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
input: [path.resolve(__dirname, '../js/bootstrap.js'), path.resolve(__dirname, '../js/skip-link-focus-fix.js'), path.resolve(__dirname, '../js/custom-javascript.js')],
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../../js/${fileDest}`),
|
||||
format: 'umd',
|
||||
globals,
|
||||
name: 'understrap'
|
||||
},
|
||||
external,
|
||||
plugins
|
||||
}
|
||||
input: [
|
||||
path.resolve( __dirname, '../js/bootstrap.js' ),
|
||||
path.resolve( __dirname, '../js/skip-link-focus-fix.js' ),
|
||||
path.resolve( __dirname, '../js/custom-javascript.js' ),
|
||||
],
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve( __dirname, `../../js/${ fileDest }` ),
|
||||
format: 'umd',
|
||||
globals,
|
||||
name: 'understrap',
|
||||
},
|
||||
external,
|
||||
plugins,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue