Vue-cli: How to init in current folder?

Created on 25 Jan 2016  Â·  6Comments  Â·  Source: vuejs/vue-cli

I want to init a webpack template in my current project my/project folder by running

➜  my/project vue init webpack

instead of jumping out and run $ vue init webpack my/project.

How to do it?

Most helpful comment

Now supported in 1.4.0.

All 6 comments

It's currently not supported. You can make a pull request for it though!

You could try this (_not tested_) to initialize a project in the current folder, take note of the dot as it is the one thing you were missing.

vue init webpack .

EDIT: Not working upon testing to please ignore this.

@nblackburn I'd tried before opening this issue. It got vue-cli · "." already exists.

Sorry, didn't have time to test it, try removing the folder rmdir DIRECTORY, going up to the parent directory cd ../ and then initializing the project as normal...

vue init webpack DIRECTORY

It's not ideal but it should work.

The problem is with this line as it wont init if the folder exists so the logic needs tweaking to allow this.

@nblackburn Of course it should work in that way.

Now supported in 1.4.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JIANGYUJING1995 picture JIANGYUJING1995  Â·  3Comments

miyamoto-san picture miyamoto-san  Â·  3Comments

sanderswang picture sanderswang  Â·  3Comments

joshuajohnson814 picture joshuajohnson814  Â·  3Comments

Akryum picture Akryum  Â·  3Comments