New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

scripts-dev

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scripts-dev

Tools and utilities for node js developmen with babel

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Development tools for Node JS applications

This is a small package for doing some task when we are developing node apps. It provides three scrips that we can use in our package.json

Scripts includes:

  • build
  • dev
  • start

Installation

We install the package with npm command

npm i --save scripts-dev

Configuration

Add in your package.json file the following lines inside "scripts"

"scripts": {
    "start": "app start",
    "dev": "app dev",
    "build": "app build"
  },

Usage

dev

If we are working in our maching with the code and we need to run the application for testing the code, we can use the run dev command.

npm run dev

This command execute nodemon with the file in src/index.js.

If we have some file like:

  • .env
  • .env.development
  • .env.production

when we run dev command it uses internally two packages, 'dotenv' and 'dotenv-expand', and we will have all enviroment available in our project.

build

As a mentioned before, we use this package when we use babel in our application. If we are ready for compiling the app, execute the following command:

npm run build

After compiling the app, the script will create a dist folder where, using babel, all files in src folde will be compiling in dist folder.

start

npm run start

using this command, the app will be started in production mode, using the file in dist/index.js

FAQs

Package last updated on 12 Sep 2018

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