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

lightcraft

v0.0.3

Published

Tool for deploying frontend apps to cloud

Downloads

2

Readme

:rocket: Lightcraft

Lightcraft is a tool for deploying frontend apps to cloud.

Install

npm install lightcraft

Introduction

To deploy with Lightcraft, you don't need to set up any infrastructure, all you need is an account at some cloud storage service. Currently it supports only Google Cloud Storage, but adding more providers is not hard.

Lightcraft supports rolling releases, so you always can switch back to the previous release if something goes wrong.

To ensure that files that have not changed across deployments remain cached on clients, Lightcraft stores files of all releases in the single directory. Because of this you need to set up your build to:

  • Insert hashes of files content into the filenames.
  • Generate manifest.json file. If you use webpack, you can do it with webpack-manifest-plugin.

Deploy process

During the deploy process Lightcraft performs following steps:

  1. Creates lockfile in the upload directory, so another deploy process can't be started, until current deploy is finished.
  2. Uploads new files. To save time if some of the files was not changed since last release, it will not reupload them.
  3. Uploads manifest and updates releases.json file.
  4. Cleans up. Removes old releases that you no longer want to keep and files remaining after unsuccessful deployments.
  5. Removes lockfile.

Configuration

Lightcraft can load configuration from .lightcraftrc file in JSON/YAML format or lightcraft.config.js file in your project. Configuration has following options:

// lightcraft.config.js
module.exports = {
    // path to directory with files
    filesPath: './build',

    // path to manifest file
    manifestPath: './build/manifest.json',

    // path for deploy on server
    uploadPath: 'releases',

    // number of releases you want to keep
    keepReleases: 3,

    // cloud provider, currently only Google Cloud Storage is supported
    provider: 'GCS',

    // options for Google Cloud Storage
    GCSOptions: {
        projectId: 'project-id',
        bucketName: 'bucket-name',
        keyFilename: './key.json'
    }
}

Commands

deploy [--config file]

Deploy files to cloud.

cleanup [--config file]

Clean files of old and unsuccessfull releases.

unlock [--config file]

Manually unlock. Use when something went wrong.

reset [--config file]

Removes deploy directory.

License

This software is released into the public domain. See the LICENSE file.