Skip to content

How could i observe events when i use @vue/cli-service in js file with nodejs environment #4093

@ShmilyLin

Description

@ShmilyLin

What problem does this feature solve?

When I run vue-cli-service using the nodejs environment, how do I subscribe to some of these things, like 'ready'.

in package.json

"scripts": {
    "dev": "node build/dev-run.js",
    "start": "electron .",
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },

in build/dev-run.js

let vueProcess = new VueCliService(path.join(__dirname, '../'));
vueProcess.run('serve');

// here, i want observe vueProcess events

what should I do?
thanks

What does the proposed API look like?

VueCliService.on(event, callback);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions