Skip to content

Commit

Permalink
More versioning, milestone: Jekyll, Eleventy, and Hugo live editing
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Oct 11, 2024
1 parent f51d6ff commit e304582
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 829 deletions.
6 changes: 3 additions & 3 deletions javascript-modules/engines/astro-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@astrojs/compiler": "^1.0.0 || ^2.0.0",
"@bookshop/astro-bookshop": "3.10.1",
"@bookshop/vite-plugin-astro-bookshop": "3.10.1",
"astro": "^4.15.12",
"esbuild": "^0.19.1",
"esbuild-sass-plugin": "^2.13.0",
"postcss": "^8.4.29",
Expand All @@ -44,9 +43,10 @@
},
"peerDependencies": {
"react": "^17.0.2 || ^18.0.0",
"react-dom": "^17.0.2 || ^18.0.0"
"react-dom": "^17.0.2 || ^18.0.0",
"astro": "^2.0.0 || ^3.0.0 || ^4.0.0"
},
"engines": {
"node": ">=14.16"
}
}
}
6 changes: 5 additions & 1 deletion javascript-modules/engines/eleventy-engine/lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ export class Engine {
async exists() {
return true
},
dirname(file) {
return file.replace(/\/[^\/]+$/, "")
},
resolve(root, file, ext) {
return `${root}${file}`
}
},
sep: "/"
}
});
}
Expand Down
6 changes: 5 additions & 1 deletion javascript-modules/engines/jekyll-engine/lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ export class Engine {
async exists() {
return true
},
dirname(file) {
return file.replace(/\/[^\/]+$/, "")
},
resolve(root, file, ext) {
return `${root}${file}`
}
},
sep: "/"
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Hello World"

Scenario: Components are rendered from bookshop
Expand All @@ -41,7 +41,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Bookshop: Result 🤽‍♂️"

Scenario: Nested components are rendered from bookshop
Expand All @@ -57,7 +57,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Bookshop: Result 🤽‍♂️"

Scenario: Flat root components are rendered from bookshop
Expand All @@ -73,7 +73,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Bookshop: Result 🤽‍♂️"

Scenario: Nested flat components are rendered from bookshop
Expand All @@ -89,7 +89,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Bookshop: Result 🤽‍♂️"

Scenario: Standard components take precendence over flat components
Expand All @@ -109,7 +109,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Standard: Result 🤽‍♂️"

Scenario: Components can use the page front matter
Expand All @@ -126,7 +126,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "Bookshop: Result 🛗"

Scenario: Components can use further components
Expand All @@ -151,7 +151,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "<h1>🩳</h1>"
And site/_site/index.html should contain the text "<span>🪣</span>"

Expand All @@ -172,7 +172,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "<h1>🧻</h1>"
And site/_site/index.html should contain the text "<p>⛳</p>"

Expand All @@ -194,7 +194,7 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "🅰️🫀"
And site/_site/index.html should contain the text "🅱️🫑"

Expand All @@ -221,6 +221,6 @@ Feature: Basic Eleventy Bookshop
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should contain the text "tag-contents-tag"

Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Feature: Eleventy Bookshop Includes
"""
When I run "npm start" in the site directory
Then stderr should be empty
And stdout should contain "v1.0.0"
And stdout should contain "v3.0.0"
And site/_site/index.html should leniently contain each row:
| text |
| text |
| Component🎉 <!--bookshop-live end--> -Block |
| Site🎉 <!--bookshop-live end--> -Inline |
| Site🎉 <!--bookshop-live end--> -Inline |

This file was deleted.

Loading

0 comments on commit e304582

Please sign in to comment.