Socket
Book a DemoInstallSign in
Socket

sails-generate-archive

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sails-generate-archive

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.

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Stackoverflow
  • #sailsjs on Freenode (IRC channel)
  • Twitter
  • Professional/enterprise
  • Tutorials
  • Sails.js logo (small)

License

MIT © 2015 balderdashy & contributors

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

image_squidhome@2x.png

Keywords

archive

FAQs

Package last updated on 13 Oct 2015

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.