2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-22 09:48:54 +00:00

Fix workspace links, redo Vue 2 demo to get rid of webpack

This commit is contained in:
Vjacheslav Trushkin 2022-06-19 21:52:07 +03:00
parent a478719a1e
commit a5d25ad8f9
27 changed files with 1197 additions and 1760 deletions

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
auto-install-peers=true
strict-peer-dependencies=false

View File

@ -1,2 +0,0 @@
> 1%
last 2 versions

View File

@ -1,24 +1,24 @@
.DS_Store # Logs
node_modules logs
/dist *.log
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files # Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea .idea
.vscode .DS_Store
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
# Vue 2 repo is outdated, hiding from repo to avoid Dependabot alerts
package-lock.json

View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}

View File

@ -1,24 +1,7 @@
# vue-demo # Vue 3 + Vite
## Project setup This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
```
npm install
```
### Compiles and hot-reloads for development ## Recommended IDE Setup
```
npm run serve
```
### Compiles and minifies for production - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@ -1,3 +0,0 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@ -1,10 +1,11 @@
{ {
"name": "@iconify-demo/vue2", "name": "vue2-demo",
"version": "1.0.2",
"private": true, "private": true,
"version": "0.0.0",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "dev": "vite",
"build": "vue-cli-service build" "build": "vite build",
"preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"vue": "^2.6.14", "vue": "^2.6.14",
@ -15,12 +16,7 @@
"@iconify-icons/bx": "^1.1.5", "@iconify-icons/bx": "^1.1.5",
"@iconify-icons/dashicons": "^1.1.1", "@iconify-icons/dashicons": "^1.1.1",
"@iconify/vue2": "workspace:*", "@iconify/vue2": "workspace:*",
"@vue/cli-plugin-babel": "^4.5.17", "vite": "^2.9.9",
"@vue/cli-plugin-typescript": "^4.5.17", "vite-plugin-vue2": "^2.0.1"
"@vue/cli-service": "^4.5.17",
"@vue/eslint-config-typescript": "^10.0.0",
"core-js": "^3.21.1",
"typescript": "^4.6.3",
"vue-template-compiler": "^2.6.14"
} }
} }

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -1,13 +0,0 @@
import Vue, { VNode } from "vue";
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any;
}
}
}

View File

@ -1,4 +0,0 @@
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}

View File

@ -1,39 +0,0 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}

View File

@ -0,0 +1,7 @@
import { defineConfig } from 'vite';
import { createVuePlugin } from 'vite-plugin-vue2';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [createVuePlugin()],
});

View File

@ -25,6 +25,7 @@
}, },
"devDependencies": { "devDependencies": {
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.1", "@rollup/plugin-typescript": "^8.3.1",

View File

@ -43,6 +43,7 @@ const emptyIcon: RenderResult = {
*/ */
export class IconifyIconComponent extends Component<IconifyIconProps> { export class IconifyIconComponent extends Component<IconifyIconProps> {
// Dummy variable to force re-render // Dummy variable to force re-render
// @ts-ignore
@tracked _counter = 0; @tracked _counter = 0;
// Currently visible icon data, null if rendering object // Currently visible icon data, null if rendering object

View File

@ -12,6 +12,7 @@
"esModuleInterop": true, "esModuleInterop": true,
"importsNotUsedAsValues": "error", "importsNotUsedAsValues": "error",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"experimentalDecorators": true "experimentalDecorators": true,
"skipLibCheck": true
} }
} }

View File

@ -52,6 +52,7 @@
"@babel/preset-env": "^7.16.11", "@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@types/react": "^17.0.41", "@types/react": "^17.0.41",

View File

@ -10,6 +10,7 @@
"moduleResolution": "node", "moduleResolution": "node",
"esModuleInterop": true, "esModuleInterop": true,
"importsNotUsedAsValues": "error", "importsNotUsedAsValues": "error",
"forceConsistentCasingInFileNames": true "forceConsistentCasingInFileNames": true,
"skipLibCheck": true
} }
} }

View File

@ -31,6 +31,7 @@
}, },
"devDependencies": { "devDependencies": {
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.1", "@rollup/plugin-typescript": "^8.3.1",

View File

@ -74,6 +74,7 @@
}, },
"devDependencies": { "devDependencies": {
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-buble": "^0.21.3", "@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",

View File

@ -48,6 +48,7 @@
"devDependencies": { "devDependencies": {
"@babel/preset-env": "^7.16.11", "@babel/preset-env": "^7.16.11",
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",

View File

@ -48,6 +48,7 @@
"devDependencies": { "devDependencies": {
"@babel/preset-env": "^7.16.11", "@babel/preset-env": "^7.16.11",
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",

View File

@ -55,7 +55,7 @@
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0", "eslint-plugin-qunit": "^7.2.0",
"iconify-icon": "workspace:*", "iconify-icon": "workspace:*",
"loader.js": "^4.7.0", "loader.js": "^4.7.0",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.6.1", "prettier": "^2.6.1",

View File

@ -55,6 +55,7 @@
}, },
"devDependencies": { "devDependencies": {
"@iconify/core": "workspace:^", "@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.19.5", "@microsoft/api-extractor": "^7.19.5",
"@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-replace": "^4.0.0",

View File

@ -17,5 +17,14 @@
"build": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run build", "build": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run build",
"test": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run test" "test": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run test"
}, },
"devDependencies": {} "devDependencies": {},
"pnpm": {
"packageExtensions": {
"vue-template-compiler": {
"peerDependencies": {
"vue": "^2.6.14"
}
}
}
}
} }

File diff suppressed because it is too large Load Diff