mirror of
https://github.com/tabler/tabler.git
synced 2026-08-10 21:32:22 +04:00
css scripts, js scripts, remove gulp
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
const bs = require('browser-sync').create();
|
||||
|
||||
bs.init({
|
||||
watch: true,
|
||||
server: {
|
||||
routes: {
|
||||
"/": "tmp",
|
||||
"/dist": "dist",
|
||||
"/libs": "static/libs",
|
||||
"/img": "static/img",
|
||||
}
|
||||
},
|
||||
files: ["tmp/**/*", "dist/css/*.css", "dist/js/*.js"],
|
||||
watchOptions: {
|
||||
ignoreInitial: true
|
||||
},
|
||||
notify: false
|
||||
});
|
||||
|
||||
+15
-14
@@ -1,15 +1,15 @@
|
||||
'use strict'
|
||||
'use strict';
|
||||
|
||||
const path = require('path')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const resolve = require('rollup-plugin-node-resolve')
|
||||
const banner = require('./banner.js')
|
||||
const path = require('path');
|
||||
const babel = require('rollup-plugin-babel');
|
||||
const resolve = require('rollup-plugin-node-resolve');
|
||||
const banner = require('./banner.js');
|
||||
|
||||
const BUNDLE = process.env.BUNDLE === 'true'
|
||||
const ESM = process.env.ESM === 'true'
|
||||
const BUNDLE = process.env.BUNDLE === 'true';
|
||||
const ESM = process.env.ESM === 'true';
|
||||
|
||||
let fileDest = `tabler${ESM ? '.esm' : ''}`
|
||||
const external = ['popper.js']
|
||||
let fileDest = `tabler${ESM ? '.esm' : ''}`;
|
||||
const external = ['popper.js'];
|
||||
const plugins = [
|
||||
babel({
|
||||
// Only transpile our source code
|
||||
@@ -23,16 +23,17 @@ const plugins = [
|
||||
'objectSpread'
|
||||
]
|
||||
})
|
||||
]
|
||||
];
|
||||
|
||||
const globals = {
|
||||
'popper.js': 'Popper'
|
||||
}
|
||||
};
|
||||
|
||||
if (BUNDLE) {
|
||||
fileDest += '.bundle'
|
||||
fileDest += '.bundle';
|
||||
// Remove last entry in external array to bundle Popper
|
||||
external.pop()
|
||||
delete globals['popper.js']
|
||||
external.pop();
|
||||
delete globals['popper.js'];
|
||||
plugins.push(resolve())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user