mirror of
https://github.com/tabler/tabler.git
synced 2026-08-10 13:22:22 +04:00
Apply eslint 🍪
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user