feat(components): Added pan and zoom to Workbench. Closes #368
This commit is contained in:
parent
b53615aea0
commit
054b7565e6
9 changed files with 397 additions and 91 deletions
|
@ -1,17 +1,17 @@
|
|||
import babel from "rollup-plugin-babel";
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import json from "rollup-plugin-json";
|
||||
import minify from "rollup-plugin-babel-minify";
|
||||
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
||||
import { name, version, description, author, license } from "./package.json";
|
||||
import components from "./src/index.js";
|
||||
import babel from 'rollup-plugin-babel'
|
||||
import resolve from 'rollup-plugin-node-resolve'
|
||||
import json from 'rollup-plugin-json'
|
||||
import minify from 'rollup-plugin-babel-minify'
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
||||
import { name, version, description, author, license } from './package.json'
|
||||
import components from './src/index.js'
|
||||
|
||||
const createConfig = (component, module) => {
|
||||
return {
|
||||
input: `./src/${component + "/"}index.js`,
|
||||
input: `./src/${component + '/'}index.js`,
|
||||
output: {
|
||||
file: `./${component}/index` + (module ? ".mjs" : ".js"),
|
||||
format: module ? "es" : "cjs",
|
||||
file: `./${component}/index` + (module ? '.mjs' : '.js'),
|
||||
format: module ? 'es' : 'cjs',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
|
@ -19,8 +19,8 @@ const createConfig = (component, module) => {
|
|||
resolve({ modulesOnly: true }),
|
||||
json(),
|
||||
babel({
|
||||
exclude: "node_modules/**",
|
||||
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
||||
exclude: 'node_modules/**',
|
||||
plugins: ['@babel/plugin-proposal-object-rest-spread']
|
||||
}),
|
||||
minify({
|
||||
comments: false,
|
||||
|
@ -28,13 +28,16 @@ const createConfig = (component, module) => {
|
|||
banner: `/**\n * ${name}/${component} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
})
|
||||
]
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const config = [];
|
||||
const config = []
|
||||
// When developing, you can use this to only rebuild the components you're working on
|
||||
let dev = false
|
||||
let only = ['Workbench']
|
||||
for (let component of components) {
|
||||
config.push(createConfig(component, false));
|
||||
if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false))
|
||||
// Webpack doesn't handle .mjs very well
|
||||
//config.push(createConfig(component, true));
|
||||
}
|
||||
export default config;
|
||||
export default config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue