Socket
Socket
Sign inDemoInstall

serverless-jsconfig-plugin

Package Overview
Dependencies
21
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    serverless-jsconfig-plugin

Adds functionality to Serverless to use JS files for configuration.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.19 MB
Created
Weekly downloads
 

Readme

Source

Serverless JS Config Plugin

serverless npm version

Allows the use of JS based files within the project for configuration. These JS files are then compiled into JSON files for use natively by the Serverless Framework.

Note: Requires Serverless v0.5.0 or higher.

Setup

  • Install via npm in the root of your Serverless Project:
npm install serverless-jsconfig-plugin --save
  • Add the plugin to the plugins array in your Serverless Project's s-project.json, like this:
plugins: [
    "serverless-jsconfig-plugin"
]
  • Enter your project folder and use the following command to create all the JS config files from the existing JSON config files:
sls jsconfig convert
  • Edit your JS config files, then run the following command to build them into JSON files:
sls jsconfig build -o
  • All done!

Common Pitfalls

Chicken Egg Problem

Serverless still requires all JSON files to be present to operate. If you remove the JSON files from your project, then serverless will no longer run correctly. This also means the JS Config plug will also stop functioning, and you will not be able to rebuild the JSON files.

DO NOT REMOVE YOUR JSON FILES!

Keywords

FAQs

Last updated on 31 Mar 2016

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