Skip to content

Commit

Permalink
👩‍💻 dx: Configure fixpack.
Browse files Browse the repository at this point in the history
Fixes #811.
  • Loading branch information
make-github-pseudonymous-again committed May 10, 2024
1 parent 14b0c52 commit 5d35c76
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 61 deletions.
77 changes: 77 additions & 0 deletions .fixpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"files": [
"package.json"
],
"quiet": false,
"required": [
"name",
"version"
],
"requiredOnPrivate": [],
"sortToTop": [
"name",
"private",
"description",
"version",
"license",
"author",
"homepage",
"repository",
"bugs",
"keywords",
"sideEffects",
"type",
"source",
"main",
"module",
"esmodule",
"umd:main",
"unpkg",
"exports",
"files",
"publishConfig",
"meteor",
"postinstall",
"scripts",
"bundledDependencies",
"dependencies",
"optionalDependencies",
"peerDependencies",
"peerDependenciesMeta",
"devDependencies"
],
"sortedSubItems": [
"keywords",
"exports",
"files",
"scripts",
"bundledDependencies",
"dependencies",
"optionalDependencies",
"peerDependencies",
"peerDependenciesMeta",
"devDependencies"
],
"warn": [
"description",
"author",
"repository",
"keywords",
"main",
"bugs",
"homepage",
"license",
"files"
],
"warnOnPrivate": [
"name",
"version",
"description",
"main"
],
"dryRun": false,
"wipe": false,
"indent": null,
"newLine": null,
"finalNewLine": null
}
28 changes: 28 additions & 0 deletions .github/workflows/ci:lint-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci:lint-config

on:
push:
branches:
- main
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:

lint:
name: Continuous integration (lint config)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install 💾
uses: meteor-actions/install@v5

- name: Lint config 👕
run: meteor npm run lint-config
107 changes: 107 additions & 0 deletions package-lock.json

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

125 changes: 64 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
{
"name": "patients",
"private": true,
"meteor": {
"mainModule": {
"client": "client/main.tsx",
"server": "server/main.ts"
}
},
"babel": {
"plugins": [
"@babel/plugin-syntax-jsx"
],
"env": {
"COVERAGE": {
"sourceMaps": "both",
"plugins": [
[
"transform-remove-console",
{
"exclude": [
"time",
"timeEnd",
"log",
"error",
"warn"
]
}
],
"istanbul"
]
}
}
"postinstall": {
"@fontsource/roboto/300.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/400.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/500.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/700.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/files/*.woff": "copy public/@fontsource/roboto/files/",
"@fontsource/roboto/files/*.woff2": "copy public/@fontsource/roboto/files/",
"pdfjs-dist/build/pdf.worker.min.js": "copy public/pdfjs-dist/build/",
"pdfjs-dist/build/pdf.worker.js.map": "copy public/pdfjs-dist/build/",
"pdfjs-dist/cmaps/": "copy public/pdfjs-dist/cmaps",
"pdfjs-dist/standard_fonts/": "copy public/pdfjs-dist/standard_fonts"
},
"scripts": {
"build": "meteor build",
"build-and-upload": "mup deploy --config=.deploy/${DEPLOY_SITE:-default}/mup.js --settings=.deploy/${DEPLOY_SITE:-default}/settings.json",
"bundle-visualizer": "npm run dev -- --extra-packages bundle-visualizer --production",
"check:commit-msg": "commitlint --config commitlint.config.ts",
"ci:test": "TEST_BROWSER_DRIVER=puppeteer COVERAGE_OUT_LCOVONLY=1 npm run cover -- --once",
"commit-msg": "npm run check:commit-msg -- --edit",
"cover": "BABEL_ENV=COVERAGE COVERAGE=1 COVERAGE_APP_FOLDER=$PWD/ npm run test -- --extra-packages lmieulet:meteor-coverage",
"cover:dev:non-interactive": "PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium TEST_BROWSER_DRIVER=puppeteer COVERAGE_OUT_HTML=1 npm run cover --",
"deploy": "git diff --exit-code && git diff --cached --exit-code && git pull && git checkout $TAG && meteor npm clean-install && npm run build-and-upload",
"dev": "meteor run -p ${HOST:-localhost}:${PORT:-12345}",
"favicon": "emoji-favicon-cli -d public -v twitter face_with_thermometer",
"install-hooks": "husky install",
"lint": "xo",
"lint-and-fix": "npm run lint -- --fix",
"lint-config": "fixpack --dryRun",
"lint-config-and-fix": "fixpack || fixpack",
"postinstall": "postinstall && npm run favicon",
"precommit": "lint-staged",
"setup-deploy": "mup setup --config=.deploy/${DEPLOY_SITE:-default}/mup.js --settings=.deploy/${DEPLOY_SITE:-default}/settings.json",
"test": "TZ=Europe/Brussels meteor test -p ${HOST:-localhost}:${PORT:-12348} --driver-package meteortesting:mocha",
"test:dev:non-interactive": "PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium TEST_BROWSER_DRIVER=puppeteer npm run test --",
"tsc": "tsc",
"tsc:watch": "npm run tsc -- --noErrorTruncation --watch",
"upgrade": "meteor update && npm run upgrade-deps -- -u && meteor npm install",
"upgrade-deps": "meteor node .upgrade/upgrade.js"
},
"dependencies": {
"@async-iterable-iterator/async-iterable-to-array": "0.0.1",
Expand Down Expand Up @@ -148,6 +163,7 @@
"eslint-config-xo-react": "0.27.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.2",
"fixpack": "4.0.0",
"husky": "8.0.3",
"ical.js": "1.5.0",
"lint-staged": "14.0.1",
Expand All @@ -164,43 +180,30 @@
"typescript": "~4.9.5",
"xo": "0.54.2"
},
"postinstall": {
"@fontsource/roboto/300.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/400.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/500.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/700.css": "copy public/@fontsource/roboto/",
"@fontsource/roboto/files/*.woff": "copy public/@fontsource/roboto/files/",
"@fontsource/roboto/files/*.woff2": "copy public/@fontsource/roboto/files/",
"pdfjs-dist/build/pdf.worker.min.js": "copy public/pdfjs-dist/build/",
"pdfjs-dist/build/pdf.worker.js.map": "copy public/pdfjs-dist/build/",
"pdfjs-dist/cmaps/": "copy public/pdfjs-dist/cmaps",
"pdfjs-dist/standard_fonts/": "copy public/pdfjs-dist/standard_fonts"
},
"private": true,
"scripts": {
"favicon": "emoji-favicon-cli -d public -v twitter face_with_thermometer",
"check:commit-msg": "commitlint --config commitlint.config.ts",
"lint": "xo",
"lint-and-fix": "npm run lint -- --fix",
"install-hooks": "husky install",
"postinstall": "postinstall && npm run favicon",
"precommit": "lint-staged",
"commit-msg": "npm run check:commit-msg -- --edit",
"dev": "meteor run -p ${HOST:-localhost}:${PORT:-12345}",
"bundle-visualizer": "npm run dev -- --extra-packages bundle-visualizer --production",
"tsc": "tsc",
"tsc:watch": "npm run tsc -- --noErrorTruncation --watch",
"test": "TZ=Europe/Brussels meteor test -p ${HOST:-localhost}:${PORT:-12348} --driver-package meteortesting:mocha",
"test:dev:non-interactive": "PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium TEST_BROWSER_DRIVER=puppeteer npm run test --",
"cover": "BABEL_ENV=COVERAGE COVERAGE=1 COVERAGE_APP_FOLDER=$PWD/ npm run test -- --extra-packages lmieulet:meteor-coverage",
"cover:dev:non-interactive": "PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium TEST_BROWSER_DRIVER=puppeteer COVERAGE_OUT_HTML=1 npm run cover --",
"ci:test": "TEST_BROWSER_DRIVER=puppeteer COVERAGE_OUT_LCOVONLY=1 npm run cover -- --once",
"upgrade-deps": "meteor node .upgrade/upgrade.js",
"upgrade": "meteor update && npm run upgrade-deps -- -u && meteor npm install",
"setup-deploy": "mup setup --config=.deploy/${DEPLOY_SITE:-default}/mup.js --settings=.deploy/${DEPLOY_SITE:-default}/settings.json",
"build": "meteor build",
"build-and-upload": "mup deploy --config=.deploy/${DEPLOY_SITE:-default}/mup.js --settings=.deploy/${DEPLOY_SITE:-default}/settings.json",
"deploy": "git diff --exit-code && git diff --cached --exit-code && git pull && git checkout $TAG && meteor npm clean-install && npm run build-and-upload"
"babel": {
"plugins": [
"@babel/plugin-syntax-jsx"
],
"env": {
"COVERAGE": {
"sourceMaps": "both",
"plugins": [
[
"transform-remove-console",
{
"exclude": [
"time",
"timeEnd",
"log",
"error",
"warn"
]
}
],
"istanbul"
]
}
}
},
"xo": {
"parser": "@babel/eslint-parser",
Expand Down

0 comments on commit 5d35c76

Please sign in to comment.