Introduction, installation and use of Quasar

Friendly Attention: The inspiration writing platform that our Mu Feiyu team spent more than half a year developing will be launched at the end of 2021, Here at Mo Feiyu I hope to help more people find the joy of reading and writing. Please bookmark it and see you at the end of December~

Why quasar is needed

Quasar (pronounced /ˈkweɪ.zɑɹ/) is an open source Vue.js framework based on the MIT license. Web developers can quickly create responsive++ websites/applications with a variety of functions, including:

  • SPA (Single Page Application)
  • SSR (Server Side Rendered Application) (+optional PWA client takeover)
  • BEX (browser extension)
  • Mobile Apps (Android, iOS, etc.)
  • Multi-platform desktop application (using Electron)
    Quasar’s motto is:One stop for all platforms, that is, write the code once and deploy it as a website, mobile app and application at the same time. One code base for all code and reusable components through Quasar Web will help you develop applications in record time.

These alone are not enough, quasar'scommunity is also great. If you want to know more about its source code structure, you can visit its /span>git’s open source website

Quasar CLI installation

Make sure Node> = 10 and NPM> = 5 are installed on your computer.
Warning: Do not use any Node version higher than 14+. Webpack 4 does not support any version of Node higher than this, and Quasar will not be able to migrate to Webpack 5 without significant changes. However, Quasar will support Webpack 5 in a future version; also don't use versions 13, 15, etc. of Node, which have not been tested by Quasar

# cli的全局安装命令
$ npm install -g @quasar/cli

This way, you can use the Quasar CLI to create a project folder

# 下面这个命令要在windows命令提示符中进行
# 如果是使用vscode的terminal执行,可能会出现'因为在此系统上禁止运行脚本的错误'提示,那么可以使用以下方法解决
# 以管理员身份运行vscode;
### 执行:get-ExecutionPolicy,显示Restricted,表示状态是禁止的;
### 执行:set-ExecutionPolicy RemoteSigned;
### 这时再执行get-ExecutionPolicy,就显示RemoteSigned
$ quasar create <folder_name>

Tips: Quasar CLI consists of two software packages: @quasar/cli and *@quasar/app*. The first one is optional and only allows you to create a project folder and run Quasar commands globally. The second package is its core and is installed into every Quasar project folder

After executing the quasar command, there will be a series of questions related to the project configuration. After filling in the answers and naming the project demoapp, you can create a folder called demoapp in the current directory. Open the folder to see all the files of the quasar project. Already generated.

// package.json
"scripts": {
  "dev": "quasar dev",
  "build": "quasar build",
  "build:pwa": "quasar build -m pwa"
}

Execute npm run dev to see the running results of the demo.

Statement: The article is a summary of the author's personal experience and experience. It is a personal original article. You are welcome to reprint and indicate the source. The link address of the original blog article is:
https:// tech.limuqiao.com/archives/52.html

Guess you like

Origin blog.csdn.net/mini_snow/article/details/115914027