mirror of
https://github.com/iconify/iconify.git
synced 2025-01-05 15:02:09 +00:00
Update directory structure in packages and readme
This commit is contained in:
parent
7e2c345d7b
commit
fdd716846a
62
README.md
62
README.md
@ -38,32 +38,56 @@ This makes it possible to have an unlimited choice of icons!
|
||||
|
||||
## Available packages
|
||||
|
||||
There are several Iconify components included in this repository:
|
||||
There are several types of packages, split in their own directories.
|
||||
|
||||
| Implementation | Usage |
|
||||
| -------------------------------------- | ------------------------- |
|
||||
| [SVG Framework](./packages/iconify/) | HTML |
|
||||
| [React component](./packages/react/) | React, Next.js |
|
||||
| [Vue 3 component](./packages/vue/) | Vue 3 |
|
||||
| [Vue 2 component](./packages/vue2/) | Vue 2 |
|
||||
| [Svelte component](./packages/svelte/) | Svelte, SvelteKit, Sapper |
|
||||
| [Ember component](./packages/ember/) | Ember |
|
||||
### Main packages
|
||||
|
||||
Other packages:
|
||||
Directory `packages` contains main packages that are reusable by all other packages in this repository as well as third party components.
|
||||
|
||||
Main packages:
|
||||
|
||||
- [Iconify types](./packages/types/) - TypeScript types.
|
||||
- [Iconify utils](./packages/utils/) - common files used by various Iconify projects (including tools, API, etc...).
|
||||
- [Iconify core](./packages/core/) - common files used by various components.
|
||||
- [API redundancy](./packages/api-redundancy/) - library for managing redundancies for loading data from API: handling timeouts, rotating hosts.
|
||||
- [React demo](./demo/react-demo/) - demo for React component. Run `npm start` to start demo.
|
||||
- [Next.js demo](./demo/nextjs-demo/) - demo for React component with Next.js. Run `npm run build` to build it and `npm start` to start demo.
|
||||
- [Vue 3 demo](./demo/vue-demo/) - demo for Vue component. Run `npm run dev` to start demo.
|
||||
- [Vue 2 demo](./demo/vue2-demo/) - demo for Vue component. Run `npm run dev` to start demo.
|
||||
- [Svelte demo](./demo/svelte-demo/) - demo for Svelte component. Run `npm run dev` to start demo.
|
||||
- [Svelte demo with Vite](./demo/svelte-demo-vite/) - demo for Svelte component using Vite. Run `npm run dev` to start demo.
|
||||
- [Sapper demo](./demo/sapper-demo/) - demo for Sapper, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo (deprecated, use SvelteKit instead of Sapper).
|
||||
- [SvelteKit demo](./demo/sveltekit-demo/) - demo for SvelteKit, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo.
|
||||
- [Ember demo](./demo/ember-demo/) - demo for Ember component. Run `npm run start` to start demo.
|
||||
|
||||
### Iconify icon components
|
||||
|
||||
Directory `component` contains Iconify icon components and SVG framework.
|
||||
|
||||
| Icon component | Usage |
|
||||
| ---------------------------------------- | ------ |
|
||||
| [SVG Framework](./components/iconify/) | HTML |
|
||||
| [React component](./components/react/) | React |
|
||||
| [Vue 3 component](./components/vue/) | Vue 3 |
|
||||
| [Vue 2 component](./components/vue2/) | Vue 2 |
|
||||
| [Svelte component](./components/svelte/) | Svelte |
|
||||
| [Ember component](./components/ember/) | Ember |
|
||||
|
||||
#### Demo
|
||||
|
||||
Directory `components-demo` contains demo packages that show usage of icon components.
|
||||
|
||||
- [React demo](./components-demo/react-demo/) - demo for React component. Run `npm run dev` to start demo.
|
||||
- [Next.js demo](./components-demo/nextjs-demo/) - demo for React component with Next.js. Run `npm run dev` to start demo.
|
||||
- [Vue 3 demo](./components-demo/vue-demo/) - demo for Vue 3 component. Run `npm run dev` to start demo.
|
||||
- [Nuxt 3 demo](./components-demo/nuxt3-demo/) - demo for Vue 3 component with Nuxt. Run `npm run dev` to start demo.
|
||||
- [Vue 2 demo](./components-demo/vue2-demo/) - demo for Vue 2 component. Run `npm run build` to build demo and `npm run serve` to start it.
|
||||
- [Svelte demo](./components-demo/svelte-demo/) - demo for Svelte component. Run `npm run dev` to start demo.
|
||||
- [Svelte demo with Vite](./components-demo/svelte-demo-vite/) - demo for Svelte component using Vite. Run `npm run dev` to start demo.
|
||||
- [Sapper demo](./components-demo/sapper-demo/) - demo for Sapper, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo (deprecated, use SvelteKit instead of Sapper).
|
||||
- [SvelteKit demo](./components-demo/sveltekit-demo/) - demo for SvelteKit, using Svelte component on the server and in the browser. Run `npm run dev` to start the demo.
|
||||
- [Ember demo](./components-demo/ember-demo/) - demo for Ember component. Run `npm run build` to build demo and `npm run start` to start it.
|
||||
|
||||
### IconifyIcon
|
||||
|
||||
Directory `iconify-icon` contains `iconify-icon` web component and wrappers for various frameworks.
|
||||
|
||||
- [IconifyIcon web component](./iconify-icon/icon/) - `iconify-icon` web component.
|
||||
|
||||
#### Demo
|
||||
|
||||
Directory `iconify-icon-demo` will contain demo packages that show usage of `iconify-icon` web component.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -58,7 +58,7 @@ const fileExists = (file) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.lib && !fileExists(packagesDir + '/core/lib/cache.mjs')) {
|
||||
if (compile.lib && !fileExists(coreDir + '/lib/cache.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/ember"
|
||||
"directory": "components/ember"
|
||||
},
|
||||
"keywords": [
|
||||
"ember-addon"
|
||||
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -64,15 +64,15 @@ const fileExists = (file) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.dist && !fileExists(packagesDir + '/react/lib/icon.js')) {
|
||||
if (compile.dist && !fileExists('./lib/icon.js')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.api && !fileExists(packagesDir + '/react/lib/icon.d.ts')) {
|
||||
if (compile.api && !fileExists('./lib/icon.d.ts')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.lib && !fileExists(packagesDir + '/core/lib/cache.mjs')) {
|
||||
if (compile.lib && !fileExists(coreDir + '/lib/cache.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/react"
|
||||
"directory": "components/react"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf lib dist tsconfig.tsbuildinfo",
|
||||
|
@ -2,7 +2,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -61,7 +61,7 @@ const fileExists = (file) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.dist && !fileExists(packagesDir + '/core/lib/modules.mjs')) {
|
||||
if (compile.dist && !fileExists(coreDir + '/lib/modules.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/svelte"
|
||||
"directory": "components/svelte"
|
||||
},
|
||||
"svelte": "dist/Icon.svelte",
|
||||
"module": "dist/index.mjs",
|
||||
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -57,15 +57,15 @@ const fileExists = (file) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.dist && !fileExists(packagesDir + '/iconify/lib/iconify.js')) {
|
||||
if (compile.dist && !fileExists('./lib/iconify.js')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.api && !fileExists(packagesDir + '/iconify/lib/iconify.d.ts')) {
|
||||
if (compile.api && !fileExists('./lib/iconify.d.ts')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.lib && !fileExists(packagesDir + '/core/lib/cache.mjs')) {
|
||||
if (compile.lib && !fileExists(coreDir + '/lib/cache.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/iconify"
|
||||
"directory": "components/svg-framework"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf lib dist tests-compiled tsconfig.tsbuildinfo",
|
||||
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -57,15 +57,15 @@ const fileExists = (file) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.dist && !fileExists(packagesDir + '/vue/lib/IconifyIcon.js')) {
|
||||
if (compile.dist && !fileExists('./lib/IconifyIcon.js')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.api && !fileExists(packagesDir + '/vue/lib/IconifyIcon.d.ts')) {
|
||||
if (compile.api && !fileExists('./lib/IconifyIcon.d.ts')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.lib && !fileExists(packagesDir + '/core/lib/cache.mjs')) {
|
||||
if (compile.lib && !fileExists(coreDir + '/lib/cache.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/vue"
|
||||
"directory": "components/vue"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build",
|
||||
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const packagesDir = path.dirname(__dirname);
|
||||
const coreDir = path.dirname(require.resolve('@iconify/core/package.json'));
|
||||
|
||||
// List of commands to run
|
||||
const commands = [];
|
||||
@ -57,15 +57,15 @@ const fileExists = file => {
|
||||
return true;
|
||||
};
|
||||
|
||||
if (compile.dist && !fileExists(packagesDir + '/vue/lib/IconifyIcon.js')) {
|
||||
if (compile.dist && !fileExists('./lib/IconifyIcon.js')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.api && !fileExists(packagesDir + '/vue/lib/IconifyIcon.d.ts')) {
|
||||
if (compile.api && !fileExists('./lib/IconifyIcon.d.ts')) {
|
||||
compile.lib = true;
|
||||
}
|
||||
|
||||
if (compile.lib && !fileExists(packagesDir + '/core/lib/cache.mjs')) {
|
||||
if (compile.lib && !fileExists(coreDir + '/lib/cache.mjs')) {
|
||||
compile.core = true;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ if (compile.core) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: packagesDir + '/core',
|
||||
cwd: coreDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/vue2"
|
||||
"directory": "components/vue2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build",
|
||||
|
@ -14,7 +14,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/iconify/iconify.git",
|
||||
"directory": "packages/icon"
|
||||
"directory": "iconify-icon/icon"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf lib dist tsconfig.tsbuildinfo",
|
||||
|
2
packages/api-redundancy/package-lock.json
generated
2
packages/api-redundancy/package-lock.json
generated
@ -7,7 +7,7 @@
|
||||
"": {
|
||||
"name": "@iconify/api-redundancy",
|
||||
"version": "1.1.0",
|
||||
"license": "(Apache-2.0 OR GPL-2.0)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^17.0.22",
|
||||
|
Loading…
Reference in New Issue
Block a user