michaellyu / vue-generator

Initial router and components for the Vue project.
MIT License
7 stars 2 forks source link

No Vue.js #1

Open claytondukes opened 5 years ago

claytondukes commented 5 years ago

Hi, I am new to vuejs and wanted to try this. It's not generating a Vue.js file, should it be? I'm sure it's just my lack of knowledge :)

➜  src vue-generator init
➜  src tree
.
└── router.yaml

0 directories, 1 file
➜  src vue-generator all
➜  src tree
.
├── router.yaml
└── src
    ├── components
    │   ├── Index.vue
    │   ├── account
    │   │   ├── Account.vue
    │   │   └── Login.vue
    │   └── article
    │       ├── Article.vue
    │       ├── ArticleList.vue
    │       └── article-detail
    │           ├── ArticleDetail.vue
    │           ├── Edit.vue
    │           └── Index.vue
    └── router
        ├── account
        │   └── index.js
        ├── article
        │   ├── article-detail
        │   │   └── index.js
        │   └── index.js
        └── index.js

9 directories, 13 files
michaellyu commented 5 years ago

Thank you for your issue.

I think I should supplement my documentation based on your question.

vue-generator is a tool for quickly generating router and components initial files, so assume that you already have an empty Vue empty project.

You can try to use @vue/cli together, @vue/cli to initialize the empty project, vue-generator to quickly generate router and components according to your custom router.yaml.

vue create vue-generator-demo

cd vue-generator-demo

vue-generator init

# ... edit router.yaml

vue-generator all

mv src/router.js src/router.bak.js

npm run serve

# ... open browser http://localhost:8080/#/account/login

wish you happiness :)