core/dist is the place where we build the main bundle at
In this document
- Other documents
- Description
- How to work with this workspace
- Folder Structure
- Troubleshooting
- Miscellaneous
- Modules docs - Contains implementation guides (i.e., scaffolding help, etc.)
This workspace is the "app instance". It contains singleton services (such as the WS, and base/common stores), as well as singleton UI components.
- To preview your changes locally for the first time, run
npm start:- It will run all tests, compile all CSS, and JS/JSX as well as watch for further
js/jsx/csschanges and rebuild on every change you make.
- It will run all tests, compile all CSS, and JS/JSX as well as watch for further
- To preview your changes locally without any tests, run
npm run serve- It will watch for js/jsx/css changes and rebuild on every change you make.
- To run all tests, run
npm run test
To run and work on this workspace you need to use npm run serve core command.
-
Register your application here. This will give you the ability to redirect back to your Github pages after login. Use
https://YOUR_GITHUB_USERNAME.github.io/deriv-app/for the Redirect URL andhttps://YOUR_GITHUB_USERNAME.github.io/deriv-app/en/redirectfor the Verification URL. If you're using a custom domain, replace the Github URLs above with your domain and remove thederiv-appbase path. -
In
src/config.js: Insert theApplication IDof your registered application inuser_app_id.- NOTE: To avoid accidentally committing personal changes to this file, use
git update-index --assume-unchanged src/javascript/config.js
- NOTE: To avoid accidentally committing personal changes to this file, use
-
Set
NODE_ENVtodevelopmentwithexport NODE_ENV=development -
Run
npm run deploy:clean
This will overwrite modified files and only clear the content of js folder before pushing changes. It will leave other folders as they are.
npm run deploy
This removes all files and folders and deploys your dist folder to the root.
npm run deploy:cleanThis will add all your changes to the test folder specified.
Please ensure it is prefixed with br_.
npm run deploy:folder "br_my_test_folder"
build
├── ...
├── webpack-config-test.js
docs
├── Modules
| |── README.md
src
├── _common
├── App
| |── Components
| |── Constants
| |── Containers
├── Assets
├── Constants
├── Modules
├── public
├── root_files
├── sass
├── Services
├── Stores
├── templates
├── Utils
| |── Language
| |── pwa
| |── Validator
| | |──...
| | |── validator.js
- Icon missing: If the icons are missing, you only need to build this workspace. You can do this by running the build command from the root directory (
/deriv-app):
npm run build
- In Webstorm, right-click on
src, hover overMark directory as, and clickResource rootto enable import alias resolution.