Skip to content

Commit c95befd

Browse files
committed
Add Vue CLI questions and answers
1 parent 4fc5077 commit c95befd

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ List of 300 VueJS Interview Questions
187187
|178| [What are the principles enforced by vuex?](#what-are-the-principles-enforced-by-vuex)|
188188
|179| [Can I perform mutations directly in strict mode?](#can-i-perform-mutations-directly-in-strict-mode)|
189189
|180| [How to use model directive with two way computed property?](#how-to-use-model-directive-with-two-way-computed-property)|
190+
|181| [What is Vue CLI?](#what-is-vue-cli)|
191+
|182| [What are the features provided by Vue CLI?](#what-are-the-features-provided-by-vue-cli)|
192+
|183| [What is instant prototyping?](#what-is-instant-prototyping)|
193+
|184| [How do you create project using Vue CLI?](#how-do-you-create-project-using-vue-cli)|
194+
|185| [How do you create project using GUI?](#how-do-you-create-project-using-gui)|
195+
|186| [What are plugins in vue CLI?](#what-are-plugins-in-vue-cli)|
190196

191197
1. ### What is VueJS?
192198
**Vue.js** is an open-source, progressive Javascript framework for building user interfaces that aim to be incrementally adoptable. The core library of VueJS is focused on the `view layer` only, and is easy to pick up and integrate with other libraries or existing projects.
@@ -3252,4 +3258,63 @@ List of 300 VueJS Interview Questions
32523258
}
32533259
}
32543260
```
3261+
181. ### What is Vue CLI?
3262+
Vue CLI is a simple command line interface for scaffolding Vue.js projects. It will be helpful for rapid Vue.js development. You can install the npm package globally as below,
3263+
```javascript
3264+
npm install -g @vue/cli
3265+
# OR
3266+
yarn global add @vue/cli
3267+
```
3268+
You can find the install version using `vue --version` command.
3269+
**Note:** Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended).
3270+
182. ### What are the features provided by Vue CLI?
3271+
VueCLI provides below major features,
3272+
1. Interactive project scaffolding via @vue/cli
3273+
2. A rich collection of official plugins integrating the best tools in the frontend ecosystem.
3274+
3. A full graphical user interface to create and manage Vue.js projects.
3275+
4. Zero config rapid prototyping via combination of @vue/cli and @vue/cli-service-global
3276+
5. A runtime dependency (@vue/cli-service) built on top of webpack and extensible via plugins
3277+
183. ### What is instant prototyping?
3278+
In Vue CLI, Instant prototyping is known as rapid prototyping with just a single *.vue file with the `vue serve`(similar to vue create) and `vue build` commands. But you need to install below global addon for this.
3279+
```javascript
3280+
npm install -g @vue/cli-service-global
3281+
# or
3282+
yarn global add @vue/cli-service-global
3283+
```
3284+
You can also provide entry component for `vue serve` and target file for `vue build` using below commands
3285+
```javascript
3286+
vue serve MyComponent.vue
3287+
vue build MyComponent.vue
3288+
```
3289+
184. ### How do you create project using vue cli?
3290+
You can create project using `vue create` command
3291+
```javascript
3292+
vue create my-app
3293+
```
3294+
You can either choose the default preset or select "Manually select features" to pick the features you need.
3295+
The default preset prompt would be as below,
3296+
<img src="https://github.com/sudheerj/vuejs-interview-questions/blob/master/images/cli-default-presets.png" width="400" height="500">
3297+
and the manual select features would be as below,
3298+
<img src="https://github.com/sudheerj/vuejs-interview-questions/blob/master/images/cli-manual-features.png" width="400" height="500">
3299+
3300+
185. ### How do you create project using GUI?
3301+
You can also create and manage projects using a graphical interface with the `vue ui` command. Once you apply this command, it opens a browser window with a GUI that guides you through the project creation process.
3302+
<img src="https://github.com/sudheerj/vuejs-interview-questions/blob/master/images/cli-gui.png" width="400" height="500">
3303+
186. ### What are plugins in vue CLI?
3304+
Vue CLI uses a plugin-based architecture where each plugin can modify the internal webpack configuration and inject commands to `vue-cli-service`. i.e, Each feature is implemented as a plugin. This architecture makes Vue CLI flexible and extensible.
3305+
187. ### ?
3306+
188. ### ?
3307+
189. ### ?
3308+
190. ### ?
3309+
191. ### ?
3310+
192. ### ?
3311+
193. ### ?
3312+
194. ### ?
3313+
195. ### ?
3314+
196. ### ?
3315+
197. ### ?
3316+
198. ### ?
3317+
199. ### ?
3318+
200. ### ?
3319+
201. ### ?
32553320

images/cli-default-presets.png

101 KB
Loading

images/cli-gui.png

132 KB
Loading

images/cli-manual-features.png

134 KB
Loading

0 commit comments

Comments
 (0)