From eb9dc6451ee36bdefd4a3a24a54da5af6d903cb5 Mon Sep 17 00:00:00 2001 From: Zaahir Moolla Date: Mon, 23 Dec 2019 21:19:13 -0500 Subject: [PATCH] Fix custom-element warnings (#1) * Add rollup; Fix custom-element warnings * Fix root dir path * Remove custom element tag, and svelte option Do we really need this? * Cleanup package.json * Update lockfiles --- .gitignore | 4 +- .npmignore | 1 - bin/build.js => build.js | 8 +- package-lock.json | 324 ++++++++++++++++++++++++++++++++++++++- package.json | 68 ++++---- rollup.config.js | 23 +++ yarn.lock | 259 +++++++++++++++++++++++++++++++ 7 files changed, 652 insertions(+), 35 deletions(-) rename bin/build.js => build.js (92%) create mode 100644 rollup.config.js diff --git a/.gitignore b/.gitignore index f619ada..b083985 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store node_modules +index.js +index.mjs src -.DS_Store diff --git a/.npmignore b/.npmignore index 9ecd1ad..05dd694 100755 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1 @@ -bin svg diff --git a/bin/build.js b/build.js similarity index 92% rename from bin/build.js rename to build.js index 1393ee7..73c8a3f 100755 --- a/bin/build.js +++ b/build.js @@ -10,7 +10,7 @@ const getComponentName = name => { return pascalCase(name) }; -const rootDir = path.join(__dirname, ".."); +const rootDir = path.join(__dirname); const svgDir = path.join(rootDir, "./svg"); const iconsDir = path.join(rootDir, "./src/icons"); @@ -36,8 +36,7 @@ if (!fs.existsSync(iconsDir)) { const str = icons[name]; const componentName = getComponentName(name); indexContent += `export { default as ${componentName}Icon } from './icons/${componentName}.svelte';\n`; - const componentContent = `\n -