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

williamstar picture williamstar  ·  79Comments

yyx990803 picture yyx990803  ·  80Comments

brunoseco picture brunoseco  ·  35Comments

ghenry picture ghenry  ·  40Comments

yangzhuq picture yangzhuq  ·  33Comments