Project structure adapted from this template.
Make sure you're in /frontend
before running these commands.
npm install
npm run dev
npm run serve
npm run build
npm run test:unit
npm run test:e2e
npm run lint
The project is configured to use Bootstrap-Vue. Add any components you
The project is configured to use Font Awesome icons. To add an icon, first go to the Font Awesome icon list and find an appropriate icon.
- Go to
main.js
and add the icon name to the import statement from@fortawesome/free-solid-svg-icons
. This import has code-completion, so you should be able to find the icon name quickly. - Still in
main.js
, add the imported object to thelibrary.add(...)
statement. - You can now add the icon to your Vue components and views. Instantiate a new component with
<font-awesome-icon icon="my-imported-icon" />
You can configure the look and feel of the icons as well. See the reference documentation for more information.
Both the /views
and /components
directories hold Vue components. The components in /views
act as views for routing, as in the router will map one or more URLs to the component. If you look at /router/index.js
, the URLs are mapped to About.vue
and Home.vue
. On the other hand, /components
holds any Vue components which wil not be routed to.
You can think of views as pages. For example, /views
could have a User.vue
for a user profile, Settings.vue
for a settings screen, etc.
On the other hand, /components
has our backend-api.js
because that will be needed across the different "pages". It also has the "HelloWorld" template, which can be populated with different data for different views.
:)