DEV Community

Muhammad Fauzan
Muhammad Fauzan

Posted on

NPM install configuration in top of YAML for fast NPM install usage.

Repository : https://github.com/fncolon/npm-fast-installer

NPM install configuration in top of YAML for fast NPM install usage.

See the documentation here on wiki also

Table Of Contents

Introduction

NPM install configuration in top of YAML for fast NPM install usage.

Structure of configuration file

# install dependencies (also we know as simple `npm install`)
dependencies:       
  # example       
  express: "latest"  
# install devdependencies (also we know as `npm install -D` which contains package for development and build our bundle)    
devDependencies:  
# install global dependencies (also we know as `npm install -g`)      
global:
Enter fullscreen mode Exit fullscreen mode

How to init sample configuration file

You can do like the following for example:

npx npm-fast-installer init pre-commit-installation
Enter fullscreen mode Exit fullscreen mode

How to run the configuration file

You can do like the following for example:

npx npm-fast-installer ./pre-commit-installation.yml
Enter fullscreen mode Exit fullscreen mode

Closing

if you want to manage your nodejs packages with nice comment e.g like pubspec_yaml in dart, you don't need to research some packages and install it one by one anymore, just bundle it in a file that represent the usability with the filename e.g express.yml like the existing example, you can try this package, it running simply with npx!

Discussion (2)

Collapse
drsensor profile image
DrsEnsor

FYI, pnpm soon will support both package.yaml and package.json5 πŸ˜‰

All commands should work with package.{yaml,json5} #1803

  • [x] install
  • [x] update
  • [x] uninstall
  • [x] link
  • [x] unlink
  • [x] list
  • [x] outdated
  • [x] recursive
  • [x] run
  • [x] test
  • [x] start
  • [x] stop
  • [x] restart
  • [x] install-test
  • [ ] version
  • [x] publish
  • [ ] unpublish
  • [x] pack
  • [ ] dist-tag
  • [ ] init
  • [x] rebuild

related #1100

Collapse
fncolon profile image
Muhammad Fauzan Author • Edited

this is awesome if pnpm did this kind of move, well i let this be if you don't want to use pnpm