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

Reboot with TDD to get this up to speed #13

Merged
merged 23 commits into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e2a50a8
Simplify pages' configuration format
FND Nov 7, 2018
264cf4b
Simplify internals by avoiding excessive asset-manager references
FND Nov 7, 2018
328b26b
Add support for JavaScript modules as pages' configuration format
FND Nov 7, 2018
d069aea
Create abstraction for page hierarchies
FND Nov 8, 2018
ac689aa
Create abstraction for sites (i.e. styleguide instances)
FND Nov 9, 2018
b5143e3
Generate site structure
FND Nov 10, 2018
d051bb9
Replace obsolete implementation
FND Nov 12, 2018
508fe5c
Restoring functionality
moonglum Nov 14, 2018
2e95dba
Delete generated files in node
moonglum Nov 14, 2018
268326f
Move acorn to dev dependencies
moonglum Nov 14, 2018
dcafccf
Renamed examples to snippets
moonglum Nov 14, 2018
a5f6992
Adjust package*json to .editorconfig
moonglum Nov 14, 2018
29bf668
Rename file
moonglum Nov 14, 2018
20c6e72
Report writing files
moonglum Nov 14, 2018
6db1f5e
Provide the correct path to style.css
moonglum Nov 14, 2018
7a189f8
Switch to released version of faucet-pipeline-sass
moonglum Nov 15, 2018
7cc4466
Preparation: Users need to require their pages themselves
moonglum Nov 15, 2018
c10ccbd
Another library that doesn't bother to put a newline at the end of a …
moonglum Nov 15, 2018
c7bebc8
Cleanup
moonglum Nov 15, 2018
e23054c
Cleanup faucet.config.js
moonglum Nov 15, 2018
d323188
Add tests for PageRenderer
moonglum Nov 15, 2018
eab05ef
Preparatory Refactoring: Load all pages before starting the rendering
moonglum Nov 16, 2018
270fadf
Generate the navigation
moonglum Nov 16, 2018
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
6 changes: 6 additions & 0 deletions faucet.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ module.exports = {
}],
watchDirs: ["./pages.json", "./components", "./lib"],

// TODO: this will be read from the site configuration
manifest: {
baseURI: "/",
webRoot: "./dist"
},

// this will not be necessary when this is released
plugins: {
styleguide: {
Expand Down
4 changes: 2 additions & 2 deletions lib/generate_layout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = tree => {
module.exports = (tree, manifest) => {
let navigation = generateNavigation(tree);

return (page, content) => `<!doctype html>
Expand All @@ -8,7 +8,7 @@ module.exports = tree => {
<title>${page.title}</title>
<meta name="description" content="${page.description}">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/style.css" rel="stylesheet">
<link href="${manifest.get("dist/style.css")}" rel="stylesheet">
</head>
<body>
<nav>${navigation}</nav>
Expand Down
2 changes: 1 addition & 1 deletion lib/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module.exports = class Site {
tree = await this.load();
}

let layout = generateLayout(tree);
let layout = generateLayout(tree, this.assetManager.manifest);
let pageRenderer = new PageRenderer({ renderers, layout });

let dirs = new Set();
Expand Down
49 changes: 31 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"complate-stream": "^0.16.4",
"faucet-pipeline-core": "^1.1.0",
"faucet-pipeline-jsx": "^1.1.0",
"faucet-pipeline-sass": "^1.0.0",
"faucet-pipeline-sass": "faucet-pipeline/faucet-pipeline-sass#bugfix-godot",
moonglum marked this conversation as resolved.
Show resolved Hide resolved
"faucet-pipeline-static": "^1.0.0",
"live-server": "^1.2.0",
"metacolon": "^1.0.0",
Expand Down