lottery
🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀
:small_orange_diamond: declarative small site generator
git clone https://github.com/awoojs/awoo.gitawoojs/awoo
Table of Contents
You need Node.js 7.6 or higher.
npm install --save awoo
Let's write a simple program that changes the content of all files in a directory to "hey, what's up":
const awoo = require('awoo')
// this is the simplest plugin you can build!
// conveniently, plugins are just normal functions
const plugin = () => {
// replace all file contents with the string
return files => files.map(file => {
file.contents = `hey, what's up`
return file
})
}
// enter our main function:
// the main function should be an async function so that
// it automatically returns a promise
awoo(async site => {
// we register our plugin...
site.use(plugin)
// ...and initiate the build process
return site
})
Let's save this as example.js. To run it, you need Node.js version 7.6 or
higher. The latest stable version will work.
node example.js
awoo doesn't output logs by default. If you want logs
(for example, for debugging), you can set the DEBUG environment variable to:
awoo # for base logs awoo:read # for specific read logs awoo:write # for specific write logs # you can also combine any of the three awoo,awoo:read
To get all logs at once, you can just set the variable to awoo*.
DEBUG=awoo* node my_script # full logging!
awoo plugins may implement logging with different DEBUG names.
It's fairly simple! What awoo does can be split up into two things:
awoo actually do things.awoo writes the files as they are described
in the gigantic array to disk.It's that simple! Static site generators aren't rocket science or whatever.
If you got confused by looking at the Jekyll source code once, that's because
Jekyll is more fully fledged than awoo is, that is, it provides some defaults.
But static site generators, at their core, are just programs that take a set of files, do something to them, and then output those files. That's it. The rest is just transformations on those files.
awoo's goal is to reduce that essence to its very base, and to give you a
bunch of building blocks with which you can make your ideal site, using only
the stuff you need!
The docs are published on our website.
Official plugins are kept at awoojs/core!
Since it's really easy to write awoo plugins, anyone can make and publish one!
If you make a plugin, you should add a GitHub topic awoo and probably also
add awoo as a keyword in your package.json.
Here's a list of all awoo plugins on GitHub
To work on this repository, clone it and install the npm dependencies:
git clone https://github.com/awoojs/awoo.git cd awoo npm install
There are a couple of npm scripts provided for convenience:
npm test - runs linters and ava in ci modenpm run lint - runs lintersnpm run ava - only runs ava oncenpm run ava:ci - runs ava in ci mode (generates coverage data)npm run ava:watch - runs ava in watch modenpm run coverage - generates coverage datanpm run update-coc - pulls the latest weallbehave code of conductnpm run deploy - publishes npm package using npThis section is a little bit about how awoo compares to other static site
generators (even though it isn't really that):
awoo, and
as a matter of fact, its main inspiration. It's also plugin-based, and works
with roughly the same concepts. The major difference is that awoo is more
up-to-date (I like promises a lot) and that the API is fairly different.
Also, it's just not really an active project with an active ecosystem
anymore (sadly!).deepmerge - used to handle configuration managementwalk - walks through directories to read themtrough - handles middleware chainsdebug - used for loggingto-vfile - converts to vfile, the virtual file format used by awoomkdirp - creates directories when writing to diskis-text-path - provides logic to correctly read binary filesIf you have any ideas as to how to eliminate a dependency, you're more than welcome to pitch it in a new issue!
This repository operates under the weallbehave Code of Conduct. Its contents can be found in CODE_OF_CONDUCT.md.
GNU AGPLv3 (see LICENSE document)
more like this
🎉🌟✨🎈年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品🧧🎁,文字,图片,抽奖规则均可配置,😜抽奖人员信息Excel一键导入😍,抽奖结果Excel导出😎,给你的抽奖活动带来全新酷炫体验🚀🚀🚀
Firefox and Chrome extensions to prevent Google from making links ugly.
search projects, people, and tags