Skip to content

Commit

Permalink
build: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jaw52 committed Mar 3, 2023
1 parent 1845302 commit 11396ec
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 311 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
pnpm-lock.yaml
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: pnpm

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Lint
run: nr lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: pnpm

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Typecheck
run: nr typecheck
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
}
45 changes: 19 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
{
"name": "@jaw52/transform-jsx-for-vite",
"version": "1.5.0",
"description": "transform js to jsx for vite",
"main": "./dist/index.cjs",
"module": "dist/index.mjs",
"types": "./dist/index.d.ts",
"type": "module",
"version": "1.5.0",
"packageManager": "[email protected]",
"description": "transform js to jsx for vite",
"author": "jaw52",
"license": "MIT",
"homepage": "https://github.com/jaw52/transform-jsx-for-vite#readme",
"bugs": "https://github.com/jaw52/transform-jsx-for-vite/issues",
"files": [
"dist"
],
"bin": {
"transform-jsx": "bin/transform-jsx.mjs"
},
"keywords": [
"vite",
"react",
"cli"
],
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
}
},
"main": "./dist/index.cjs",
"module": "dist/index.mjs",
"types": "./dist/index.d.ts",
"bin": {
"transform-jsx": "bin/transform-jsx.mjs"
},
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "esno src/index.ts",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false"
"release": "bumpp && npm publish",
"lint": "eslint .",
"lint:fix": "nr lint --fix",
"typecheck": "tsc --noEmit"
},
"lint-staged": {
"*.{ts}": [
"eslint --cache --fix"
]
},
"author": "jaw52",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.21.2",
"@babel/traverse": "^7.21.2",
Expand All @@ -63,8 +58,6 @@
"bumpp": "^8.2.1",
"eslint": "^8.34.0",
"esno": "^0.16.3",
"lint-staged": "^13.1.2",
"simple-git-hooks": "^2.8.1",
"typescript": "^4.9.5",
"unbuild": "^1.1.2"
},
Expand Down
Loading

0 comments on commit 11396ec

Please sign in to comment.