Skip to content

Commit

Permalink
incremental has some odd behaviors with eleventy.before - removing --…
Browse files Browse the repository at this point in the history
…incremental from npm start - swap esBuild.js to eleventy.after (#28)

* incremental has some odd behaviors with eleventy.before
- removing --incremental from npm start
- swap esBuild.js to eleventy.after

* 0.2.3

* changelog update

* package updates

* package updates

* moves jampack cache to NODEFILES in `.scrub.sh` for fresh installs instead of site cleaning

* package and `esBuild.js` update
- removing postcss
- update esbuild and sass

* playing around with clipping text as background color

* color gradient

* default theme matches system

* flightdeck console output
- adds esbuild build time in seconds and milliseconds in the console

* adding manifest.js to `_flightdeck/`
to try and be DRY
- updates jamPack.js to use manifest
- updates packages esBuild.js to use manifest
- adds cross-env back to mix
- updates eleventy config to use manifest

* excludes js and styles directories from `addPassthroughCopy`

* reorder consts

* includes jampack's `<the-fold></the-fold>` tag for optimization of images

* using shortcode for thefold

* moving flightdeck items to components dir

* updates passthrough copy

* update change log

* 0.2.5

* adds Rome and config.

* Formatting with Rome

* Linting with Rome and testing the if linting broke anything

* Rome format/lint

* rome update
- rome config to always use semi-colon
- npm script update
- vscode workspace update

* format and lint with Rome

* change log and workspace setting update

* 0.2.6

* testing options with npm scripts for rom

* package update and npm scripts update

* netlify toml change

* readme includes lint/format help

* readme update includes NOTE about format/lint npm scripts

* 0.2.7

* change log update

* formatting nunjucks files

* readme up

* package updates (#24)

* purge packages

* fresh install

* jampack and esbuild sass plugin upgraded

* testing

* migrating to from Rome to Biome
- Rome is being sunsetted in favor of Biome

* using Bun as package manager
- scrub will remove bun.lockb
- bunx to preview build
- removes pnpm-lock.yaml with a fresh install using bun

* Readme Update
- Updated the README to include more details surrounding `bun`

* update node version to latest LTS

* Update changelog
  • Loading branch information
edheltzel authored Sep 9, 2023
1 parent d1147f9 commit b6041a5
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 3,837 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.0
18.17.1
4 changes: 2 additions & 2 deletions .scrub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ OPTIONS="${YELLOW}site${NC}, or ${YELLOW}purge${NC}"
MALFUNCTION="👨‍🚀 Huston... We have a problem! Make sure you use ${OPTIONS}"
FRESH="🧼 Scrubbed ${WHITE}node_modules${NC}, ${WHITE}dist/${NC}, ${WHITE}all caches${NC} & ${GRAY}lock files${NC}, ✨"
SITE="🧼 Scrubbed ${WHITE}dist/${NC} & ${WHITE}all cache${NC} directories ✨"
PURGE="${GREEN}🧹 All Clean ✨${NC} ${FRESH}${NC} Run ${YELLOW}npm/yarn/pnpm install${NC} to start fresh 🤩"
PURGE="${GREEN}🧹 All Clean ✨${NC} ${FRESH}${NC} Run ${YELLOW}npm/yarn/pnpm/bun install${NC} to start fresh 🤩"
OOPS="🚀💥🔥 OOPS! We need a valid option – Try using ${OPTIONS}"
DEVFILES=".pnpm-debug.log dist/ _site/"
NODEFILES="node_modules package-lock.json pnpm-lock.yaml yarn.lock .yarn/ .jampack"
NODEFILES="package-lock.json pnpm-lock.yaml yarn.lock bun.lockb .yarn/ .jampack/ node_modules/"

################## DONT EDIT BELOW 👀 ########################
if [ $# -eq 0 ]
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@ All notable changes to Flightdeck for 11ty will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.8] - 2023-09-09

### Changed
- Readme update - covers [Bun](https://www.bun.sh) usage as package manager
- `purge` script with now remove `bun.lockb`
- `preview` script uses bunx in place of `npx`

### Removes
- pnpm-lock.yaml gone with a fresh install using bun

## [0.2.7] - 2023-08-24

### Changed
- Readme update
- all Rome converted to Biome
- Package.json update
- format and lint scripts updated to biome

### Removes
- Rome is removed from the project - Rome has been sunsetted
- Biome is now the default format and linting tool
Expand Down
117 changes: 57 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,6 @@ Jérôme Coupé's post [Structuring Eleventy Projects](https://www.webstoemp.com
- [Jampack](https://jampack.divriots.com/)
- [Biome](https://biomejs.dev/)

<details>
<summary>see all dependencies</summary>
<pre>
❯ npm list
[email protected] ~/flightdeck/for-11ty-esbuild
├── @11ty/[email protected] -> ./node_modules/.pnpm/@[email protected]/node_modules/@11ty/eleventy-plugin-syntaxhighlight
├── @11ty/[email protected] -> ./node_modules/.pnpm/@[email protected]/node_modules/@11ty/eleventy
├── @biomejs/[email protected] -> ./node_modules/.pnpm/@[email protected]/node_modules/@biomejs/biome
├── @divriots/[email protected] -> ./node_modules/.pnpm/@[email protected]/node_modules/@divriots/jampack
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/browserlist
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/cross-env
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/eleventy-plugin-embed-everything
├── [email protected] -> ./node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-sass-plugin
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/esbuild
├── [email protected] -> ./node_modules/.pnpm/[email protected][email protected]/node_modules/markdown-it-attrs
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/markdown-it
├── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/npm-run-all
└── [email protected] -> ./node_modules/.pnpm/[email protected]/node_modules/sass
</pre>
</details>
<p align="right">(<a href="#top">back to top</a>)</p>

<!-- GETTING STARTED -->
Expand All @@ -99,18 +79,22 @@ We are assuming that you already have Node with NPM and Git installed on your sy

#### 🤖 Dependencies

`pnpm` is our package manager of choice – we highly recommend you enable Node's [corepack](https://nodejs.org/api/corepack.html), this way all the `pnpm` commands are work out-of-the-box.
##### Package Managers

> Please be aware that this certainly won't be the most recent version of PNPM and as of this writing, PNPM is at version [7.5.0](https://github.com/pnpm/pnpm/releases).
Package managers are like dotfiles, everyone has their own preference. We have shifted to using [Bun](https://bun.sh/docs) as our primary package manager. **It’s very fast 🏎️💨**

Also, You can swap `pnpm` in favor of `yarn` or `npm` without any friction.
But, you can swap `bun` in favor of your preferences 👉 [PNPM](https://pnpm.io/), [Yarn](https://yarnpkg.com/), and [NPM](https://www.npmjs.com/)

We still highly recommend you enable Node's [corepack](https://nodejs.org/api/corepack.html), this way all you have Yarn and PNPM in your toolbox without the need to install them separately.

> Please be aware that this certainly won't be the most recent version of PNPM/Yarn.
- pnpm

```sh
corepack enable

corepack prepare pnpm@7.12.2 --activate
corepack prepare pnpm@latest --activate
```

### ⚙️ Installation
Expand All @@ -121,21 +105,28 @@ git clone https://github.com/edheltzel/flightdeck-for-11ty.git

```shell
cd flightdeck-for-11ty
pnpm install
bun install
```

<details>
<summary>See all NPM packages</summary>
<pre>pnpm list
Legend: production dependency, optional only, dev only

[email protected] flightdeck/for-11ty-with-esbuild

devDependencies:
@11ty/eleventy 2.0.1 browserlist 1.0.1 esbuild-sass-plugin 2.14.0 sass 1.66.1
@11ty/eleventy-plugin-syntaxhighlight 5.0.0 cross-env 7.0.3 markdown-it 13.0.1
@biomejs/biome 1.0.0 eleventy-plugin-embed-everything 1.16.0 markdown-it-attrs 4.1.6
@divriots/jampack 0.15.0 esbuild 0.19.2 npm-run-all 4.1.5 </pre>
<summary>see all dependencies</summary>
<pre>
❯ npm list
[email protected] ~/Developer/oss/flightdeck/for-11ty-esbuild
├── @11ty/[email protected]
├── @11ty/[email protected]
├── @biomejs/[email protected]
├── @divriots/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
</pre>
</details>
<p align="right">(<a href="#top">back to top</a>)</p>

Expand All @@ -147,32 +138,38 @@ available, but the `start` command is where all the magic 🪄 happens – it w
Again, the focus here is to keep Eleventy in control of the entire development and build processes, to keep things simple.

```shell
pnpm start
bun start
```

<details>
<summary>Available Run Commands</summary>
<pre>pnpm run

Lifecycle scripts:
start
eleventy --serve

Commands available via "pnpm run":
build
run-s clean build:11ty
build:11ty
cross-env ENV=production eleventy
preview
npx http-server dist -p 4000
format
biome format .
lint
biome check .
clean
./.scrub.sh site
purge
./.scrub.sh purge</pre>
<pre>bun run

flightdeck-for-eleventy scripts:

bun run start
eleventy --serve

bun run build
run-s clean build:11ty

bun run build:11ty
cross-env ENV=production eleventy

bun run preview
bunx http-server dist -p 4000

bun run format
biome format

bun run lint
biome check

bun run clean
./.scrub.sh site

bun run purge
./.scrub.sh purge</pre>
</details>

- `build` command - executes the production build of your site with Eleventy, includes HTML minification, compressed Sass, optimized images, and bundled javascript.
Expand All @@ -181,9 +178,9 @@ Commands available via "pnpm run":
- `format`, `lint` commands - use Biome for JS/TS/JSON formatting and linting.
- > **👀 NOTE: Both `format` and `lint` require an INPUT to be passed.** ie: `biome format .` 👈 this will find all JS/TS/JSON format issues for the entire project but will not fix them.
- > Any arguments passed to these commands will be passed to Biome. ie: `biome format src/assets/js --write` 👈 this will find all JS format issues and fix them in the `./src/assets/js/` only.
- > For more info: `pnpm run lint --help`[Biome Lint Docs](https://biomejs.dev/linter/#use-the-linter-via-cli) or `pnpm run format --help`[Biome Format Docs](https://biomejs.dev/formatter/#use-the-formatter-with-the-cli)
- > For more info: `bun run lint --help`[Biome Lint Docs](https://biomejs.dev/linter/#use-the-linter-via-cli) or `bun run format --help`[Biome Format Docs](https://biomejs.dev/formatter/#use-the-formatter-with-the-cli)
- `clean` command - scrubs/removes the `dist/` and `.cache` directories
- `purge` command - scrubs/removes the `dist/`, `.cache`, `node_modules`, and any lock files from npm, yarn, or pnpm. - A fresh install.
- `purge` command - scrubs/removes the `dist/`, `.cache`, `node_modules`, and any lock files from npm, yarn, pnpm or bun. - 🧼 A fresh install.
- **👀 NOTE: Both `clean` and `purge` are executed from a bash script**

<p align="right">(<a href="#top">back to top</a>)</p>
Expand Down
Binary file added bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"@biomejs/biome": "1.0.0",
"@divriots/jampack": "^0.15.0",
"browserlist": "^1.0.1",
"cross-env": "^7.0.3",
Expand All @@ -24,10 +23,13 @@
"start": "eleventy --serve",
"build": "run-s clean build:11ty",
"build:11ty": "cross-env ENV=production eleventy",
"preview": "npx http-server dist -p 4000",
"preview": "bunx http-server dist -p 4000",
"format": "biome format",
"lint": "biome check",
"clean": "./.scrub.sh site",
"purge": "./.scrub.sh purge"
},
"dependencies": {
"@biomejs/biome": "^1.1.2"
}
}
Loading

0 comments on commit b6041a5

Please sign in to comment.