Skip to content

Commit

Permalink
Updated heroicons to v2.1.1
Browse files Browse the repository at this point in the history
Updated dependencies.

Removed "engines" from package.json
  • Loading branch information
Yzen90 committed Dec 18, 2023
1 parent cc152b7 commit ae1bd32
Show file tree
Hide file tree
Showing 8 changed files with 1,019 additions and 185 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dist
solid
outline
mini
micro
*.log
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Solid](#solid)
- [Outline](#outline)
- [Mini](#mini)
- [Micro](#micro)

## Usage

Expand Down Expand Up @@ -55,3 +56,18 @@ const { academicCap } = him;

import { academicCap } from '@xrnoz/heroicons-js/mini';
```

### Micro
```typescript
import * as heroicons from '@xrnoz/heroicons-js/micro';
const { academicCap } = heroicons;

// OR

import { hix } from '@xrnoz/heroicons-js';
const { academicCap } = hix;

// OR

import { academicCap } from '@xrnoz/heroicons-js/micro';
```
8 changes: 6 additions & 2 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { appendFileSync, mkdirSync, readFileSync } from 'fs';

import glob from 'glob';
import { glob } from 'glob';
import { Parser } from 'htmlparser2';
import _ from 'lodash';

Expand All @@ -19,6 +19,10 @@ const variants = [
name: 'mini',
path: '20/solid/',
},
{
name: 'micro',
path: '16/solid/',
},
];

let svg = '';
Expand All @@ -35,7 +39,7 @@ const parser = new Parser({
for (const { name, path } of variants) {
mkdirSync(name);

for (const file of glob.sync('*.svg', { cwd: base + path })) {
for (const file of glob.sync('*.svg', { cwd: base + path }).reverse()) {
svg = '';
parser.write(readFileSync(base + path + file, { encoding: 'utf-8' }));

Expand Down
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * as his from './solid/index.js';
export * as hio from './outline/index.js';
export * as him from './mini/index.js';
export * as hix from './micro/index.js';

export * from './solid/index.js';
export * as default from './solid/index.js';
42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "@xrnoz/heroicons-js",
"description": "Re-packaging of heroicons",
"version": "1.0.0",
"version": "1.1.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": "./dist/index.js",
"./solid": "./dist/solid/index.js",
"./outline": "./dist/outline/index.js",
"./mini": "./dist/mini/index.js"
"./mini": "./dist/mini/index.js",
"./micro": "./dist/micro/index.js"
},
"typesVersions": {
"*": {
Expand All @@ -21,6 +22,9 @@
],
"mini": [
"dist/mini/index.d.ts"
],
"micro": [
"dist/micro/index.d.ts"
]
}
},
Expand All @@ -29,27 +33,25 @@
],
"dependencies": {},
"devDependencies": {
"@tsconfig/node18-strictest-esm": "1.0.1",
"@types/glob": "8.0.1",
"@types/lodash": "4.14.191",
"@types/node": "18.13.0",
"glob": "8.1.0",
"heroicons": "2.0.15",
"htmlparser2": "8.0.1",
"@tsconfig/node20": "20.1.2",
"@tsconfig/strictest": "2.0.2",
"@types/glob": "8.1.0",
"@types/lodash": "4.14.202",
"@types/node": "20.10.5",
"del-cli": "5.1.0",
"glob": "10.3.10",
"heroicons": "2.1.1",
"htmlparser2": "9.0.0",
"lodash": "4.17.21",
"npm-run-all": "4.1.5",
"prettier": "2.8.4",
"rimraf": "4.1.2",
"ts-node": "10.9.1",
"typescript": "4.9.5"
},
"engines": {
"yarn": "=1.22.19"
"prettier": "3.1.1",
"tsx": "4.6.2",
"typescript": "5.3.3"
},
"scripts": {
"build": "run-s -l build:*",
"build:clean": "rimraf dist solid outline mini",
"build:generate": "ts-node build.ts",
"build:clean": "del-cli dist solid outline mini micro",
"build:generate": "tsx build.ts",
"build:compile": "tsc --project tsconfig.build.json",
"fmt": "prettier --write .",
"prepublishOnly": "yarn build"
Expand All @@ -59,9 +61,9 @@
],
"repository": {
"type": "git",
"url": "https://github.com/xrnoz/heroicons-js.git"
"url": "https://github.com/Yzen90/heroicons-js.git"
},
"author": "Edgar Montiel Cruz <edgar@xrnoz.io>",
"author": "Edgar Montiel Cruz <edgar@xrnoz.pro>",
"license": "MIT",
"private": false
}
8 changes: 3 additions & 5 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"extends": "@tsconfig/node18-strictest-esm/tsconfig.json",
"extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node20/tsconfig"],
"compilerOptions": {
"module": "ESNext",
"declaration": true,
"outDir": "dist",
"noImplicitReturns": false
"outDir": "dist"
},
"files": ["index.ts"],
"include": ["solid", "outline", "mini"],
"include": ["solid", "outline", "mini", "micro"],
"exclude": ["node_modules"]
}
11 changes: 3 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"extends": "@tsconfig/node18-strictest-esm/tsconfig.json",
"extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node20/tsconfig"],
"compilerOptions": {
"module": "ESNext",
"declaration": true,
"outDir": "dist",
"noImplicitReturns": false
"outDir": "dist"
},
"files": ["build.ts"],
"exclude": ["node_modules"],
"ts-node": {
"esm": true
}
"exclude": ["node_modules"]
}
Loading

0 comments on commit ae1bd32

Please sign in to comment.