@ax2/xms-core v0.3.0
xms-core
XMS Core
xms-core using Vue.js integrated Graphql along with Vuetify.js, app developed and maintained by AX2.
Prerequisites
The following are required:
Check currently installed versions of those requirement by running:
node --version && yarn --version- Set local environment variables by copying
.env.exampleto.env(each variable is explained right in the.env.examplefile, adapt them as needed):
cp .env.example .envFrom your project directory:
- Create
modulesdirectory and pull your modules from https://github.com/ax2inc/xms-modules
git clone git@github.com:ax2inc/xms-modules.git modules- Create
projectdirectory and pull your configuration from the project repository (e.g. https://github.com/ax2inc/xms-ax2-boilerplate)
git clone git@github.com:ax2inc/xms-ax2-boilerplate.git projectNode
To easily manage your Node versions, it is recommended to install nvm. Once nvm is installed, run the following command:
nvm install 10This 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 10To set Node 10 as the default verion for subsequent sessions:
nvm alias default 10Yarn
There are several ways to install Yarn. The easiest way is using Homebrew:
brew install yarnTo update Yarn to the latest version:
brew upgrade yarnGet started
Once your environment is all set, you can install the project's dependencies:
To start the development server:
yarn devTo build and start the app in production mode:
yarn build
yarn startConfiguration
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:unitNPM 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 installCompiles and hot-reloads for development
yarn devCompiles and minifies for production
yarn run buildLints and fixes files
yarn run lintRun your unit tests
yarn run test:unitRun your end-to-end tests
yarn run test:e2eVersioning of yarn.lock
To generate a yarn.lock file to be versioned, dependencies from the configuration have to be ignored :
- Remove
workspacesinpackage.json - Install dependencies :
yarn
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago