forked from bayesimpact/remixicon-react
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to use svgr + tsc instead, bump remixicon
- Loading branch information
Showing
16 changed files
with
1,116 additions
and
615 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
node_modules | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
build | ||
publish-*/* | ||
!publish-*/package.json | ||
.DS_Store | ||
dist | ||
!dist/package.json | ||
node_modules |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const childProcess = require("node:child_process"); | ||
const fs = require("node:fs"); | ||
const path = require("node:path"); | ||
|
||
childProcess.execFileSync( | ||
"pnpm", | ||
[ | ||
"svgr", | ||
"--typescript", | ||
"--no-index", | ||
"--memo", | ||
"--out-dir=build", | ||
"node_modules/remixicon/icons", | ||
], | ||
{ stdio: "inherit" } | ||
); | ||
|
||
for (const category of fs.readdirSync("build")) { | ||
const categoryDir = path.join("build", category); | ||
for (const filename of fs.readdirSync(categoryDir)) { | ||
fs.renameSync( | ||
path.join("build", category, filename), | ||
path.join("build", `Svg${filename}`) | ||
); | ||
} | ||
fs.rmdirSync(categoryDir); | ||
} | ||
|
||
childProcess.execFileSync("pnpm", ["tsc"], { stdio: "inherit" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "dathost-remixicon-react", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Remix Icon for React", | ||
"keywords": [ | ||
"remixicon", | ||
|
@@ -13,7 +13,7 @@ | |
"url": "git+ssh://[email protected]/dathost/remixicon-react.git" | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "cd .. && npm run build-react" | ||
"prepublishOnly": "cd .. && pnpm build" | ||
}, | ||
"author": "Svante Boberg <[email protected]>", | ||
"license": "(MIT AND OFL-1.1)", | ||
|
@@ -25,5 +25,8 @@ | |
"react": ">=0.14.0" | ||
}, | ||
"typings": "./dist/typings.d.ts", | ||
"sideEffects": false | ||
"sideEffects": false, | ||
"dependencies": { | ||
"typescript": "^5.6.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,18 +13,13 @@ | |
}, | ||
"homepage": "https://github.com/dathost/remixicon-react", | ||
"scripts": { | ||
"clean-react": "rm -rf publish-react/*.js publish-react/*.d.ts publish-react/**/*.js publish-react/**/*.d.ts", | ||
"clean": "npm clean-react", | ||
"build-react": "npm run clean-react && node scripts/generate-react.js && cp README.md publish-react/README.md && cp CHANGELOG.md publish-react/CHANGELOG.md && cp LICENSE publish-react/LICENSE" | ||
"build": "rm -rf build dist/*.js dist/*.d.ts && node build.js && cp README.md dist/README.md && cp LICENSE dist/LICENSE" | ||
}, | ||
"dependencies": { | ||
"remixicon": "3.2.0" | ||
"@svgr/cli": "8.1.0", | ||
"@types/react": "18.3.5", | ||
"remixicon": "4.3.0", | ||
"typescript": "5.6.2" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "^1.3.56", | ||
"@types/node": "^18.16.3", | ||
"@types/react": "^18.2.4", | ||
"react": "^18.2.0", | ||
"semver": "^7.3.5" | ||
} | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.