Skip to content

Commit

Permalink
Harmony/workspace ui (#2835)
Browse files Browse the repository at this point in the history
First version of workspace ui

Co-authored-by: Gilad Shoham <shoham.gilad@gmail.com>
Co-authored-by: Ran Mizrahi <ran@bit.dev>
Co-authored-by: Uri Kutner <urikutner@gmail.com>
Co-authored-by: oded <oded@bit.dev>
Co-authored-by: David First <davidnet@gmail.com>
  • Loading branch information
5 people committed Jul 15, 2020
1 parent bc90436 commit 73fb3c3
Show file tree
Hide file tree
Showing 336 changed files with 39,194 additions and 25,788 deletions.
207 changes: 151 additions & 56 deletions .circleci/config.yml
Expand Up @@ -67,6 +67,25 @@ jobs:
root: /home/circleci
paths:
- bit
setup_react_new_project:
<<: *defaults
steps:
-
run:
name: 'checkout react new project'
command: 'git clone https://github.com/teambit/react-new-project.git'
-
restore_cache:
key: bitsrc-registry3
-
run:
name: 'install dependencies'
command: 'cd react-new-project && npm i'
-
persist_to_workspace:
root: .
paths:
- react-new-project
set_ssh_key:
<<: *defaults
working_directory: ~/.ssh
Expand All @@ -89,19 +108,19 @@ jobs:
<<: *defaults
steps:
# prod registry
# -
# run: npm config set @bit:registry https://node.bit.dev
# -
# run: echo "//node.bit.dev/:_authToken=$registryProdToken" >> ~/.npmrc
# stage registry
-
run: 'npm config set @bit:registry https://node-stg.bit.dev'
run: npm config set @bit:registry https://node.bit.dev
-
run: 'echo "//node-stg.bit.dev/:_authToken=$registryStgToken" >> ~/.npmrc'
run: echo "//node.bit.dev/:_authToken=$registryProdToken" >> ~/.npmrc
# stage registry
# -
# run: 'npm config set @bit:registry https://node-stg.bit.dev'
# -
# run: 'echo "//node-stg.bit.dev/:_authToken=$registryStgToken" >> ~/.npmrc'
-
save_cache:
# key: bitsrc-registry2
key: bitsrc-registry-stg-v2
key: bitsrc-registry3
# key: bitsrc-registry-stg-v2
paths:
- ~/.npmrc
install_npm_deps:
Expand All @@ -115,6 +134,9 @@ jobs:
-
attach_workspace:
at: ./
-
restore_cache:
key: bitsrc-registry3
-
run:
name: 'save SHA to a file'
Expand Down Expand Up @@ -142,6 +164,38 @@ jobs:
paths:
- bit/node_modules
- bit/releases
link_react_new_project:
<<: *defaults
environment:
# change the npm config to avoid using sudo
NPM_CONFIG_PREFIX: ~/.npm-global
steps:
-
attach_workspace:
at: ./
-
run:
name: 'npm link bit to global'
command: cd bit && npm link
-
run: 'echo ''export PATH=~/.npm-global/bin:$PATH'' >> $BASH_ENV'
-
restore_cache:
key: bit-global-config-v1
-
run:
name: 'bit link in react-new-project'
command: 'cd react-new-project && bit link'
-
run:
name: 'link components from react-new-proejct to bit'
command: 'cd bit && ln -s /home/circleci/bit/react-new-project/node_modules/@bit/bit.test-scope.* ./node_modules/@bit'
-
persist_to_workspace:
root: .
paths:
- react-new-project
- bit/node_modules
validate-git-tag-and-version:
<<: *defaults
steps:
Expand Down Expand Up @@ -183,6 +237,47 @@ jobs:
root: .
paths:
- bit/dist
configure-bit:
<<: *defaults
environment:
# change the npm config to avoid using sudo
NPM_CONFIG_PREFIX: ~/.npm-global
BITSRC_ENV: stg
steps:
-
attach_workspace:
at: ./
-
restore_cache:
key: bitsrc-registry3
-
run: 'echo ''export PATH=~/.npm-global/bin:$PATH'' >> $BASH_ENV'
-
run:
name: 'npm link bit to global'
command: cd bit && npm link
-
run: which bit
-
run: 'bit config set analytics_reporting false'
-
run: 'bit config set error_reporting false'
-
run: 'bit config set user.name tester'
-
run: 'bit config set user.email ci@bit.dev'
-
run: 'bit config set hub_domain hub.bit.dev'
# uncomment to configure circle to run against stg environment
# -
# run: 'bit config set hub_domain hub-stg.bit.dev'
-
run: 'cat ~/Library/Caches/Bit/config/config.json'
-
save_cache:
key: bit-global-config-v1
paths:
- ~/Library/Caches/Bit/config/config.json
pack:
<<: *defaults
steps:
Expand Down Expand Up @@ -445,6 +540,10 @@ jobs:
-
attach_workspace:
at: ./
# -
# run:
# name: 'link components from react-new-proejct to bit'
# command: 'cd bit && ln -s ../react-new-project/node_modules/@bit/bit.test-scope.* ./node_modules/@bit'
-
run:
name: 'run TSC'
Expand Down Expand Up @@ -493,15 +592,14 @@ jobs:
# command: 'mkdir ~/.npm-global'
-
restore_cache:
key: bitsrc-ssh-key3
key: bit-global-config-v1
-
restore_cache:
# key: bitsrc-registry2
key: bitsrc-registry-stg-v2
key: bitsrc-ssh-key3
-
restore_cache:
keys:
- 'builded-{{ checksum ".circle-sha" }}'
key: bitsrc-registry3
# key: bitsrc-registry-stg-v2
-
# add the id_rsa to ssh_agent to make sure we authenticate with the correct user
run: 'chmod 400 ~/.ssh/id_rsa'
Expand All @@ -519,29 +617,6 @@ jobs:
command: cd bit && npm link
-
run: which bit
-
run: 'bit config set analytics_reporting false'
-
run: 'bit config set error_reporting false'
-
run: 'bit config set user.name tester'
-
run: 'bit config set user.email ci@bit.dev'
-
# do not change this one, it's important to use the production for getting components bit use for running
# if you want the tests to work with stage, you should change the hub domain few lines below
run: 'bit config set hub_domain hub.bit.dev'
# -
# run:
# name: 'bit import'
# command: 'cd bit && bit import'
# -
# run:
# name: 'npm install'
# command: 'cd bit && bit install'
-
# uncomment to configure circle to run against stg environment
run: 'bit config set hub_domain hub-stg.bit.dev'
-
run:
name: 'Run e2e tests'
Expand Down Expand Up @@ -640,12 +715,8 @@ jobs:
key: bitsrc-ssh-key3
-
restore_cache:
# key: bitsrc-registry2
key: bitsrc-registry-stg-v2
-
restore_cache:
keys:
- 'builded-{{ checksum ".circle-sha" }}'
key: bitsrc-registry3
# key: bitsrc-registry-stg-v2
-
# add the id_rsa to ssh_agent to make sure we authenticate with the correct user
run: 'chmod 400 ~/.ssh/id_rsa'
Expand Down Expand Up @@ -720,18 +791,19 @@ jobs:
<<: *windows_defaults
steps:
# prod registry
# -
# run: npm config set @bit:registry https://node.bit.dev
# -
# run: echo "//node.bit.dev/:_authToken=$registryProdToken" >> ~/.npmrc
# stage registry
-
run: 'npm config set @bit:registry https://node-stg.bit.dev'
run: npm config set @bit:registry https://node.bit.dev
-
run: 'echo "//node-stg.bit.dev/:_authToken=$registryStgToken" >> .npmrc'
run: echo "//node.bit.dev/:_authToken=$registryProdToken" >> ~/.npmrc
# stage registry
# -
# run: 'npm config set @bit:registry https://node-stg.bit.dev'
# -
# run: 'echo "//node-stg.bit.dev/:_authToken=$registryStgToken" >> .npmrc'
-
save_cache:
key: windows_bitsrc-registry-stg-v1
key: windows_bitsrc-registry-v1
# key: windows_bitsrc-registry-stg-v1
paths:
- .npmrc
windows_install_npm_deps:
Expand All @@ -744,6 +816,10 @@ jobs:
-
attach_workspace:
at: .
-
restore_cache:
key: windows_bitsrc-registry-v1
# key: windows_bitsrc-registry-stg-v1
-
run:
name: 'Install npm dependencies'
Expand Down Expand Up @@ -800,7 +876,8 @@ jobs:
key: windows_bitsrc-ssh-key-v1
-
restore_cache:
key: windows_bitsrc-registry-stg-v1
key: windows_bitsrc-registry-v1
# key: windows_bitsrc-registry-stg-v1
# -
# restore_cache:
# keys:
Expand Down Expand Up @@ -861,30 +938,44 @@ workflows:
- checkout_code
- set_ssh_key
- set_bitsrc_registry
-
setup_react_new_project:
requires:
- set_bitsrc_registry
-
install_npm_deps:
requires:
- checkout_code
- set_bitsrc_registry
-
build:
requires:
- install_npm_deps
-
configure-bit:
requires:
- build
-
link_react_new_project:
requires:
- configure-bit
- setup_react_new_project
-
unit_test:
requires:
- build
-
lint:
requires:
- install_npm_deps
- link_react_new_project
-
check_types:
requires:
- install_npm_deps
- link_react_new_project
-
generate_types:
requires:
- build
- link_react_new_project
-
generate_docs:
<<: *semver_tags_only_filters
Expand All @@ -905,7 +996,7 @@ workflows:
requires:
- set_ssh_key
- set_bitsrc_registry
- build
- configure-bit
# - pack
-
performance_e2e_test:
Expand Down Expand Up @@ -941,6 +1032,7 @@ workflows:
- windows_install_npm_deps:
requires:
- windows_checkout_code
- windows_set_bitsrc_registry
- windows_build:
requires:
- windows_install_npm_deps
Expand Down Expand Up @@ -1063,10 +1155,12 @@ workflows:
- prod
jobs:
- checkout_code
- set_bitsrc_registry
-
install_npm_deps:
requires:
- checkout_code
- set_bitsrc_registry
-
build:
requires:
Expand All @@ -1091,6 +1185,7 @@ workflows:
install_npm_deps:
requires:
- checkout_code
- set_bitsrc_registry
-
build:
requires:
Expand Down
5 changes: 4 additions & 1 deletion .eslintrc.js
Expand Up @@ -85,7 +85,10 @@ module.exports = {
}
],
'max-lines': [2, 1800],
'func-names': [0]
'func-names': [0],

// ERRORS OF plugin:react/recommended
'react/no-unescaped-entities': 'off'
},
// return the no-cycle once "import type" is working
// overrides: [
Expand Down
4 changes: 3 additions & 1 deletion babel.config.js
Expand Up @@ -9,7 +9,9 @@ module.exports = function(api) {
{
targets: {
node: 8
}
},
useBuiltIns: 'usage',
corejs: 3
}
]
];
Expand Down

0 comments on commit 73fb3c3

Please sign in to comment.