Quasar CLI allows you to start new projects in no time by generating a starter boilerplate filled with everything you need. It also does most of the heavy-lifting so you don’t have to take care of the redundant tasks. You must install it to generate and manage a Quasar App.
Familiarize yourself with the list of commands:
See help for any command:
Check CLI version and if on a Quasar app folder also output Quasar version being used.
Initializes an App folder with a starter boilerplate.
By omitting the
template nameparameter the CLI will detect latest App template and generate the App folder with it.
You can check available App template list at any time with:
Developing your App by compiling and maintaining code in-memory. A web server will serve your App while offering hot-reload out of the box. Running in-memory offers faster rebuilds when you change your code.
Hot Reload is much more than just refreshing your browser when code changes. It skips the refresh and updates your code on the fly while maintaining your App’s state (like your VueModel’s data). Please note that there are cases when this is impossible, so the dev webserver will simply refresh your browser.
Furthermore, you can develop your App directly on a phone and still benefit from Hot-Reload. Download and install the Quasar Play App (currently only on Google Play Store).
If you wish to change the port serving your App you have 2 options:
- Open up
/config/index.jsfile and change
- If this is a one time thing, specify the port as an environment variable:$ PORT=3000 quasar dev
Quasar CLI can pack everything together and optimize your App for production. Minifies source code, extracts vendor components and leverages browser cache, and many more.
You can also clean up the build assets with:
After creating an App folder with the CLI, inside your App you’ll have a folder named
/templates that contains templates for:
view (page), or a generic Vue
You can generate components for your App in your
Add your own component templates. Quasar will be able to handle them.
Current App Wrappers available are for Cordova & Electron. More will be added in the future, to allow you to build a Google Chrome extension or a Progressive Web App, to name a few examples.
The CLI command is like this:
You are able to create an ad-hoc web server to serve static-content web files from a folder. Browser sessions are automatically refreshed when content changes. User click/scroll can be synchronized.
This command comes in really handy after building your Quasar App for production. The
/dist folder contains files that are meant to be served with a webserver. So here you go:
This command does not rely on Quasar Framework. Any folder with any web content can be served.