Skip to content

Commit

Permalink
chore: postcss CLI over resource route pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Jan 11, 2022
1 parent dce4e46 commit 60cde30
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
6 changes: 2 additions & 4 deletions app/containers/layout/layout.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Footer } from "~/components/footer";
import { Navbar, NavbarCategory } from "~/components/navbar";

import logoHref from "~/images/remix-glow.svg";
import globalStylesheetHref from "~/styles/global.css";

import { GenericCatchBoundary } from "../boundaries/generic-catch-boundary";
import { GenericErrorBoundary } from "../boundaries/generic-error-boundary";
Expand Down Expand Up @@ -50,10 +51,7 @@ export let links: LinksFunction = () => {
return [
{
rel: "stylesheet",
href:
process.env.NODE_ENV === "development"
? "/global.css"
: require("~/styles/global.css"),
href: globalStylesheetHref,
},
];
};
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"build:remix": "remix build",
"build:css": "postcss styles/global.css -o app/styles/global.css",
"clean": "rimraf ./public/build ./build ./.cache/content-v2 ./.cache/index-v5",
"dev": "dotenv -- remix dev",
"dev": "npm run build:css && run-p dev:*",
"dev:remix": "dotenv -- remix dev",
"dev:css": "postcss styles/global.css -o app/styles/global.css --watch",
"test": "cypress-parallel -s cy:run -t 4 -d ./cypress/integration",
"cy:run": "cypress run --config video=false",
"cypress": "cypress open",
Expand Down
7 changes: 0 additions & 7 deletions remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,4 @@ module.exports = {
publicPath: "/build/",
serverBuildDirectory: "./build",
ignoredRouteFiles: [".*"],
routes(defineRoutes) {
return defineRoutes((route) => {
if (process.env.NODE_ENV === "development") {
route("global.css", "../styles/global.server.ts");
}
});
},
};
19 changes: 0 additions & 19 deletions styles/global.server.ts

This file was deleted.

0 comments on commit 60cde30

Please sign in to comment.