Skip to content

Commit

Permalink
chore: update scripts for the products folder
Browse files Browse the repository at this point in the history
  • Loading branch information
skoob13 committed Jan 21, 2025
1 parent b3f06db commit b4c35ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"copy-scripts": "mkdir -p frontend/dist/ && ./bin/copy-posthog-js",
"test": "pnpm test:unit && pnpm test:visual",
"test:unit": "jest --testPathPattern=frontend/",
"test:unit": "jest --testPathPattern='(frontend/|products/)'",
"jest": "jest",
"test:visual:update": "rm -rf frontend/__snapshots__/__failures__/ && docker compose -f docker-compose.playwright.yml run --rm -it --build playwright pnpm test:visual:update:docker --url http://host.docker.internal:6006",
"test:visual:update:docker": "NODE_OPTIONS=--max-old-space-size=6144 test-storybook -u --browsers chromium webkit --no-index-json",
Expand All @@ -45,15 +45,15 @@
"prettier": "prettier --write \"./**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
"prettier:check": "prettier --check \"frontend/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
"typescript:check": "tsc --noEmit && echo \"No errors reported by tsc.\"",
"lint:js": "eslint --cache frontend/src cypress",
"lint:css": "stylelint \"frontend/**/*.{css,scss}\"",
"lint:js": "eslint --cache frontend/src cypress products",
"lint:css": "stylelint \"(frontend|products)/**/*.{css,scss}\"",
"format:backend": "ruff .",
"format:frontend": "pnpm lint:js --fix && pnpm lint:css --fix && pnpm prettier",
"format": "pnpm format:backend && pnpm format:frontend",
"typegen:write": "kea-typegen write --delete --show-ts-errors",
"typegen:check": "kea-typegen check",
"typegen:watch": "kea-typegen watch --delete --show-ts-errors",
"typegen:clean": "find frontend/src -type f -name '*Type.ts' -delete",
"typegen:clean": "find frontend/src products -type f -name '*Type.ts' -delete",
"storybook": "DEBUG=0 storybook dev -p 6006",
"build-storybook": "DEBUG=0 storybook build",
"dev:migrate:postgres": "export DEBUG=1 && source env/bin/activate && python manage.py migrate",
Expand Down Expand Up @@ -357,6 +357,10 @@
"eslint --cache -c .eslintrc.js --fix",
"prettier --write"
],
"products/**/frontend/**/*.{js,jsx,mjs,ts,tsx}": [
"eslint --cache -c .eslintrc.js --fix",
"prettier --write"
],
"frontend/*.mjs": [
"eslint -c .eslintrc.js --fix",
"prettier --write"
Expand Down
7 changes: 6 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/** @type {import('tailwindcss').Config} */
const config = {
content: ['./frontend/src/**/*.{ts,tsx}', './ee/frontend/**/*.{ts,tsx}', './frontend/src/index.html'],
content: [
'./frontend/src/**/*.{ts,tsx}',
'./ee/frontend/**/*.{ts,tsx}',
'./frontend/src/index.html',
'./products/**/frontend/**/*.{ts,tsx}',
],
important: true, // Basically this: https://sebastiandedeyne.com/why-we-use-important-with-tailwind
darkMode: ['selector', '[theme="dark"]'],
theme: {
Expand Down

0 comments on commit b4c35ae

Please sign in to comment.