1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-10 13:22:22 +04:00

Apply eslint 🍪

This commit is contained in:
Damian Sznajder
2019-06-17 21:43:15 +02:00
parent 9febb4be53
commit 497f238fd4
5 changed files with 96 additions and 103 deletions
+3 -4
View File
@@ -10,12 +10,11 @@ bs.init({
'/dist': 'dist',
'/libs': 'static/libs',
'/img': 'static/img',
}
},
},
files: ['tmp/**/*', 'dist/css/*.css', 'dist/js/*.js'],
watchOptions: {
ignoreInitial: true
ignoreInitial: true,
},
notify: false
notify: false,
});
+3 -4
View File
@@ -4,18 +4,17 @@ const fs = require('fs'),
path = require('path'),
yaml = require('yaml');
const data = fs.readFileSync(path.resolve(__dirname, '../scss/fonts/_tabler-webfont.scss'), "utf8"),
const data = fs.readFileSync(path.resolve(__dirname, '../scss/fonts/_tabler-webfont.scss'), 'utf8'),
re = /\$icon-([^\-\s]+)-([^:\s]+):\s'([^'\n]+)';/g;
let items = {};
data.replace(re, function (match, g1, g2, g3) {
if(!items[g1]) {
data.replace(re, function(match, g1, g2, g3) {
if (!items[g1]) {
items[g1] = {};
}
items[g1][g2] = g3;
});
fs.writeFileSync('pages/_data/icons.yml', yaml.stringify(items));
+6 -6
View File
@@ -20,13 +20,13 @@ const plugins = [
'createClass',
'inheritsLoose',
'defineProperty',
'objectSpread'
]
})
'objectSpread',
],
}),
];
const globals = {
'popper.js': 'Popper'
'popper.js': 'Popper',
};
if (BUNDLE) {
@@ -43,10 +43,10 @@ const rollupConfig = {
banner,
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
format: ESM ? 'esm' : 'umd',
globals
globals,
},
external,
plugins
plugins,
};
if (!ESM) {