Skip to content

Commit

Permalink
Improve wrapito's build (#17)
Browse files Browse the repository at this point in the history
* chore: Modify scripts

* refactor: Export only what is needed

* chore: Remove unused script

* build: Update Github actions

* fix: Run tests only for PR into master
  • Loading branch information
sigfriedCub1990 authored Feb 16, 2024
1 parent d9576c3 commit 209a695
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
check-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run test
- run: npm version --no-git-tag-version ${GITHUB_REF##*/}
- run: npm run publish-package
env:
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
"version": "8.0.0",
"description": "🌯 🌯 Wrap you tests so that you can test both behaviour and components with less effort.",
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"license": "MIT",
"scripts": {
"build": "tsup",
"build:watch": "tsup --watch",
"test": "vitest",
"test:coverage": "vitest --coverage",
"build:watch": "tsup --watch",
"build": "tsup",
"test:publish": "npm publish --dry-run",
"build:types": "tsc --build",
"postbuild": "node scripts/copy-publish-files.cjs",
"publish-package": "npm run build && cd dist && npm publish",
"publish-package": "npm run build && npm publish",
"typecheck": "tsc --noEmit dist/index.d.ts"
},
"repository": {
Expand Down
6 changes: 0 additions & 6 deletions scripts/copy-publish-files.cjs

This file was deleted.

0 comments on commit 209a695

Please sign in to comment.