Skip to content

Commit

Permalink
refactor(core): Migrate to Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
wootsbot committed Jun 10, 2023
1 parent 74da518 commit 9fd5698
Show file tree
Hide file tree
Showing 14 changed files with 1,309 additions and 2,829 deletions.
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@icons-pack/react-simple-icons": "7.2.0"
},
"changesets": []
}
5 changes: 5 additions & 0 deletions .changeset/tasty-lamps-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@icons-pack/react-simple-icons': major
---

Migrate to Vite
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc

This file was deleted.

20 changes: 14 additions & 6 deletions .github/workflows/pull_request_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
- v8

env:
TURBO_VERSION: ${{ vars.TURBO_VERSION }}
Expand All @@ -24,8 +25,9 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 16.x
registry-url: https://registry.npmjs.org/
cache: 'pnpm'

# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
Expand All @@ -41,18 +43,24 @@ jobs:
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
- name: 🔥 install pnpm
run: npm i pnpm@${PNPM_VERSION} -g --force
- name: 🔥 Installing pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Setup TURBO
run: npm i -g turbo@${TURBO_VERSION}
run: |
npm add -g turbo@${TURBO_VERSION}
- name: 📦 Install Dependencies
- name: 📦 Install dependencies
run: |
pnpm install
pnpm install --no-frozen-lockfile
- name: 🔥 generate:components
run: pnpm turbo run generate:components

- name: 💣 build
run: pnpm turbo run build

- name: 🔥 bundlesize
run: pnpm bundlesize
17 changes: 12 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- main
- v8
release:
types: [created]

Expand Down Expand Up @@ -43,22 +44,28 @@ jobs:
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
- name: 🔥 install pnpm
run: npm i pnpm@${PNPM_VERSION} -g --force
- name: 🔥 Installing pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Setup TURBO
run: npm i -g turbo@${TURBO_VERSION}
run: |
npm add -g turbo@${TURBO_VERSION}
- name: 📦 Install Dependencies
- name: 📦 Install dependencies
run: |
pnpm install
pnpm install --no-frozen-lockfile
- name: 🔥 generate:components
run: pnpm turbo run generate:components

- name: 💣 build
run: pnpm turbo run build

- name: 🔥 bundlesize
run: pnpm bundlesize

- name: Create Release Pull Request or Publish to GitHub Packages 📦
uses: changesets/action@v1
with:
Expand Down
61 changes: 32 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,72 +23,75 @@
},
"license": "MIT",
"author": "Jorge Luis Calleja <jorge.calleja@wootsbot.dev>",
"source": "src/index.ts",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"umd:main": "dist/index.js",
"unpkg": "dist/index.js",
"jsdelivr": "dist/index.js",
"jsnext:main": "dist/index.mjs",
"main": "./dist/react-simple-icons.umd.js",
"module": "./dist/react-simple-icons.mjs",
"exports": {
".": {
"import": "./dist/react-simple-icons.mjs",
"require": "./dist/react-simple-icons.umd.js"
}
},
"types": "./dist/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"build:dist": "vite build",
"clean": "rimraf dist",
"clean:build": "rimraf -rf dist",
"build": "pnpm clean:build && tsup && pnpm generate:declarations",
"bundlesize": "bundlesize",
"build": "pnpm clean:build && pnpm build:dist && pnpm generate:declarations",
"lint:types": "tsc --noEmit",
"clean:components": "rimraf -rf ./src/components/**",
"clean:files": "rimraf -rf ./src/index.ts",
"generate:components": "pnpm clean:components && pnpm clean:files && node scripts/generate-components",
"generate:declarations": "node scripts/generate-declarations",
"lint": "pnpm lint:eslint",
"lint:eslint": "eslint --fix .",
"prettier": "prettier --config .prettierrc \"./**/*.+(js|json|ts|tsx)\" --write",
"bundlesize": "bundlesize",
"changeset": "changeset",
"version": "changeset version",
"release": "changeset publish"
},
"lint-staged": {
"*.js": [
"eslint --fix"
],
"./**/*.+(js|json)": [
"prettier --write"
]
},
"bundlesize": [
{
"path": "./dist/index.d.ts",
"maxSize": "25 kB"
},
{
"path": "./dist/react-simple-icons.mjs",
"maxSize": "2 MB"
},
{
"path": "./dist/react-simple-icons.umd.js",
"maxSize": "2 MB"
}
],
"devDependencies": {
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.22.0",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/react": "^18.0.12",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"@vitejs/plugin-react": "^4.0.0",
"bundlesize": "^0.18.1",
"cross-env": "^6.0.3",
"eslint": "^8.17.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "8.6.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "^7.14.3",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"prettier": "2.8.4",
"prettier-eslint": "15.0.1",
"prettier-eslint": "^15.0.1",
"react": "^18.2.0",
"rimraf": "^3.0.2",
"signale": "^1.4.0",
"simple-icons": "8.9.0",
"tsup": "6.7.0",
"turbo": "1.8.8",
"simple-icons": "9.0.0",
"turbo": "1.10.3",
"typescript": "4.7.3",
"uppercamelcase": "3.0.0"
"uppercamelcase": "3.0.0",
"vite": "^4.3.9"
},
"peerDependencies": {
"react": "^16.13 || ^17 || ^18"
Expand Down
Loading

0 comments on commit 9fd5698

Please sign in to comment.