Skip to content

Commit

Permalink
Ako / lerna and nx integrations (#6311)
Browse files Browse the repository at this point in the history
* build/ update lerna-nx and use nx scripts

* build/ add nx config file

* build/ add nx token key

* build/ replace build scripts with nx

* build/ run build local in parallel

* ci/ update build command

* ci/ update build command

* build/ update package-lock

* build/ update nx script

* build/ remove deprecated --all flag

* build/ update nx to latest version

* build/ update package-lock file

* config/fix cacheOperation for linting

* build/ update package-lock file

* ci/ fix nx accesstoken

* build/ update package-lock

* ci/ add nx-cloud env example file

* ci/ add nx-cloud env example file

* build: use nx build for build:travis script

* build/ update lerna to 5.5.1

* ci/ use process.env to get nx accessToken
  • Loading branch information
Ali(Ako) Hosseini committed Oct 6, 2022
1 parent 4e4de43 commit 8f2df0f
Show file tree
Hide file tree
Showing 7 changed files with 7,627 additions and 4,617 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ commands:
steps:
- run:
name: "Build all packages"
command: npm run build
command: npm run build:all

build_storybook:
description: "Build storybook"
Expand Down Expand Up @@ -167,7 +167,7 @@ commands:
name: "Publish to cloudflare pages (staging)"
command: |
npm i wrangler@2.0.19
cd packages/core
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=staging
echo "New staging website - http://staging.cf-pages-deriv-app.deriv.com"
Expand All @@ -176,9 +176,9 @@ commands:
steps:
- run:
name: "Publish to cloudflare pages (production)"
command: |
command: |
npm i wrangler@2.0.19
cd packages/core
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=main
echo "New website - http://cf-pages-deriv-app.deriv.com"
Expand Down Expand Up @@ -338,4 +338,3 @@ workflows:
- gh-pages
tags:
ignore: /.*/

2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: |
npm install
npm run bootstrap
npm run build
npm run build:all
npm run test:jest
- name: Upload coverage to Codecov
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ packages/p2p/lib/
packages/appstore/dist/
packages/appstore/lib/
.env
nx-cloud.env

4 changes: 4 additions & 0 deletions nx-cloud.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# To have nx cloud caching, make a copy of this file and name it nx-cloud.env,
# then replace the <TOKEN> with nx-cloud token provided in the lastpass shared-FE section.

NX_CLOUD_ACCESS_TOKEN=<TOKEN>
47 changes: 47 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": [
"build",
"test",
"test:eslint",
"package",
"prepare",
"build:travis"
],
"accessToken": "${process.env.NX_CLOUD_ACCESS_TOKEN}"
}
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
],
"prepare": [
{
"target": "prepare",
"projects": "dependencies"
}
],
"package": [
{
"target": "package",
"projects": "dependencies"
}
]
},
"affected": {
"defaultBase": "master"
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": false
}
}
}
Loading

1 comment on commit 8f2df0f

@vercel
Copy link

@vercel vercel bot commented on 8f2df0f Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

binary.sx
deriv-app-git-master.binary.sx
deriv-app.vercel.app
deriv-app.binary.sx

Please sign in to comment.