@ax2/xms-core

0.3.0 • Public • Published

xms-core

XMS Core

Build Status

xms-core using Vue.js integrated Graphql along with Vuetify.js, app developed and maintained by AX2.

Prerequisites

The following are required:

  • Node (10.15.1 as of writing this)
  • Yarn (1.15.2 as of writing this)

Check currently installed versions of those requirement by running:

node --version && yarn --version
  • Set local environment variables by copying .env.example to .env (each variable is explained right in the .env.example file, adapt them as needed):
cp .env.example .env

From your project directory:

git clone git@github.com:ax2inc/xms-modules.git modules
git clone git@github.com:ax2inc/xms-ax2-boilerplate.git project

Node

To easily manage your Node versions, it is recommended to install nvm. Once nvm is installed, run the following command:

nvm install 10

This will install the latest iteration of Node 10 and enable it for your current session.

If you have Node 10 installed and just want to enable it for the current session, run:

nvm use 10

To set Node 10 as the default verion for subsequent sessions:

nvm alias default 10

Yarn

There are several ways to install Yarn. The easiest way is using Homebrew:

brew install yarn

To update Yarn to the latest version:

brew upgrade yarn

Get started

Once your environment is all set, you can install the project's dependencies:

To start the development server:

yarn dev

To build and start the app in production mode:

yarn build
yarn start

Configuration

Some parts of the app can be configured via a .env file. A .env.example containing all available configuration variables can be used as a template for your own setup.

Here are the available options:

Variable Description
VUE_APP_GRAPHQL_WS URL used to make requests server-side. You can use wss for secure connection
VUE_APP_GRAPHQL_HTTP URL used to make HTTP requests server-side (GraphQL)
VUE_APP_API_ROOT URL used to make HTTP requests server-side (REST)
VUE_APP_MODULES_ENV Application environment
VUE_APP_SENTRY_DSN Sentry DSN for error reporting
VUE_APP_MAIL_JWT_SECRET JWT token for secure connection to mail API
VUE_APP_MAIL_FEEDBACK Feedback email address
VUE_APP_MAIL_BUGREPORT Bug report email address
VUE_APP_MAIL_URL URL for the api mail for feedback and bug report
VUE_APP_GOOGLE_ANALYTICS_UA_CODE URL for the Google Analytics api

Continuous Integration / Deployment

For Continuous Integration, the following linting tasks must be run to ensure code quality:

yarn lint
yarn test:e2e
yarn test:unit

NPM scripts

We register a number of scripts in the project's package.json here's the list of scripts and a description of what they do:

yarn dev

Run the development server with HMR enabled on http://127.0.0.1:8080/

yarn build

Build a production-ready bundle of the app

yarn start

Run the server in production mode, should be run after yarn build

yarn lint

Lint Javascript code with ESLint

Project setup

yarn install

Compiles and hot-reloads for development

yarn dev

Compiles and minifies for production

yarn run build

Lints and fixes files

yarn run lint

Run your unit tests

yarn run test:unit

Run your end-to-end tests

yarn run test:e2e

Versioning of yarn.lock

To generate a yarn.lock file to be versioned, dependencies from the configuration have to be ignored :

  • Remove workspaces in package.json
  • Install dependencies : yarn

Readme

Keywords

none

Package Sidebar

Install

npm i @ax2/xms-core

Weekly Downloads

1

Version

0.3.0

License

none

Unpacked Size

137 kB

Total Files

60

Last publish

Collaborators

  • ax2-owner