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

vue-cli-plugin-select-env

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-cli-plugin-select-env

select env plugin for vue

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

vue-cli-plugin-select-env

usage

install

install plugin

vue add select-env or vue invoke select-env

config

create dev.option.js

const inquirer = require('inquirer');

const choices = [
  {
    name: 'foo',
    target: 'http://foo.com',
  },
  {
    name: 'bar',
    target: 'http://bar.com',
  },
];

const promptList = [
  {
    type: 'list',
    message: 'Choose the environment:',
    name: 'env',
    choices,
  },
];

async function getOption() {
  const answer = await inquirer.prompt(promptList);
  const option = choices.find(choice => {
    return choice.name === answer.env;
  });
  return option;
}

module.exports = {
  getOption,
};

run

yarn serve --select-env

FAQs

Package last updated on 16 Apr 2020

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