Skip to content

Commit

Permalink
Factor colors into CSS variables, add standalone example
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed May 15, 2024
1 parent 2f9989c commit 671d32d
Show file tree
Hide file tree
Showing 27 changed files with 5,200 additions and 512 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ jobs:
run: cargo install --path crates/mdbook-quiz --debug --locked
- name: Build example mdbook
run: mdbook build
working-directory: example
working-directory: example/mdbook
- name: Build example standalone
run: depot build
working-directory: example/standalone
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/book
publish_dir: ./example/mdbook/book


2 changes: 0 additions & 2 deletions example/.gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions example/mdbook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
book
/src/quiz
.aquascope-cache
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions example/standalone/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
"env": {
"es2021": true
},
"extends": [
"eslint:recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"prettier",
"react"
],
"ignorePatterns": [
"*.d.ts"
],
"rules": {
"no-empty-pattern": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-cond-assign": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"prettier/prettier": "error",
"react/prop-types": "off",
"react/no-unescaped-entities": "off"
},
"settings": {
"react": {
"version": "detect"
}
}
}
3 changes: 3 additions & 0 deletions example/standalone/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
docs
9 changes: 9 additions & 0 deletions example/standalone/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
tabWidth: 2,
arrowParens: "avoid",
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
parser: "typescript",
plugins: [require("@trivago/prettier-plugin-sort-imports")],
};
12 changes: 12 additions & 0 deletions example/standalone/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="/styles/index.scss" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
38 changes: 38 additions & 0 deletions example/standalone/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "standalone",
"version": "0.1.0",
"type": "module",
"depot": {
"platform": "browser",
"target": "site"
},
"pnpm": {
"overrides": {
"rollup": "npm:@rollup/wasm-node"
}
},
"devDependencies": {
"@iarna/toml": "^2.2.5",
"@trivago/prettier-plugin-sort-imports": "^4.1",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vitejs/plugin-react": "^4.2.1",
"@wcrichto/quiz": "^0.2.16",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "^4",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"jsdom": "^24.0.0",
"normalize.css": "^8.0.1",
"prettier": "^2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.77.1",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vite": "^5.2.11"
}
}
Loading

0 comments on commit 671d32d

Please sign in to comment.