mirror of
https://github.com/tabler/tabler.git
synced 2026-08-10 21:32:22 +04:00
css build, js build
This commit is contained in:
+5
-5
@@ -1,14 +1,14 @@
|
||||
'use strict'
|
||||
'use strict';
|
||||
|
||||
const pkg = require('../package.json')
|
||||
const year = new Date().getFullYear()
|
||||
const pkg = require('../package.json');
|
||||
const year = new Date().getFullYear();
|
||||
|
||||
function getBanner(pluginFilename) {
|
||||
return `/*!
|
||||
* Tabler${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2018-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/twbs/tabler/blob/master/LICENSE)
|
||||
*/`
|
||||
*/`;
|
||||
}
|
||||
|
||||
module.exports = getBanner
|
||||
module.exports = getBanner;
|
||||
|
||||
@@ -4,13 +4,13 @@ bs.init({
|
||||
watch: true,
|
||||
server: {
|
||||
routes: {
|
||||
"/": "tmp",
|
||||
"/dist": "dist",
|
||||
"/libs": "static/libs",
|
||||
"/img": "static/img",
|
||||
'/': 'tmp',
|
||||
'/dist': 'dist',
|
||||
'/libs': 'static/libs',
|
||||
'/img': 'static/img',
|
||||
}
|
||||
},
|
||||
files: ["tmp/**/*", "dist/css/*.css", "dist/js/*.js"],
|
||||
files: ['tmp/**/*', 'dist/css/*.css', 'dist/js/*.js'],
|
||||
watchOptions: {
|
||||
ignoreInitial: true
|
||||
},
|
||||
|
||||
@@ -34,11 +34,11 @@ if (BUNDLE) {
|
||||
// Remove last entry in external array to bundle Popper
|
||||
external.pop();
|
||||
delete globals['popper.js'];
|
||||
plugins.push(resolve())
|
||||
plugins.push(resolve());
|
||||
}
|
||||
|
||||
const rollupConfig = {
|
||||
input: path.resolve(__dirname, `../js/tabler.js`),
|
||||
input: path.resolve(__dirname, '../js/tabler.js'),
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
||||
@@ -47,10 +47,10 @@ const rollupConfig = {
|
||||
},
|
||||
external,
|
||||
plugins
|
||||
}
|
||||
};
|
||||
|
||||
if (!ESM) {
|
||||
rollupConfig.output.name = 'tabler'
|
||||
rollupConfig.output.name = 'tabler';
|
||||
}
|
||||
|
||||
module.exports = rollupConfig
|
||||
module.exports = rollupConfig;
|
||||
|
||||
Reference in New Issue
Block a user