@bigbinary/neeto-icons 1.9.6 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,6 +39,6 @@ Anywhere in your React file
39
39
  ### Build process
40
40
 
41
41
  - Running `yarn build` will invoke the `yarn generate` script first, which will generate React components from `.svg` files.
42
- - Once `yarn generate` is done, it'll invoke `yarn rollup-compile` which uses `lib/index.js` as the entry point to create a bundle (`dist/neeto-icons.js`).
42
+ - Once `yarn generate` is done, it'll invoke `yarn rollup-compile` which uses `index.js` of the icons sets inside `lib` as the entry point to create respective bundles (`dist/neeto-icons.js`,`dist/app-icons.js`,`dist/logos.js`).
43
43
  - We use the generated bundle as the `main` file in `package.json` for using it as a package.
44
44
  - Running the `yarn start` will run the preview in local.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-icons",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "main": "./dist/neeto-icons.js",
5
5
  "author": "vinay0x",
6
6
  "license": "MIT",
@@ -1,20 +0,0 @@
1
- name: deploy production website
2
- on:
3
- push:
4
- branches:
5
- - main
6
- jobs:
7
- deploy:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- - uses: amondnet/vercel-action@v20
12
- with:
13
- github-comment: true
14
- vercel-token: ${{ secrets.VERCEL_TOKEN }}
15
- vercel-org-id: ${{ secrets.ORG_ID}}
16
- scope: ${{ secrets.ORG_ID}}
17
- github-token: ${{ secrets.GITHUB_TOKEN }}
18
- vercel-project-id: ${{ secrets.PROJECT_ID}}
19
- working-directory: ./
20
- vercel-args: --prod
@@ -1,34 +0,0 @@
1
- name: "Publish npm package"
2
- on:
3
- pull_request:
4
- branches:
5
- - main
6
- types: [closed]
7
- jobs:
8
- publish:
9
- name: "Publish Package"
10
- runs-on: macos-latest
11
- if: ${{ github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
12
- steps:
13
- - uses: actions/checkout@v2.2.0
14
- - uses: actions/setup-node@v2
15
- with:
16
- node-version: "14"
17
- - name: Bump version
18
- run: yarn version --patch --no-git-tag-version
19
- - uses: EndBug/add-and-commit@v7
20
- with:
21
- branch: main
22
- message: "New version release"
23
- push: false
24
- - name: Push changes
25
- uses: ad-m/github-push-action@master
26
- with:
27
- github_token: ${{ secrets.GITHUB_TOKEN }}
28
- force: true
29
- - run: yarn install
30
- - name: "Publish"
31
- uses: JS-DevTools/npm-publish@v1
32
- id: publish
33
- with:
34
- token: ${{ secrets.NPM_TOKEN }}
@@ -1,3 +0,0 @@
1
- {
2
- "svg.preview.background": "white"
3
- }
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
5
- <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
- <title>neetoIcons</title>
9
- </head>
10
- <body>
11
- <div id="root"></div>
12
- </body>
13
- </html>
@@ -1,52 +0,0 @@
1
- import React from "react";
2
-
3
- export default function Header({ searchTerm, setSearchTerm }) {
4
- return (
5
- <>
6
- <header className="flex items-center justify-between px-8 py-4">
7
- <div>
8
- <h1 className="text-2xl font-bold">neetoIcons</h1>
9
- <div className="text-sm text-gray-500">
10
- Click on an icon to copy the name.
11
- </div>
12
- </div>
13
- <div className="flex items-center">
14
- <a
15
- href="https://github.com/bigbinary/neeto-icons#usage"
16
- target="_blank"
17
- rel="noreferrer"
18
- className="flex items-center space-x-0.5 text-sm font-medium text-gray-600 hover:text-gray-900 mr-5"
19
- >
20
- Usage
21
- </a>
22
- <a
23
- href="https://github.com/bigbinary/neeto-icons"
24
- target="_blank"
25
- rel="noreferrer"
26
- className="flex items-center space-x-0.5 text-sm font-medium text-gray-600 hover:text-gray-900 mr-8"
27
- >
28
- <svg
29
- xmlns="http://www.w3.org/2000/svg"
30
- viewBox="0 0 24 24"
31
- width="18"
32
- height="18"
33
- >
34
- <path fill="none" d="M0 0h24v24H0z" />
35
- <path
36
- fill="currentColor"
37
- d="M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476 0-.237-.013-1.024-.013-1.862-2.512.463-3.162-.612-3.362-1.175-.113-.288-.6-1.175-1.025-1.413-.35-.187-.85-.65-.013-.662.788-.013 1.35.725 1.538 1.025.9 1.512 2.338 1.087 2.912.825.088-.65.35-1.087.638-1.337-2.225-.25-4.55-1.113-4.55-4.938 0-1.088.387-1.987 1.025-2.688-.1-.25-.45-1.275.1-2.65 0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337 1.912-1.3 2.75-1.024 2.75-1.024.55 1.375.2 2.4.1 2.65.637.7 1.025 1.587 1.025 2.687 0 3.838-2.337 4.688-4.562 4.938.362.312.675.912.675 1.85 0 1.337-.013 2.412-.013 2.75 0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z"
38
- />
39
- </svg>
40
- <span>Source</span>
41
- </a>
42
- <input
43
- placeholder="Search for an icon"
44
- value={searchTerm}
45
- onChange={(e) => setSearchTerm(e.target.value)}
46
- className="px-4 py-2 text-sm rounded w-72 bg-gray-50 focus:outline-none focus:bg-gray-100"
47
- />
48
- </div>
49
- </header>
50
- </>
51
- );
52
- }
@@ -1,31 +0,0 @@
1
- import React from "react";
2
-
3
- import copy from "copy-to-clipboard";
4
- import toast from "react-hot-toast";
5
-
6
- import * as Icons from "../../../../lib";
7
-
8
- export default function IconItem({ name, Icon }) {
9
- const copyName = () => {
10
- copy(name);
11
- toast(`${name} has been copied to clipboard.`, {
12
- icon: "🎉",
13
- style: {
14
- borderRadius: "4px",
15
- background: "#1e1e20",
16
- color: "#fff",
17
- padding: "4px 8px",
18
- fontSize: 14,
19
- },
20
- });
21
- };
22
- return (
23
- <div
24
- onClick={copyName}
25
- className="flex flex-col items-center justify-center col-span-1 p-8 transition-all transform bg-white border rounded cursor-pointer hover:bg-gray-100"
26
- >
27
- <Icon size={24} color="#68737D" />
28
- <div className="mt-2 text-xs text-gray-700">{name}</div>
29
- </div>
30
- );
31
- }
@@ -1,18 +0,0 @@
1
- import React from "react";
2
-
3
- import IconItem from "./IconItem";
4
-
5
- export default function IconsList({ searchTerm, icons, listName }) {
6
- const filteredIconsList = Object.keys(icons).filter((name) =>
7
- name.toLowerCase().includes(searchTerm.toLowerCase())
8
- );
9
- return filteredIconsList.length === 0 ? (
10
- <div className="px-8 text-sm text-gray-600">No {listName} found.</div>
11
- ) : (
12
- <div className="grid w-full grid-cols-3 gap-4 px-8 py-4 md:grid-cols-6 lg:grid-cols-10">
13
- {filteredIconsList.map((key) => (
14
- <IconItem key={key} Icon={icons[key]} name={key} />
15
- ))}
16
- </div>
17
- );
18
- }
@@ -1,25 +0,0 @@
1
- import React, { useState } from "react";
2
- import Header from "./Header";
3
- import IconsList from "./IconsList";
4
- import { Toaster } from "react-hot-toast";
5
- import * as icons from "../../../lib/icons";
6
- import * as logos from "../../../lib/logos";
7
- import * as appIcons from "../../../lib/app-icons";
8
-
9
- function Dashboard() {
10
- const [searchTerm, setSearchTerm] = useState("");
11
- return (
12
- <>
13
- <Toaster position="bottom-center" />
14
- <Header searchTerm={searchTerm} setSearchTerm={setSearchTerm} />
15
- <h2 className="px-8 pt-4">Icons</h2>
16
- <IconsList searchTerm={searchTerm} icons={icons} listName="icons" />
17
- <h2 className="px-8 pt-4">Logos</h2>
18
- <IconsList searchTerm={searchTerm} icons={logos} listName="logos" />
19
- <h2 className="px-8 pt-4">App Icons</h2>
20
- <IconsList searchTerm={searchTerm} icons={appIcons} listName="appIcons" />
21
- </>
22
- );
23
- }
24
-
25
- export default Dashboard;
@@ -1,11 +0,0 @@
1
- @tailwind base;
2
- @tailwind utilities;
3
-
4
- body {
5
- margin: 0;
6
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
7
- "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
8
- sans-serif;
9
- -webkit-font-smoothing: antialiased;
10
- -moz-osx-font-smoothing: grayscale;
11
- }
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import ReactDOM from "react-dom";
3
-
4
- import Dashboard from "./Dashboard";
5
- import "./index.css";
6
-
7
- ReactDOM.render(
8
- <React.StrictMode>
9
- <Dashboard />
10
- </React.StrictMode>,
11
- document.getElementById("root")
12
- );
package/rollup.config.js DELETED
@@ -1,61 +0,0 @@
1
- import path from "path";
2
- import glob from "glob";
3
- import commonjs from "@rollup/plugin-commonjs";
4
- import resolve from "@rollup/plugin-node-resolve";
5
- import analyze from "rollup-plugin-analyzer";
6
- import babel from "rollup-plugin-babel";
7
- import cleaner from "rollup-plugin-cleaner";
8
- import { terser } from "rollup-plugin-terser";
9
-
10
- const DIST_PATH = path.resolve(__dirname, "dist");
11
- export const extensions = [".js", ".jsx"];
12
-
13
- // Compile index & compile separately every elements exported by it.
14
- const input = Object.fromEntries([
15
- ["neeto-icons", "./lib/icons/index.js"],
16
- ["neeto-logos", "./lib/logos/index.js"],
17
- ["app-icons", "./lib/app-icons/index.js"],
18
- ...glob.sync("./lib/icons/*").map((componentPath) => {
19
- const componentName = path.basename(componentPath);
20
- return [componentName, componentPath];
21
- }),
22
- ]);
23
-
24
- // Export non index chunks in `esm/_internal` (enables tree shaking but detracts user from importing them directly).
25
- const renameFile = (info) => {
26
- let name = info.name;
27
- if (!["neeto-icons", "neeto-logos", "app-icons"].includes(name)) {
28
- name = `_internal/${name}`;
29
- }
30
- return `${name}.js`;
31
- };
32
-
33
- export default {
34
- input,
35
- output: {
36
- format: "esm",
37
- sourcemap: true,
38
- dir: path.join(DIST_PATH),
39
- chunkFileNames: renameFile,
40
- entryFileNames: renameFile,
41
- },
42
- plugins: [
43
- // Clean dist dir
44
- cleaner({ targets: [DIST_PATH] }),
45
- // Analyze created bundle.
46
- analyze(),
47
- // Resolve source files.
48
- resolve({ browser: true, extensions }),
49
- // Resolve commonjs dependencies.
50
- commonjs({ include: /node_modules/ }),
51
- babel({
52
- extensions,
53
- exclude: /node_modules/,
54
- presets: [
55
- ["@babel/preset-env", { targets: "defaults" }],
56
- "@babel/preset-react",
57
- ],
58
- }),
59
- terser(),
60
- ],
61
- };
package/vercel.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "git": {
3
- "deploymentEnabled": {
4
- "main": false
5
- }
6
- }
7
- }
@@ -1,74 +0,0 @@
1
- const path = require("path");
2
- const HtmlWebPackPlugin = require("html-webpack-plugin");
3
-
4
- module.exports = {
5
- entry: "./example/src/index.js",
6
- devtool: "eval-cheap-source-map",
7
- module: {
8
- rules: [
9
- {
10
- test: /\.md$/i,
11
- use: "raw-loader",
12
- },
13
- {
14
- test: /\.(js|jsx)$/,
15
- exclude: /node_modules/,
16
- include: [path.resolve(__dirname, "example")],
17
- use: [
18
- {
19
- loader: "babel-loader",
20
- },
21
- ],
22
- },
23
- {
24
- test: /\.(js|jsx)$/,
25
- exclude: /node_modules/,
26
- include: [path.resolve(__dirname, "lib")],
27
- use: [
28
- {
29
- loader: "babel-loader",
30
- },
31
- ],
32
- },
33
- {
34
- test: /\.html$/,
35
- use: [
36
- {
37
- loader: "html-loader",
38
- },
39
- ],
40
- },
41
- {
42
- test: /\.(png|jpe?g|gif|svg)$/i,
43
- use: [
44
- {
45
- loader: "file-loader",
46
- },
47
- ],
48
- },
49
- {
50
- test: /\.s[ac]ss|css$/i,
51
- use: [
52
- // Creates `style` nodes from JS strings
53
- "style-loader",
54
- // Translates CSS into CommonJS
55
- "css-loader",
56
- ],
57
- },
58
- ],
59
- },
60
- output: {
61
- path: __dirname + "/preview",
62
- filename: "bundle.js",
63
- publicPath: "/",
64
- },
65
- devServer: {
66
- historyApiFallback: true,
67
- },
68
- plugins: [
69
- new HtmlWebPackPlugin({
70
- template: "./example/index.html",
71
- filename: "./index.html",
72
- }),
73
- ],
74
- };