Skip to content

Commit

Permalink
refactor: build and use ohmyfetch and ufo (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza authored Mar 28, 2022
1 parent f2e92a2 commit de63c65
Show file tree
Hide file tree
Showing 12 changed files with 4,407 additions and 7,539 deletions.
11 changes: 3 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"root": true,
"extends": "standard-with-typescript",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off"
}
"extends": [
"@nuxtjs/eslint-config-typescript"
]
}
32 changes: 14 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: ci
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
ci:
Expand All @@ -15,31 +15,27 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12, 14]
node: [12, 14, 16]

steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: cache node_modules
uses: actions/cache@v2
- run: corepack enable

- uses: actions/setup-node@v3
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
node-version: ${{ matrix.node }}
cache: "pnpm"

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Install
run: pnpm install

- name: Lint
run: yarn lint
run: pnpm lint

- name: Test
run: yarn test
run: pnpm test

- name: Coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@

## Install

Install using npm or yarn:
Install using npm, yarn or pnpm:

```bash
npm install google-fonts-helper
# or
yarn add google-fonts-helper
# or
pnpm add google-fonts-helper
```

Import into your Node.js project:
Expand Down
18 changes: 0 additions & 18 deletions jest.config.js

This file was deleted.

54 changes: 24 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,44 @@
"description": "Google Fonts Helper",
"repository": "ricardogobbosouza/google-fonts-helper",
"license": "MIT",
"author": "Ricardo Gobbo de Souza <[email protected]>",
"main": "dist/index.js",
"sideEffects": false,
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "siroc build",
"prepublishOnly": "yarn build",
"lint": "eslint --ext .ts .",
"release": "yarn test && yarn build && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint && yarn jest"
"build": "unbuild",
"dev": "vitest",
"lint": "eslint --ext .ts,.js .",
"prepack": "unbuild",
"release": "pnpm test && pnpm build && standard-version && git push --follow-tags && npm publish",
"test": "pnpm lint && vitest run --coverage"
},
"dependencies": {
"deepmerge": "^4.2.2",
"fs-extra": "^9.1.0",
"got": "^11.8.2"
"fs-extra": "^10.0.1",
"ohmyfetch": "^0.4.15",
"ufo": "^0.8.1"
},
"devDependencies": {
"@babel/core": "latest",
"@babel/plugin-transform-runtime": "latest",
"@babel/preset-env": "latest",
"@babel/preset-typescript": "latest",
"@types/deepmerge": "latest",
"@types/del": "latest",
"@nuxtjs/eslint-config-typescript": "latest",
"@types/fs-extra": "latest",
"@types/got": "latest",
"@types/jest": "latest",
"@types/node": "latest",
"@types/tempy": "latest",
"@typescript-eslint/eslint-plugin": "latest",
"babel-jest": "latest",
"c8": "latest",
"del": "latest",
"eslint": "latest",
"eslint-config-standard-with-typescript": "latest",
"eslint-plugin-import": "latest",
"eslint-plugin-node": "latest",
"eslint-plugin-promise": "latest",
"eslint-plugin-standard": "latest",
"jest": "latest",
"siroc": "latest",
"standard-version": "latest",
"tempy": "latest",
"ts-jest": "latest",
"typescript": "latest"
"typescript": "latest",
"unbuild": "latest",
"vitest": "latest"
}
}
Loading

0 comments on commit de63c65

Please sign in to comment.