Socket
Socket
Sign inDemoInstall

@cloudcannon/dist

Package Overview
Dependencies
13
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cloudcannon/dist

Allows you to make a clone of your site with a different baseurl.


Version published
Weekly downloads
7
increased by250%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

cli-dist

The CLI for the CloudCannon dist package.

Requires node >=11.0.0

Build Status codecov

Contents

  • Build
  • Clean
  • Clone Assets
  • Dist
  • Rewrite CSS
  • Rewrite HTML
  • Serve
  • Watch

Commands

Build

build

Cleans dest, and copies files from src to dest/baseurl. CSS and HTML files have their hrefs/urls/etc to include baseurl.

Example:
$ dist build -b baseurlName
Required flags:

[-b | --baseurl ]

Clean

clean

Deletes all files in dest.

Example:
$ dist clean -d path/To/Destination

Clone Assets

clone-assets

Copy the files from source to destination/baseurl without altering the data in any way.

Example:
$ dist clone-assets -b baseurl
Required flags:

[-b | --baseurl ]

Dist

dist

Runs build, serve, then watch. Is the default command (runs when no command is specified by user.)

Example:
$ dist -s path/to/src -d path/to/dest -b baseurlName
Required flags:

[-b | --baseurl ]

Rewrite CSS

rewrite-css

Copies css files from src to dest/baseurl. Then rewrites the newly copied files so that urls/hrefs/etc that reference local content have baseurl prepended to them.

Example:
$ dist rewrite-css -b baseurlName
Required flags:

[-b | --baseurl ]

Rewrite HTML

rewrite-html

Copies html files from src to dest/baseurl. Rewrites the newly copied files so that urls/hrefs/etc that reference local content have baseurl prepended to them.

Example:
$ dist rewrite-html -b baseurlName
Required flags:

[-b | --baseurl ]

Serve

serve

Serves the files on a local webserver, so that they my be viewed in a browser.

Example:
$ dist serve -d path/to/dest

Watch

watch

Continuously watches the dest/baseurl directory to check for changes. If a change occurs, then the browser that is viewing the local webserver will be reloaded, so that the new content can be viewed. Because this process runs continously, it does not return an exit code because it must be cancelled by the user in-terminal.

Example:
$ dist watch -d path/to/dest

Keywords

FAQs

Last updated on 10 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc