wip rollup - fix jscs

This commit is contained in:
Kevin Ross 2016-01-04 09:11:31 -06:00
parent ccc251c75c
commit 9a4158540b
6 changed files with 20 additions and 15 deletions

View File

@ -1,4 +1,3 @@
{ {
sourceMap: true,
presets: [ "es2015-rollup" ] presets: [ "es2015-rollup" ]
} }

View File

@ -302,13 +302,15 @@ module.exports = function (grunt) {
advanced: false advanced: false
}, },
core: { core: {
files: [{ files: [
{
expand: true, expand: true,
cwd: 'dist/css', cwd: 'dist/css',
src: ['*.css', '!*.min.css'], src: ['*.css', '!*.min.css'],
dest: 'dist/css', dest: 'dist/css',
ext: '.min.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',

View File

@ -38,8 +38,8 @@ module.exports = (function () {
} }
return { return {
'commonJs': commonJs, commonJs: commonJs,
'systemJs': systemJs systemJs: systemJs
} }
}()) }())

View File

@ -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",

View File

@ -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(', ')
} }

View File

@ -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
}; };