Skip to content

Commit

Permalink
feat: add publint for lint checking pre-publish
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Apr 11, 2023
1 parent c8999bd commit 92ed354
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/shipjs-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cache: 'npm'

- name: Install dependencies 🚀
run: npm ci --prefer-offline --no-audit --omit=optional
run: npm ci --prefer-offline --no-audit

- name: Trigger a release 🥳
run: npx shipjs trigger
Expand Down
133 changes: 133 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"exports": {
"./package.json": "./package.json",
"./SOffline.svelte": {
"types": "./components/SOffline.svelte.d.ts",
"svelte": "./components/SOffline.svelte",
"default": "./components/SOffline.svelte"
"types": "./dist/components/SOffline.svelte.d.ts",
"svelte": "./dist/components/SOffline.svelte",
"default": "./dist/components/SOffline.svelte"
}
},
"type": "module",
Expand All @@ -27,6 +27,7 @@
"preview": "vite preview",
"package": "svelte-package",
"package:watch": "svelte-package --watch",
"prepublishOnly": "npm run package && npx publint",
"test": "echo 'test!'",
"postinstall": "svelte-kit sync",
"prepare": "is-ci || husky install",
Expand Down Expand Up @@ -73,6 +74,7 @@
"postcss-html": "^1.5.0",
"prettier": "^2.8.7",
"prettier-plugin-svelte": "^2.10.0",
"publint": "^0.1.11",
"sass": "^1.61.0",
"shipjs": "^0.26.2",
"stylelint": "^15.4.0",
Expand Down
1 change: 0 additions & 1 deletion scripts/copy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { readFileSync, writeFileSync } from 'node:fs';

// read file into JSON
const pkg = JSON.parse(readFileSync('package.json', 'utf-8'));
const readme = readFileSync('README.md', 'utf-8');
const license = readFileSync('LICENSE', 'utf-8');
Expand Down
2 changes: 1 addition & 1 deletion ship.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
installCommand: () => 'npm i --prefer-offline --no-audit --omit=optional',
installCommand: () => 'npm i --prefer-offline --no-audit',
publishCommand: () => 'cd dist && npm publish --tag latest',
};

0 comments on commit 92ed354

Please sign in to comment.