init
This commit is contained in:
commit
21e7d37205
15 changed files with 997 additions and 0 deletions
29
test-build.nix
Normal file
29
test-build.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Simple test to verify our Nix web development setup works
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
|
||||
# Import our modules
|
||||
html = import ./src/core/html.nix { inherit pkgs; };
|
||||
css = import ./src/core/css.nix { inherit pkgs; };
|
||||
components = import ./src/core/components.nix { inherit pkgs html css; };
|
||||
content = import ./src/data/content.nix;
|
||||
|
||||
# Test page generation
|
||||
testPage = import ./src/pages/index.nix { inherit components content; };
|
||||
testStyles = import ./src/styles/main.nix;
|
||||
|
||||
in {
|
||||
# Test outputs
|
||||
htmlOutput = testPage.html;
|
||||
cssOutput = testStyles.css;
|
||||
|
||||
# Verification
|
||||
isValid = builtins.isString testPage.html && builtins.isString testStyles.css;
|
||||
|
||||
# Component test
|
||||
componentTest = {
|
||||
headerExists = builtins.hasAttr "terminalHeader" components;
|
||||
heroExists = builtins.hasAttr "heroSection" components;
|
||||
footerExists = builtins.hasAttr "terminalFooter" components;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue