mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-16 19:50:37 +03:00
wip rollup - fix jscs
This commit is contained in:
parent
ccc251c75c
commit
9a4158540b
1
.babelrc
1
.babelrc
|
@ -1,4 +1,3 @@
|
||||||
{
|
{
|
||||||
sourceMap: true,
|
|
||||||
presets: [ "es2015-rollup" ]
|
presets: [ "es2015-rollup" ]
|
||||||
}
|
}
|
||||||
|
|
21
Gruntfile.js
21
Gruntfile.js
|
@ -302,13 +302,15 @@ module.exports = function (grunt) {
|
||||||
advanced: false
|
advanced: false
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
files: [{
|
files: [
|
||||||
expand: true,
|
{
|
||||||
cwd: 'dist/css',
|
expand: true,
|
||||||
src: ['*.css', '!*.min.css'],
|
cwd: 'dist/css',
|
||||||
dest: 'dist/css',
|
src: ['*.css', '!*.min.css'],
|
||||||
ext: '.min.css'
|
dest: 'dist/css',
|
||||||
}]
|
ext: '.min.css'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
docs: {
|
docs: {
|
||||||
src: 'docs/assets/css/docs.css',
|
src: 'docs/assets/css/docs.css',
|
||||||
|
@ -377,7 +379,7 @@ module.exports = function (grunt) {
|
||||||
options: {
|
options: {
|
||||||
// https://regex101.com/r/hG8lU4/1
|
// https://regex101.com/r/hG8lU4/1
|
||||||
process: function (content, srcpath) {
|
process: function (content, srcpath) {
|
||||||
return content.replace(/([\s\S]+)/mg, "// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n$1");
|
return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n$1');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
expand: true,
|
expand: true,
|
||||||
|
@ -613,6 +615,9 @@ module.exports = function (grunt) {
|
||||||
grunt.registerTask('dist-js', [
|
grunt.registerTask('dist-js', [
|
||||||
'clean:dist-js',
|
'clean:dist-js',
|
||||||
'eslint',
|
'eslint',
|
||||||
|
'jscs:grunt',
|
||||||
|
'jscs:core',
|
||||||
|
'jscs:test',
|
||||||
'exec:rollup-iife',
|
'exec:rollup-iife',
|
||||||
'exec:rollup-umd',
|
'exec:rollup-umd',
|
||||||
'exec:rollup-es6',
|
'exec:rollup-es6',
|
||||||
|
|
|
@ -38,8 +38,8 @@ module.exports = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'commonJs': commonJs,
|
commonJs: commonJs,
|
||||||
'systemJs': systemJs
|
systemJs: systemJs
|
||||||
}
|
}
|
||||||
}())
|
}())
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"esnext": true,
|
"esnext": true,
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
"disallowEmptyBlocks": true,
|
"disallowEmptyBlocks": false,
|
||||||
"disallowKeywords": ["with"],
|
"disallowKeywords": ["with"],
|
||||||
"disallowMixedSpacesAndTabs": true,
|
"disallowMixedSpacesAndTabs": true,
|
||||||
"disallowMultipleLineStrings": true,
|
"disallowMultipleLineStrings": true,
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"requirePaddingNewLinesBeforeExport": true,
|
"requirePaddingNewLinesBeforeExport": true,
|
||||||
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
||||||
"requireSpaceAfterLineComment": true,
|
"requireSpaceAfterLineComment": false,
|
||||||
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
||||||
"requireSpaceBetweenArguments": true,
|
"requireSpaceBetweenArguments": true,
|
||||||
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
|
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
||||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||||
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
||||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
"requireSpacesInsideObjectBrackets": false,
|
||||||
"validateAlignedFunctionParameters": true,
|
"validateAlignedFunctionParameters": true,
|
||||||
"validateIndentation": 2,
|
"validateIndentation": 2,
|
||||||
"validateLineBreaks": "LF",
|
"validateLineBreaks": "LF",
|
||||||
|
|
2
js/src/bootstrapMaterialDesign.js
vendored
2
js/src/bootstrapMaterialDesign.js
vendored
|
@ -156,7 +156,7 @@ const BootstrapMaterialDesign = (($) => {
|
||||||
// private
|
// private
|
||||||
|
|
||||||
_resolveSelector(componentConfig) {
|
_resolveSelector(componentConfig) {
|
||||||
let selector = componentConfig['selector']
|
let selector = componentConfig.selector
|
||||||
if (Array.isArray(selector)) {
|
if (Array.isArray(selector)) {
|
||||||
selector = selector.join(', ')
|
selector = selector.join(', ')
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import babel from 'rollup-plugin-babel';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
entry: 'js/src/index.js',
|
entry: 'js/src/index.js',
|
||||||
|
sourceMap: true,
|
||||||
plugins: [babel()]
|
plugins: [babel()]
|
||||||
//external: external
|
//external: external
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user