create scope-tailwind

This commit is contained in:
Andrew Pareles 2024-11-11 02:29:36 -08:00
parent 0cc06407ad
commit c4d620c874
5 changed files with 523 additions and 328 deletions

843
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -216,6 +216,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^2.2.8",
"scope-tailwind": "^1.0.1",
"sinon": "^12.0.1",
"sinon-test": "^3.1.3",
"source-map": "0.6.1",

View file

@ -1 +1,2 @@
out/
src2/

View file

@ -1,10 +1,10 @@
import { execSync } from 'child_process';
// tsup to build all react to out/
execSync('tsup')
execSync('npx scope-tailwind ./sidebar-tsx -c ')
// build tailwind -> styles.css
execSync('tailwindcss -i ./util/styles.css -o ./out/styles.css')
execSync('tsup')
// the structure of files here MUST be shallow so that external = ../../ works

View file

@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./*/*.{js,ts,tsx}'], // uses these files to decide how to transform the css file
content: ['./**/*.{js,ts,tsx}'], // uses these files to decide how to transform the css file
theme: {
extend: {},
},