addiesaas-frontend-forge v1.0.8
AddieSaaS Frontend Forge
CLI tool to help developers to easily forge a development setup for RocketEffect Frontend containers. It build's a development environment by adding RocketEffect Frontend Core and desired frontend container(s) in a single project.
Read RocketEffect Frontend Core documentation for more information on how Frontend Core works.
Installation
This is a CLI too and better installed globally.
npm install addiesaas-frontend-forge --global
or
npm i addiesaas-frontend-forge -g
Usage
- Open terminal/cmd
- Go to an empty directory
- Run
addiesaas-frontend-forge init
- This create a
addiesaas-frontend-forge.json
file - Update this file to add container name(s) and setup other properties
- Run
addiesaas-frontend-forge install
addiesaas-frontend-forge.json
properties
{
"team": "addiesaas",
"vcs": "git@bitbucket.org",
"app": {
"repo": "git@bitbucket.org:addiesaas/frontend-core.git",
"branch": "master",
},
"containers": {
"container-client-need2speed-frontend": "master"
},
"options": {
"env-create": true,
"npm-install": true,
"npm-run-dev": false,
"env": {
"APP_ENV": "local",
"PARENT_HOST": "https://dev.rocketeffect.com",
"PARENT_JS_PATH":"/js/wp-plugin.js",
"CACHE": "reload",
"VUE_DIST": "vue/dist/vue.esm.js"
}
},
"config": {
}
}
app
- Refers to the git repo of Rocket Effect Frontend core package along with branchcontainers
- Is an object of container names (keys) and respective branch name (value). For details, see More Information section on container names.options
env-create
- If set totrue
, creates.env
file and fills with default variables. These can be overwritten by variables defined inenv
object. For details, see More Information section on Environment Variables.npm-install
- If set totrue
runsnpn install
npm-run-dev
- If set totrue
runsnpn run dev-silent
config
- For future use.
More information
Container Names
A Rocket Effect containers is a single git repo. The name here refers to the repository name. For example, if the repository url is git@bitbucket.org:addiesaas/container-client-need2speed-frontend.git
the name would be container-client-need2speed-frontend
Environment Variables
PARENT_HOST: Url of the RocketEffect installation that hosts the parent wp-plugin.js
. For more details on PARENT_HOST, read Frontend Core documentation
PARENT_JS_PATH: Path of wp-plugin.js in the PARENT_HOST. It's usually, /js/wp-plugin.js
. For more details on PARENT_JS_PATH, read Frontend Core documentation