An adorable library for building a static site generator
An adorable library for building static site generators
Looking to build a Puppy-powered prototype? Head over to the main Puppy repo!
nvm install
npm install
const puppy = require('@upstatement/puppy');
const stream = require('stream');
const twig = require('gulp-twig');
const util = require('util');
const html = async function () {
const pipeline = util.promisify(stream.pipeline);
const pages = await puppy({
publicPath: '/',
pages: 'src/pages/**/*',
data: 'src/data/**/*',
});
const compile = twig({
namespaces: { puppy: 'src/templates' },
useFileContents: true,
});
const dist = dest('dist');
return pipeline(pages, compile, dist);
};
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
This library is hosted on npmjs.com. To create a new release and publish to NPM:
Make sure you are on the main
branch, have pulled the latest changes from GitHub, and have no local changes:
git checkout main
git pull
git status
The last command should return the following:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Bump the version according to semantic versioning rules
npm version major|minor|patch
Push the commit up to the GitHub repository
Make sure you are logged in as a user that has access to the @upstatement/puppy
package
# Check who you are currently logged in as
npm whoami
# Login if you're not logged in
npm login
Publish to NPM
npm publish
After the release is published, submit a PR to the @upstatement/puppy template repo (example PR) that updates the version constraint to the new release number.
Copyright © 2022 Upstatement, LLC