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

sails-generate-archive

v0.0.5

Published

A `archive` generator for use with the Sails command-line interface. This generate create a zip file (named "archiveX.X.X.zip") under a .archives folder who contains every files for a production server.

Downloads

13

Readme

sails-generate-archive

An archive generator for use with the Sails command-line interface.

This generate create a zip file (named "archiveX.X.X.zip") under a .archives folder who contains every files for a production server.

How does it works ?

The generator build all your assets files (js, css...) by lifting sails in production mode and then include all files in .tmp/public in zip file.

The generator also include all this file :

["/api", "/config", "/tasks", "/views", "/Gruntfile.js", "/app.js", "/package.json", "/.sailsrc"]

Like this all you have to do with the zip file is unzip it, make an npm install and then lift sails in production mode.

Sails will start quickly cause they only copy /assets folder in .tmp/public and it doesn't rebuild them.

How to deploy my archive ?

It's simple, first unzip your archive :

unzip archive0.0.1.zip -d myProject
cd myProject

Install dependencies :

npm install

Run your project in production :

sails lift --prod

Easy right ? :)

Why should I use this ?

If you use a server with low resources or if you deploy you project on a board like Raspberry PI. Your project will start quickly because grunt tasks don't rebuild assets.

Installation

Globally to use on every project you have (need to install sails globally too)

$ npm install -g sails-generate-archive

or for one project

$ npm install sails-generate-archive

Usage

On the command line
$ sails generate archive 

You can add file and folder if you want like this :

$ sails generate archive file1.js folder1 folder2 

Configuration

If you want to put other files in archives just add a /config/archive.js file like this :

module.exports.archive = {
	filesToArchive : ["/file1.js", "/testFolder"],
	removeFolder : true // Default to true, delete the tmp folder after ziping. You can force to false if you want to check or modify it after.
};

Development

To get started quickly and see this generator in action, ...

Also see CONTRIBUTING.md for more information on overriding/enhancing existing generators.

Questions?

See FAQ.md.

More Resources

License

MIT © 2015 balderdashy & contributors

As for Sails? It's free and open-source under the MIT License.

image_squidhome@2x.png