- General - Contains general philosophy and overview of this package
- Modules docs - Contains implementation guides (i.e., scaffolding, code usage)
This repository contains the static HTML, Javascript, CSS, and images content of the Deriv website.
In order to work on your own version of the Deriv Javascript and CSS, please fork this project.
You will also need to install the following on your development machine:
- Node.js (10.14.2 or higher is recommended) and NPM (see https://nodejs.org/en/download/package-manager/)
- Go to project root, then run
npm install
In order to use your custom domain, please put it in a file named CNAME
inside scripts
folder of your local clone of deriv-app.
-
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/redirect
for the Verification URL.If you're using a custom domain, replace the github URLs above with your domain and remove the
deriv-app
base path. -
In
src/config.js
: Insert theApplication ID
of your registered application inuser_app_id
.- NOTE: In order to avoid accidentally committing personal changes to this file, use
git update-index --assume-unchanged src/config.js
- NOTE: In order to avoid accidentally committing personal changes to this file, use
-
Set
NODE_ENV
todevelopment
withexport 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:clean
This 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"
- Edit your
/etc/hosts
file to include this domain:
127.0.0.1 localhost.binary.sx
- To preview your changes locally for the first time, run
sudo npm start
:- It will run all tests, compile all css, and js/jsx as well as watch for further js/jsx/css changes and rebuild on every change you make.
- 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
- In Webstorm, right-click on
src
, hover overMark directory as
, and clickResource root
to enable import alias resolution.
Elements for selenium test purposes should have id
attributes, with the value of dt_[element_name]_[unique_name|id]_[element_type]
. (e.g. dt_settings_dark_button
)
Ensure you have a remote with the name of origin
pointing to the deriv-app repo, and that you are on the dev
branch.
- Navigate to root of project.
- Run
./scripts/release-staging.sh
Ensure you have a remote with the name of origin
pointing to the deriv-app repo, and production
pointing to the deriv-app-production repo, and that you are on the master
branch.
- Navigate to root of project.
- Run
./scripts/release-prod.sh