order-tracking-app v0.1.1
order-tracking-app
Vue app for Lumenpulse's Order Tracking
Prerequisites
The following are required:
Check currently installed versions of those requirement by running:
node --version && yarn --versionNode
To easily manage your Node versions, it is recommended to install nvm. Once nvm is installed, run the following command:
nvm install 12This will install the latest iteration of Node 12 and enable it for your current session.
If you have Node 12 installed and just want to enable it for the current session, run:
nvm use 12To set Node 12 as the default verion for subsequent sessions:
nvm alias default 12Yarn
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, install the project's dependencies:
cd order-tracking-app # cd in the project's dir if not done already
yarn # Install dependenciesSet local environment variables by copying .env.example to .env:
cp .env.example .envFinally, start the development server:
yarn devBuild Setup
# install dependencies
yarn
# serve with hot reload at localhost:8080
yarn dev
# build a production-ready bundle
yarn bundle
# build for production with minification
yarn build
# build for production and view the bundle analyzer report
yarn build --report
# run unit tests
yarn unit
# run e2e tests
yarn e2e
# run all tests
yarn testFor detailed explanation on how things work, checkout the guide and docs for vue-loader.
Release
The release flow use yarn publish
Since these packages are currently privately published under @ax2 scope, make sure your machine is globally auhtenticated on NPM, or that you have an .npmrc containing a publish token in every module's directory.
Once you're ready to publish a pre-release for staging environnement:
Checkout develop branch and run this command
yarn pre-releaseThis do :
- A new bundle for the release
- Commit the bundle
- Publish a new version with tag
canaryforstagingenvironnement (user versionning vX.X.X-alpha.X) - Push actual branch (
develop)
Then run yarn upgrade @ax2/order-tracking-app@canary in the lumenpulse repository in a working branch
Once you're ready to publish changed packages for live environnement:
Checkout master branch and run this command
yarn releaseThis do :
- A new bundle for the release
- Commit the bundle
- Publish a new version with tag
latestforliveenvironnement (user versionning vX.X.X) - Push actual branch (
master)
Then run yarn upgrade @ax2/order-tracking-app@latest in the lumenpulse repository in a working branch
Install
Use Yarn or NPM to install the app. Make sure the host machine is authorized to install packages from Ax2's scope.
yarn add @ax2/order-tracking-appTo upgrade the app when new releases are published:
yarn upgrade @ax2/order-tracking-appTo initialize the app, load app.bundle.js in the page and make sure you put a mounting point somewhere in the markup:
<div class="order-tracking-app-root" id="order-tracking-app">
<App
lang='{{ Config::get('app.locale') }}'
token='{{ $user->token or '' }}'
/>
</div>Configuration
The app can be configured via a .env file. To get started, copy the .env.example file to .env. Here are the available configuration options:
| Variable | Possible values | Description |
|---|---|---|
| APP_ENV | development, production | If set to development, the app will be run in debug mode which has the following effects: no redirect to first step when refreshing the page, tutorial overlay hidden by default |
| API_ROOT | API root URL | Defines the API's root endpoint, if window.ORDER_TRACKING_API_ROOT is defined, it will be used instead |
Make sure you restart the app after changing your configuration.