Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit ad21609

Browse files
author
Amelia Bradley
authored
Merge pull request #1463 from ameliabradley/add-splinter-saplings
Add splinter saplings
2 parents 54f2fd2 + 81414f8 commit ad21609

File tree

117 files changed

+11023
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+11023
-9
lines changed

ui/Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,17 @@ WORKDIR /saplings/product
5151
RUN npm install \
5252
&& npm run deploy
5353

54-
WORKDIR /
55-
RUN git clone -b 0-1 https://github.com/Cargill/splinter-ui
56-
5754
WORKDIR /saplings/register-login
58-
RUN cp -r /splinter-ui/saplings/register-login /saplings \
59-
&& npm install \
55+
RUN npm install \
6056
&& npm run deploy
6157

6258
WORKDIR /saplings/profile
63-
RUN cp -r /splinter-ui/saplings/profile /saplings \
64-
&& npm install \
59+
RUN npm install \
6560
&& npm run deploy
6661

6762
ENV PUBLIC_URL ${PUBLIC_URL_PARTIAL}/circuits
6863
WORKDIR /saplings/circuits
69-
RUN cp -r /splinter-ui/saplings/circuits /saplings \
70-
&& npm install \
64+
RUN npm install \
7165
&& npm run deploy
7266

7367
WORKDIR /sapling-dev-server

ui/saplings/circuits/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env", "@babel/preset-react"]
3+
}

ui/saplings/circuits/.eslintignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2018-2021 Cargill Incorporated
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
build/*

ui/saplings/circuits/.eslintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"jest": true,
5+
"browser": true
6+
},
7+
"parserOptions": {
8+
"ecmaVersion": 2020
9+
},
10+
"extends": ["airbnb", "plugin:prettier/recommended"],
11+
"rules": {
12+
"react/jsx-filename-extension": 0,
13+
"react/prefer-stateless-function": 0,
14+
"import/prefer-default-export": 0
15+
},
16+
"settings": {
17+
"import/resolver": {
18+
"node": {
19+
"paths": ["src"]
20+
},
21+
"webpack": "./webpack.config.js"
22+
}
23+
}
24+
}

ui/saplings/circuits/.prettierignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2018-2021 Cargill Incorporated
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
build/*

ui/saplings/circuits/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"proseWrap": always
6+
}
Lines changed: 6 additions & 0 deletions
Loading

ui/saplings/circuits/package.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"name": "circuits",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"build": "npm run generate-proto-files && webpack",
7+
"bundle": "webpack --mode=development",
8+
"package": "rm -rf package && mkdir package && cp -r ./build/static package && cp -r images package && tar -jcvf circuit_$npm_config_sapling_version.sapling package",
9+
"add-to-canopy": "mkdir -p ../../sapling-dev-server/circuits && cp -r ./build/static ../../sapling-dev-server/circuits && cp -r images ../../sapling-dev-server/circuits",
10+
"deploy": "npm run build && npm run add-to-canopy",
11+
"deploy-local": "npm run bundle && npm run add-to-canopy",
12+
"watch": "npm run generate-proto-files && nodemon --ext js,scss,ts,css --watch src --exec npm run deploy-local",
13+
"lint": "eslint .",
14+
"generate-proto-files": "node scripts/compile_protobuf.js protos > src/compiled_protos.json"
15+
},
16+
"eslintConfig": {
17+
"extends": "react-app"
18+
},
19+
"browserslist": {
20+
"production": [
21+
">0.2%",
22+
"not dead",
23+
"not op_mini all"
24+
],
25+
"development": [
26+
"last 1 chrome version",
27+
"last 1 firefox version",
28+
"last 1 safari version"
29+
]
30+
},
31+
"dependencies": {
32+
"@fortawesome/fontawesome-svg-core": "^1.2.27",
33+
"@fortawesome/free-solid-svg-icons": "^5.12.1",
34+
"@fortawesome/react-fontawesome": "^0.1.9",
35+
"@testing-library/jest-dom": "^4.2.4",
36+
"@testing-library/react": "^9.3.2",
37+
"@testing-library/user-event": "^7.1.2",
38+
"protobufjs": "^6.8.9",
39+
"classnames": "^2.2.6",
40+
"js-yaml": "^3.14.0",
41+
"prop-types": "^15.7.2",
42+
"react": "^16.13.1",
43+
"react-dom": "^16.13.1",
44+
"react-dropdown": "^1.7.0",
45+
"react-router-dom": "^5.1.2",
46+
"react-toast-notifications": "^2.4.0",
47+
"splinter-saplingjs": "github:cargill/splinter-saplingjs#main",
48+
"transact-sdk": "^0.1.0"
49+
},
50+
"devDependencies": {
51+
"@babel/core": "^7.10.5",
52+
"@babel/preset-env": "^7.10.4",
53+
"@babel/preset-react": "^7.10.4",
54+
"babel-loader": "^8.1.0",
55+
"css-loader": "^5.2.4",
56+
"eslint": "^6.6.0",
57+
"eslint-config-airbnb": "18.0.1",
58+
"eslint-config-prettier": "^6.4.0",
59+
"eslint-import-resolver-webpack": "^0.12.2",
60+
"eslint-plugin-import": "^2.22.1",
61+
"eslint-plugin-jsx-a11y": "^6.2.3",
62+
"eslint-plugin-prettier": "^3.1.1",
63+
"eslint-plugin-react": "7.22.0",
64+
"eslint-plugin-react-hooks": "^1.7.0",
65+
"http-server": "^0.12.1",
66+
"mini-css-extract-plugin": "^0.9.0",
67+
"mini-svg-data-uri": "^1.2.3",
68+
"node-sass": "^4.13.1",
69+
"nodemon": "^2.0.2",
70+
"npm-run-all": "^4.1.5",
71+
"prettier": "^1.18.2",
72+
"resolve-url-loader": "^3.1.1",
73+
"sass": "^1.26.10",
74+
"sass-loader": "^9.0.2",
75+
"style-loader": "^1.2.1",
76+
"svg-inline-loader": "^0.8.2",
77+
"url-loader": "^4.1.0",
78+
"webpack": "^4.44.0",
79+
"webpack-cli": "^3.3.12"
80+
}
81+
}

0 commit comments

Comments
 (0)