npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

makestatic-deploy-site

v1.0.18

Published

Deploys the site to a configured provider

Downloads

22

Readme

Deploy Site

Deploy build files

Deploys build files using a configured deployment provider.



Install

yarn add makestatic-deploy-site

Configuration

The general syntax to configure a deployment is to add a deploy object with an environment and a deployment provider, for example to configure the stage environment to deploy to amazon s3:

module.exports = {
  deploy: {
    stage: {
      s3: {
        domain: 'website.com',
        credentials: {
          profile: 'default'
        }
      }
    }
  }
}

Deployment provider modules are resolved relative to your project so you need to install the providers you wish to use.

npm i makestatic-deploy-s3 --save

You can then clean, build and deploy the application with:

makestatic --env stage --provider s3

If you have an existing build and don't want to build before deployment you can perform a deployment by itself using the --deploy flag:

makestatic --env stage --provider s3 -d

API

DeploySite

Deploys the site to a configured deployment provider.

Deployment providers are classes that expose a deploy method.

This plugin will (after validation) instantiate an instance of the provider class and call the deploy function passing the processing context, the deployment config and the plugin options.

The provider deploy function should return a promise that resolves once the deployment is complete.

See Also

.before

DeploySite.prototype.before(context, options)

Validates deployment for a provider.

  • context Object the processing context.
  • options Object the plugin options.
Throws
  • Error if no deployment configuration is detected.
  • Error if no environment has been specified.
  • Error if no deployment provider has been specified.
  • Error if no deployment for the environment is configured.
  • Error if the output directory does not exist.

.after

DeploySite.prototype.after(context, options)

Performs deployment for a provider.

  • context Object the processing context.
  • options Object the plugin options.
Throws
  • Error if the deployment provider module could not be found.
  • Error if the deployment provider module errors.

#getProviderModuleName

static getProviderModuleName(config)

Gets the name of the module to require for a deployment provider.

The convention is to prepend makestatic-deploy- to the provider identifier.

Returns string module name.

  • config Object the deployment configuration.

#getProvider

static getProvider(config)

Requires a deployment provider module.

Deployment provider modules should resolve to a class.

Returns the deployment provider module.

  • config Object the deployment configuration.

License

MIT


Created by mkdoc on March 12, 2017