refactor: Add 'src' folder in 'site' (#445)

This refactoring re-organizes the `site` folder to have a nested `src` folder.

Originally, [we wanted to keep the directory structure shallow](https://github.com/coder/coder/pull/8#issuecomment-1009578910) - but there were two points that motivated this change to introduce the `src` level.

1. We have several non-`src` folders now (`e2e`, `static`, `html_templates`, `.storybook`)
2. Having a `src` folder makes it easier to run XState Typegen

So given those two data points - I believe it makes sense to revisit that and introduce a `src` folder.
This commit is contained in:
Bryan
2022-03-15 21:06:03 -07:00
committed by GitHub
parent 15beb98016
commit d8e530e1ec
103 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
const path = require("path") const path = require("path")
module.exports = { module.exports = {
stories: ["../**/*.stories.mdx", "../**/*.stories.@(js|jsx|ts|tsx)"], stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials"], addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
babel: async (options) => ({ babel: async (options) => ({
...options, ...options,

View File

@ -1,6 +1,6 @@
import ThemeProvider from "@material-ui/styles/ThemeProvider" import ThemeProvider from "@material-ui/styles/ThemeProvider"
import { withThemes } from "@react-theming/storybook-addon" import { withThemes } from "@react-theming/storybook-addon"
import { light, dark } from "../theme" import { light, dark } from "../src/theme"
import { addDecorator } from "node_modules/@storybook/react" import { addDecorator } from "node_modules/@storybook/react"
import { createMemoryHistory } from "history" import { createMemoryHistory } from "history"
import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom" import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom"

Some files were not shown because too many files have changed in this diff Show More