Add css into docusaurus

This commit is contained in:
Sam Nolan 2022-06-06 04:24:38 +00:00
parent 906534615a
commit cd8a92e91f
6 changed files with 17 additions and 9 deletions

View File

@ -57,7 +57,7 @@
}, },
"scripts": { "scripts": {
"start": "cross-env REACT_APP_FAST_REFRESH=false && start-storybook -p 6006 -s public", "start": "cross-env REACT_APP_FAST_REFRESH=false && start-storybook -p 6006 -s public",
"build": "tsc -b && build-storybook -s public", "build": "tsc -b && tailwindcss -i ./src/tailwind.css -o ./dist/main.css && build-storybook -s public",
"bundle": "webpack", "bundle": "webpack",
"all": "yarn bundle && yarn build", "all": "yarn bundle && yarn build",
"lint": "prettier --check .", "lint": "prettier --check .",
@ -96,6 +96,6 @@
"@types/react": "17.0.43" "@types/react": "17.0.43"
}, },
"source": "./src/index.ts", "source": "./src/index.ts",
"main": "./dist/bundle.js", "main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts" "types": "./dist/src/index.d.ts"
} }

View File

@ -3,5 +3,5 @@ module.exports = {
tailwindcss: {}, tailwindcss: {},
autoprefixer: {}, autoprefixer: {},
cssnano: {}, cssnano: {},
} },
} };

View File

@ -19,8 +19,7 @@ const config = {
organizationName: "quantified-uncertainty", // Usually your GitHub org/user name. organizationName: "quantified-uncertainty", // Usually your GitHub org/user name.
projectName: "squiggle", // Usually your repo name. projectName: "squiggle", // Usually your repo name.
plugins: [ plugins: [],
],
presets: [ presets: [
[ [
@ -42,7 +41,10 @@ const config = {
"https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/", "https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/website/",
}, },
theme: { theme: {
customCss: require.resolve("./src/css/custom.css"), customCss: [
require.resolve("./src/css/custom.css"),
require.resolve("@quri/squiggle-components/dist/main.css"),
],
}, },
}), }),
], ],

View File

@ -1,4 +1,3 @@
@import("@quri/squiggle-components/dist/main.css")
/** /**
* Any CSS included here will be global. The classic template * Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to * bundles Infima by default. Infima is a CSS framework designed to

View File

@ -0,0 +1,7 @@
module.exports = {
content: ["./src/**/*.{html,tsx,ts,js,jsx}"],
theme: {
extend: {},
},
plugins: [require("@tailwindcss/forms")],
};

View File

@ -1 +1 @@
module .exports = {} module.exports = {};