From 9775e147700a4836f06ef1f56ae8ef1fafad9c6a Mon Sep 17 00:00:00 2001 From: Justin Schroeder Date: Fri, 28 Feb 2020 10:46:08 -0500 Subject: [PATCH] Cleans up dependencies and bundles requirements in browser minified version --- README.md | 2 +- build/rollup.config.js | 17 +-- build/rollup.iife.config.js | 36 ++++++ dist/formulate.min.js | 16 ++- dist/snow.css | 30 +++-- dist/snow.min.css | 2 +- package-lock.json | 241 +++++++++++++++++++++++++++++------- package.json | 10 +- 8 files changed, 283 insertions(+), 71 deletions(-) create mode 100644 build/rollup.iife.config.js diff --git a/README.md b/README.md index 2648e80..bec1b01 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ npm GitHub - +

diff --git a/build/rollup.config.js b/build/rollup.config.js index d4c1fe2..1dc827f 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -1,3 +1,4 @@ +import autoExternal from 'rollup-plugin-auto-external' import commonjs from 'rollup-plugin-commonjs' // Convert CommonJS modules to ES6 import vue from 'rollup-plugin-vue' // Handle .vue SFC files import buble from 'rollup-plugin-buble' // Transpile/polyfill with reasonable browser support @@ -7,17 +8,17 @@ export default { input: 'src/Formulate.js', // Path relative to package.json output: { name: 'Formulate', - exports: 'named', - globals: { - 'is-plain-object': 'isPlainObject', - 'nanoid': 'nanoid', - 'is-url': 'isUrl', - 'clone-deep': 'cloneDeep' - } + exports: 'named' + // globals: { + // 'is-plain-object': 'isPlainObject', + // 'nanoid': 'nanoid', + // 'is-url': 'isUrl' + // } }, - external: ['is-plain-object', 'nanoid', 'is-url', 'clone-deep'], + // external: ['is-plain-object', 'nanoid', 'is-url'], plugins: [ commonjs(), + autoExternal(), vue({ css: true, // Dynamically inject css as a