diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4ca9ca9..8e9907e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -33,6 +33,9 @@ jobs:
- name: Build lucide package
run: yarn build
+ - name: Test lucide package
+ run: yarn test
+
# Build lucide-react
- name: Install Dependencies lucide-react
run: yarn --pure-lockfile
@@ -42,6 +45,23 @@ jobs:
run: yarn build
working-directory: packages/lucide-react
+ - name: Test lucide-react
+ run: yarn test
+ working-directory: packages/lucide-react
+
+ # Build lucide-vue
+ - name: Install Dependencies lucide-vue
+ run: yarn --pure-lockfile
+ working-directory: packages/lucide-vue
+
+ - name: Build lucide-vue
+ run: yarn build
+ working-directory: packages/lucide-vue
+
+ - name: Test lucide-vue
+ run: yarn test
+ working-directory: packages/lucide-vue
+
# Publish lucide
- name: Set package.json version lucide
run: yarn version --new-version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
@@ -58,10 +78,20 @@ jobs:
run: yarn publish
working-directory: packages/lucide-react
+ # Publish lucide-vue
+ - name: Set package.json version lucide-vue
+ run: yarn version --new-version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
+ working-directory: packages/lucide-vue
+
+ - name: publish lucide-vue
+ run: yarn publish
+ working-directory: packages/lucide-vue
+
- name: Commit package.json
run: |
git add package.json
git add packages/lucide-react/package.json
+ git add packages/lucide-vue/package.json
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
commit -m ":package: Bump version to ${{ steps.get_version.outputs.VERSION }}" --no-verify --quiet
git remote set-url --push origin https://lucide-bot:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
diff --git a/.npmignore b/.npmignore
index c645471..718d7e3 100644
--- a/.npmignore
+++ b/.npmignore
@@ -5,3 +5,12 @@ node_modules
tests
scripts
site
+src
+build
+babel.config.js
+categories.json
+jest.config.js
+netlify.toml
+rollup.config.js
+rollup.plugins.js
+tags.json
diff --git a/icons/image-plus.svg b/icons/image-plus.svg
index 885da77..23a865c 100644
--- a/icons/image-plus.svg
+++ b/icons/image-plus.svg
@@ -9,9 +9,9 @@
stroke-linecap="round"
stroke-linejoin="round"
>
-
-
-
-
-
+
+
+
+
+
diff --git a/icons/pencil.svg b/icons/pencil.svg
index f3a5367..39c42d2 100644
--- a/icons/pencil.svg
+++ b/icons/pencil.svg
@@ -1,8 +1,8 @@
diff --git a/icons/webcam.svg b/icons/webcam.svg
index 3faa43d..a8a5047 100644
--- a/icons/webcam.svg
+++ b/icons/webcam.svg
@@ -9,7 +9,7 @@
stroke-linecap="round"
stroke-linejoin="round"
>
-
-
-
+
+
+
diff --git a/package.json b/package.json
index 9808aca..6556cbc 100644
--- a/package.json
+++ b/package.json
@@ -4,9 +4,10 @@
"version": "0.13.0",
"license": "ISC",
"homepage": "https://lucide.dev",
- "repository": "github:lucide-icons/lucide",
- "bugs": {
- "url": "https://github.com/lucide-icons/lucide/issues"
+ "bugs": "https://github.com/lucide-icons/lucide/issues",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/lucide-icons/lucide.git"
},
"amdName": "lucide",
"source": "build/lucide.js",
diff --git a/packages/lucide-react/.npmignore b/packages/lucide-react/.npmignore
new file mode 100644
index 0000000..ffd9d70
--- /dev/null
+++ b/packages/lucide-react/.npmignore
@@ -0,0 +1,9 @@
+stats
+node_modules
+tests
+scripts
+build
+src
+babel.config.js
+jest.config.js
+rollup.config.js
diff --git a/packages/lucide-react/README.md b/packages/lucide-react/README.md
index b149175..40fdbf8 100644
--- a/packages/lucide-react/README.md
+++ b/packages/lucide-react/README.md
@@ -15,7 +15,7 @@ npm install lucide-react
## How to use
It's build with ESmodules so it's completely threeshakable.
-Each icon can be imported as an react component.
+Each icon can be imported as a react component.
### Example
@@ -56,7 +56,7 @@ const App = () => {
It is possible to create one generic icon component to load icons.
-> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers.
+> :warning: Example below importing all EsModules, caution using this example, not recommended when you using bundlers, your application build size will grow strongly.
#### Icon Component Example
diff --git a/packages/lucide-react/babel.config.js b/packages/lucide-react/babel.config.js
index 80d39f0..2f82d5c 100644
--- a/packages/lucide-react/babel.config.js
+++ b/packages/lucide-react/babel.config.js
@@ -1,4 +1,3 @@
-// module.exports = require('../../babel.config');
module.exports = {
presets: ['react-app'],
};
diff --git a/packages/lucide-react/package.json b/packages/lucide-react/package.json
index ea3c4b2..a010034 100644
--- a/packages/lucide-react/package.json
+++ b/packages/lucide-react/package.json
@@ -3,35 +3,39 @@
"description": "Lucide React package, Lucide is a community-run fork of Feather Icons, open for anyone to contribute icons.",
"version": "0.13.0",
"license": "ISC",
+ "homepage": "https://lucide.dev",
+ "bugs": "https://github.com/lucide-icons/lucide/issues",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/lucide-icons/lucide.git",
+ "directory": "packages/lucide-react"
+ },
+ "author": "Eric Fennis",
"amdName": "lucide-react",
- "source": "build/lucide-react.js",
"main": "dist/cjs/lucide-react.js",
"main:umd": "dist/umd/lucide-react.js",
"module": "dist/esm/lucide-react.js",
"unpkg": "dist/umd/lucide-react.min.js",
- "repository": "github:lucide-icons/lucide",
- "author": "Eric Fennis",
"scripts": {
"build": "yarn clean && yarn build:move && yarn build:icons && yarn build:es && yarn build:bundles",
"clean": "rm -rf dist && rm -rf build",
"build:move": "cp -av src build",
- "build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-react/build --templateSrc=../packages/lucide-react/scripts/exportTemplate --camelizeAttrs --renderUniqueKey",
+ "build:icons": "yarn --cwd ../../ build:icons --output=../packages/lucide-react/build --templateSrc=../packages/lucide-react/scripts/exportTemplate --camelizeAttrs --noDefaultAttrs --renderUniqueKey",
"build:es": "yarn --cwd ../../ babel packages/lucide-react/build -d packages/lucide-react/dist/esm",
"build:bundles": "yarn --cwd ../../ rollup -c packages/lucide-react/rollup.config.js",
"test": "jest"
},
"dependencies": {
"prop-types": "^15.7.2",
- "react": "^17.0.1"
+ "react": "^16.5.1"
},
"devDependencies": {
"babel-preset-react-app": "^10.0.0",
"jest": "^26.6.3",
- "lucide": "file:../..",
- "react-test-renderer": "^17.0.1"
+ "react-test-renderer": "^16.5.1"
},
"peerDependencies": {
"prop-types": "^15.7.2",
- "react": "^17.0.1"
+ "react": "^16.5.1"
}
}
diff --git a/packages/lucide-react/rollup.config.js b/packages/lucide-react/rollup.config.js
index 2b5689a..093dc38 100644
--- a/packages/lucide-react/rollup.config.js
+++ b/packages/lucide-react/rollup.config.js
@@ -1,7 +1,8 @@
-const plugins = require('lucide/rollup.plugins');
+const plugins = require('../../rollup.plugins');
const pkg = require('./package.json');
-const outputFileName = pkg.name;
+const packageName = 'LucideReact';
+const outputFileName = 'lucide-react';
const rootDir = 'packages/lucide-react'; // It runs from the root
const outputDir = `${rootDir}/dist`;
const inputs = [`${rootDir}/build/lucide-react.js`];
@@ -31,7 +32,7 @@ const configs = bundles
plugins: plugins(pkg, minify),
external: ['react', 'prop-types'],
output: {
- name: outputFileName,
+ name: packageName,
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`,
format,
sourcemap: true,
diff --git a/packages/lucide-react/scripts/exportTemplate.js b/packages/lucide-react/scripts/exportTemplate.js
index ce62851..d994723 100644
--- a/packages/lucide-react/scripts/exportTemplate.js
+++ b/packages/lucide-react/scripts/exportTemplate.js
@@ -1,7 +1,8 @@
export default ({ componentName, node }) => `
import createReactComponent from '../createReactComponent';
+import defaultAttributes from '../defaultAttributes';
-const ${componentName} = createReactComponent('${componentName}', ${node});
+const ${componentName} = createReactComponent('${componentName}', ['svg', defaultAttributes, ${node}]);
export default ${componentName};
`;
diff --git a/packages/lucide-react/src/createReactComponent.js b/packages/lucide-react/src/createReactComponent.js
index ee454c6..f1b7e54 100644
--- a/packages/lucide-react/src/createReactComponent.js
+++ b/packages/lucide-react/src/createReactComponent.js
@@ -11,7 +11,7 @@ export default (iconName, [tag, attrs, children]) => {
...attrs,
width: size,
height: size,
- color,
+ stroke: color,
strokeWidth,
...rest,
},
diff --git a/packages/lucide-react/src/defaultAttributes.js b/packages/lucide-react/src/defaultAttributes.js
new file mode 100644
index 0000000..ce97fb0
--- /dev/null
+++ b/packages/lucide-react/src/defaultAttributes.js
@@ -0,0 +1,11 @@
+export default {
+ xmlns: 'http://www.w3.org/2000/svg',
+ width: 24,
+ height: 24,
+ viewBox: '0 0 24 24',
+ fill: 'none',
+ stroke: 'currentColor',
+ strokeWidth: 2,
+ strokeLinecap: 'round',
+ strokeLinejoin: 'round',
+};
diff --git a/packages/lucide-react/tests/__snapshots__/lucide-react.spec.js.snap b/packages/lucide-react/tests/__snapshots__/lucide-react.spec.js.snap
index 8cde9b0..ff6b8bd 100644
--- a/packages/lucide-react/tests/__snapshots__/lucide-react.spec.js.snap
+++ b/packages/lucide-react/tests/__snapshots__/lucide-react.spec.js.snap
@@ -2,7 +2,6 @@
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `