Skip to content

Commit

Permalink
adding watch capability to css
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Gardner committed Jan 6, 2023
1 parent 13ea4da commit 546f8f0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(pluginSyntaxHighlight);
eleventyConfig.addPlugin(pluginNavigation);

eleventyConfig.addWatchTarget("./css/");

// Alias `layout: article` to `layout: layouts/post.njk`
eleventyConfig.addLayoutAlias("article", "layouts/article.njk");

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "",
"scripts": {
"build": "npm-run-all clean-build build:ts build:11ty -p minify:* build:css",
"build:css": "postcss css/app.css -o css/global.css",
"build:css": "postcss src/css/app.css -o css/global.css",
"build:11ty": "eleventy",
"build:ts": "spack",
"clean-build": "rimraf build",
"postbuild": "node resources/tooling/copy-files.js",
"watch:ts": "spack && chokidar js/*.ts -c spack",
"watch:ts": "spack && chokidar src/js/*.ts -c spack",
"watch:11ty": "eleventy --serve",
"start": "cross-env NODE_ENV=dev npm-run-all -p watch:*",
"debug": "DEBUG=* eleventy"
Expand Down
2 changes: 1 addition & 1 deletion spack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require("path");

module.exports = config({
entry: {
build: path.join(__dirname, "js/main.ts"),
build: path.join(__dirname, "src/js/main.ts"),
},

output: {
Expand Down
2 changes: 1 addition & 1 deletion css/app.css → src/css/app.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './normalize.css';
@import 'normalize.css';

:root {
--font-size-2: 1.25rem;
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 546f8f0

Please sign in to comment.