Package Exports
- @protolith/morphic
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@protolith/morphic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
morphic
Node.js Static Site Generator
Install
npm install -g @protolith/morphicUsage
mkdir morphic-sitecd morphic-sitemkdir contentmkdir templatescd contentecho '---
title: Home
---
# <%= model.title %>
home page content' > index.mdcd ../templatesecho '<!DOCTYPE html>
<html>
<head>
<title><%= model.title %></title>
</head>
<body>
<%- model.content %>
</body>
</html>' > index.ejscd ..With the default files created, from the morphic-site folder run the command:
npx morphic --serveThis will create an output folder containing the generated html, and open a browser window to view.
Build
Clone repo and run:
npm run buildor
npm run build-typecheckThese commands will compile the typescript src directory to a new folder named dist, containing the javascript output.
Building without typechecking will not pass source files through the typescript compiler (only babel).
Notice
Morphic is very much still a work in progress and is not ready for production use.