use oxide

- Setup the codebase to be able to use the Rust parts based on an
  environment variable: `OXIDE=1`.
- Setup some tests that run both the non-Rust and Rust version in the
  same test.
- Sort the candidates in a consistent way, to guarantee the order for
  now (especially in tests).
- Reflect sorting related changes in tests.
- Ensure tests run in both the Rust and non-Rust version. (Some tests
  are explicitly skipped when using the Rust version since we haven't
  implemented those features yet. These include: custom prefix,
  transformers and extractors).
  - `jest`
  -`OXIDE=1 jest`
This commit is contained in:
Robin Malfait 2022-11-30 00:10:15 +01:00
parent cc92ef53a6
commit b643d399db
No known key found for this signature in database
GPG key ID: 92F53D68B9041AFE
37 changed files with 3340 additions and 4691 deletions

View file

@ -27,7 +27,10 @@
"generate:types": "node -r @swc/register scripts/generate-types.js",
"generate": "npm run generate:plugin-list && npm run generate:types",
"release-channel": "node ./scripts/release-channel.js",
"release-notes": "node ./scripts/release-notes.js"
"release-notes": "node ./scripts/release-notes.js",
"oxide:install": "npm install --prefix ./oxide",
"oxide:dev": "concurrently -n tailwind,oxide-node -c green,yellow 'npm run swcify -- --watch' 'npm run --prefix ./oxide dev:node'",
"oxide:build": "npm run --prefix ./oxide build:node && npm run swcify"
},
"files": [
"src/*",
@ -48,6 +51,7 @@
"@swc/jest": "^0.2.24",
"@swc/register": "^0.1.10",
"autoprefixer": "^10.4.13",
"concurrently": "^7.5.0",
"cssnano": "^5.1.14",
"esbuild": "^0.16.10",
"eslint": "^8.30.0",
@ -85,7 +89,8 @@
"postcss-selector-parser": "^6.0.11",
"postcss-value-parser": "^4.2.0",
"quick-lru": "^5.1.1",
"resolve": "^1.22.1"
"resolve": "^1.22.1",
"tailwind-oxide": "file:oxide/crates/node"
},
"browserslist": [
"> 1%",