Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #9

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .eleventy.js

This file was deleted.

17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# Eleventy Static Site Starter Project

+ tested on Node 14 & Node 16
11ty v3 + ESM + Rollup + PostCSS + ESLint v9

+ tested in Node 20, should work in Node 18

+ builds to `_site` folder

+ uses `tokens.json` for global variables

+ uses `rollup.config.js` for JS bundling, including iife and esm formats

## Quick start

+ copy `.env.example` to `.env` (.env.CANONICAL is usually the URL of the deployment environment)

+ edit `tokens.json`

+ npm install

+ npm start

or

+ npm run build

## Eleventy docs

[https://www.11ty.dev/docs/](https://www.11ty.dev/docs/)

+ Thanks to Bryce Wray for publishing these articles on cache-busting in Eleventy [https://www.brycewray.com/posts/2020/12/hashing-out-cache-busting-fix-eleventy/](https://www.brycewray.com/posts/2020/12/hashing-out-cache-busting-fix-eleventy/)

+ VSCode Nunjucks syntax highlighting extension :)

[https://marketplace.visualstudio.com/items?itemName=ronnidc.nunjucks](https://marketplace.visualstudio.com/items?itemName=ronnidc.nunjucks)
15 changes: 7 additions & 8 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# TO DO

+ refactor for 11ty v3 & ESM
+ add testing in Jest
+ fix ESLint v9 compatibility
+ update outdated NodeJS modules
+ remove deprecated NodeJS modules
+ automate release tagging
+ improve Deno compatibility

[x] refactor for 11ty v3 & ESM
[ ] add testing in Jest
[x] fix ESLint v9 compatibility
[x] update outdated NodeJS modules
[ ] remove deprecated NodeJS modules
[ ] automate release tagging
[ ] improve Deno compatibility
19 changes: 19 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import dotenv from "dotenv";
dotenv.config();

export default async function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("./src/fonts/**/*.*");
eleventyConfig.addPassthroughCopy("./src/images/**/*.{png,jpg,webp}");
eleventyConfig.addPassthroughCopy("./src/favicon.ico");
eleventyConfig.addWatchTarget("./src/js/");
eleventyConfig.addWatchTarget("./src/scss/");

return {
dir: {
input: "src",
includes: "_includes",
layouts: "_layouts",
},
templateFormats: ["html", "hbs", "njk", "md", "11ty.js"],
};
}
16 changes: 16 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import globals from "globals";
import pluginJs from "@eslint/js";

export default [
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

ecmaVersion: 12,
},
},
pluginJs.configs.recommended,
];
Loading
Loading