How to use the Plugin function from @oclif/config

Find comprehensive JavaScript @oclif/config.Plugin code examples handpicked from public code repositorys.

23
24
25
26
27
28
29
30
31

test('all commands from 0.15.0 have aliases', async () => {
  const oldCommandNames = loadCommandNames(require('../data/oclif.manifest.0.15.0.json')).filter(name => name !== 'cloudmanager')

  const root = path.resolve('.')
  const thisPlugin = new Config.Plugin({ root, type: 'core', ignoreManifest: true, errorOnManifestCreate: true })
  await thisPlugin.load()

  const newCommandNames = loadCommandNames(thisPlugin.manifest)
fork icon26
star icon37
watch icon17

2
3
4
5
6
7
8
9
10
11
12
const { unlinkSync, writeFileSync } = require('fs');
const { resolve, join } = require('path');


async function manifest() {
  try { unlinkSync('.oclif.manifest.json') } catch {}
  let plugin = new Plugin({
    root: resolve(__dirname),
    type: 'core',
    ignoreManifest: true,
    errorOnManifestCreate: true
fork icon0
star icon5
watch icon0

16
17
18
19
20
21
22
23
24
25
  return this.log(`You have to specify one of your scripts to run ( ${Object.keys(Scripts.get()).join(' | ')} )`)
}

let script=Scripts.get()[args.scriptName]

let plugin = new Config.Plugin({
  root:__dirname,
  type: 'core',
  ignoreManifest: true,
  errorOnManifestCreate: true
fork icon0
star icon2
watch icon1