Gestalt Ui written in React/Redux
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
nvm install 10
cd gestalt-ui-react
nvm use 10
Ensure that you nvm use 10
whenever you start a new terminal. You may optionally persist this setting by executing `nvm alias default 10
npm install -g yarn
First time (and anytime dependencies are updated or changed)
yarn install
Start the webpack dev server and hosts gestalt-ui-react for development purposes. Navigate to http://localhost:8081
yarn dev
Minify, optimize and compress for production deployment. Generates a /build
directory can then be used for CI or statically hosted using your favorite http server.
yarn deploy
However, it is highly recommended that you pass a commit SHA to yarn deploy
. The SHA will be appended to the version that displays in the ui.
For Example:
yarn deploy -- --sha `git rev-parse --short=8 HEAD`
If you wish to change Development or Production variables in gestalt-ui-react prior to building, you may do so by editing config.json
.
Otherwise, config.json
can be automed via CI to inject the correct values before kicking off yarn deploy
Sample config.json
:
{
"development": {
"API_URL": "https://meta.test.galacticfog.com",
"SEC_API_URL": "https://security.test.galacticfog.com",
"API_TIMEOUT": 120000,
"API_RETRIES": 5,
"COMPANY_TITLE": "Galactic Fog",
"COMPANY_URL": "http://www.galacticfog.com/",
"APP_TITLE": "Gestalt",
"DEFAULT_LANG": "en_us",
"LICENSE_EXP_THRESHOLD": 15,
"ANALYTICS_TRACKING_ACCT": "",
"ANALYTICS_TRACKING": false,
"DEBUG": true,
"DOCUMENTATION_URL": "http://docs.galacticfog.com"
},
"production": {
"API_URL": "/meta",
"SEC_API_URL": "/security",
"API_TIMEOUT": 120000,
"API_RETRIES": 5,
"COMPANY_TITLE": "Galactic Fog",
"COMPANY_URL": "http://www.galacticfog.com/",
"APP_TITLE": "Gestalt",
"DEFAULT_LANG": "en_us",
"LICENSE_EXP_THRESHOLD": 15,
"ANALYTICS_TRACKING_ACCT": "xxxx",
"ANALYTICS_TRACKING": true,
"DEBUG": false,
"DOCUMENTATION_URL": "http://docs.galacticfog.com"
}
}
Runs all Tests without watching. Useful for automation with CI Tools.
yarn test
Runs the app in watch mode, which allows you to watch the code and tests for changes with you as you TDD.
yarn test:tdd
If you encounter the error Error: EMFILE: too many open files, watch...
you will need update update watchman. If you are in TDD mode it is probably a good idea (and faster) to use the jest options to filter the specific file(s) you want to test.
bew update
brew install watchman
Simply opens a browser window with coverage results.
yarn test:coverage
yarn packages - list installed packages
yarn purge - removes your node_modules folder.
yarn reinstall - removes your node_modules folder and does a npm install.
yarn killall - kills all node processes - useful if your webpack-dev-server address is in use
yarn stats - generates build stats that can be analyzed @ http://webpack.github.io/analyse/#hints