@quasar-ai/lolth.tools.publisher

0.1.1 • Public • Published

lolth.tools.publisher

A toolset for publishing static website, companied with project lolth.server.static

It is currently for:

  • Convert HTML files into handlebars templates with {{ .BaseURL }} placeholders for any relative path
  • Publish asset files to S3 storage

Install

Install with yarn

yarn -D lolth.tools.publisher

or npm

npm install -D lolth.tools.publisher

Make Templates

lopath tpl [ROOT_DIR] [-d|--dryrun]

Scan HTML files recursively in ROOT_DIR and make templates. Note that if ROOT_DIR is not specified, folder dist will be used as default.

HTML files will be overridden by this command.

You can run this command with flag -d or --dryrun to test if there's any error and for checking if all relative paths are detected.

Publish To Server

To AWS S3

For now this is the only service supported. More services may be added on need.

lopath pub s3 <BUCKET> [ROOT_DIR] [-d|--dryrun]

Sync and push files in ROOT_DIR to an AWS S3 bucket. Note that if ROOT_DIR is not specified, folder dist will be used as default.

BUCKET refers to an S3 bucket identifier, which must starts with s3://. Take s3://foo-bucket as an example.

You can run this command with flag -d or --dryrun to check files to be synchronized before actually pushing them.

Readme

Keywords

none

Package Sidebar

Install

npm i @quasar-ai/lolth.tools.publisher

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

9.04 kB

Total Files

16

Last publish

Collaborators

  • wizcas