1.0.2 • Published 3 years ago

@krissself/deploy-env v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Deploy Env By Config

  1. in project root, create an environments dir

  2. make a config file config.js in environments dir

const path = require('path')

module.exports = {
  deploy_path: path.join(__dirname, '../'),
  envs: {
    dev: path.join(__dirname, 'dev'),
    t1: path.join(__dirname, 't1'),
    t2: path.join(__dirname, 't2'),
  }
}
  1. put your envs files to dir under environments

dir like:

  • root
    • environments
      • dev a.xx b.xx
      • t1 a.xx b.xx
      • t2 a.xx b.xx
      • config.js
  1. open cmd and exec deploy-env -e <env>(replace with your envs key)

files in <env> dir will be copy to deploy_path