Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/24jieqi/icon
🎨 SVG Icons.
https://github.com/24jieqi/icon
react react-native svg-icons taro
Last synced: about 2 months ago
JSON representation
🎨 SVG Icons.
- Host: GitHub
- URL: https://github.com/24jieqi/icon
- Owner: 24jieqi
- Created: 2022-05-10T09:29:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-11T08:55:45.000Z (7 months ago)
- Last Synced: 2024-10-28T22:43:57.628Z (2 months ago)
- Topics: react, react-native, svg-icons, taro
- Language: TypeScript
- Homepage: https://24jieqi.github.io/icon/
- Size: 3.51 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🎨 SVG Icons.## React
[icon-react-npm-url]: https://www.npmjs.com/package/@fruits-chain/icons-react
[![](https://img.shields.io/npm/v/@fruits-chain/icons-react.svg)][icon-react-npm-url]
[![](https://img.shields.io/npm/dm/@fruits-chain/icons-react.svg)][icon-react-npm-url]
[![](https://img.shields.io/badge/language-typescript-blue.svg)](https://www.typescriptlang.org/)
[![install size](https://packagephobia.com/badge?p=@fruits-chain/icons-react)](https://packagephobia.com/result?p=@fruits-chain/icons-react)## React Native
[icon-react-native-npm-url]: https://www.npmjs.com/package/@fruits-chain/icons-react-native
[![](https://img.shields.io/npm/v/@fruits-chain/icons-react-native.svg)][icon-react-native-npm-url]
[![](https://img.shields.io/npm/dm/@fruits-chain/icons-react-native.svg)][icon-react-native-npm-url]
[![](https://img.shields.io/badge/language-typescript-blue.svg)](https://www.typescriptlang.org/)
[![install size](https://packagephobia.com/badge?p=@fruits-chain/icons-react-native)](https://packagephobia.com/result?p=@fruits-chain/icons-react-native)## Taro
[icon-taro-npm-url]: https://www.npmjs.com/package/@fruits-chain/icons-taro
[![](https://img.shields.io/npm/v/@fruits-chain/icons-taro.svg)][icon-taro-npm-url]
[![](https://img.shields.io/npm/dm/@fruits-chain/icons-taro.svg)][icon-taro-npm-url]
[![](https://img.shields.io/badge/language-typescript-blue.svg)](https://www.typescriptlang.org/)
[![install size](https://packagephobia.com/badge?p=@fruits-chain/icons-taro)](https://packagephobia.com/result?p=@fruits-chain/icons-taro)## 开发过程中遇见的一些问题
### ts-node
#### node-fetch
package.json
```json
{ "type": "module" }
```tsconfig.json
```json
{
"ts-node": {
"esm": true
}
}
````node-fetch` 采用 ES Module 写法,需要项目里面也一起用,要么用最新的 `2.x` 版本。
#### import module
一般情况内部引入模块可以忽略后缀名,但是 `"type": "module"` 需要手动指定为 `.js`
- [点击查看 typescript 相关说明](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#type-in-package-json-and-new-extensions)
- [点击查看 ts-node 相关互动](https://github.com/TypeStrong/ts-node/issues/1736)> Relative import paths need full extensions (we have to write import "./foo.js" instead of import "./foo").
### ES Module
#### \_\_dirname 和 \_\_filename
```ts
import path from 'path'
import { fileURLToPath } from 'url'const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
```