1
0
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:
chomik
2019-04-27 14:56:58 +02:00
parent 7c3828aafd
commit 3a45e4e00e
7 changed files with 29 additions and 83 deletions
+5 -5
View File
@@ -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;
+5 -5
View File
@@ -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
},
+5 -5
View File
@@ -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;