Skip to content

Commit 901faa9

Browse files
committed
Initial code commit
1 parent 965726b commit 901faa9

Some content is hidden

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

71 files changed

+17510
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "react-app"
3+
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env*
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# exclude prebuild
27+
!prebuild/**
28+
29+
.npmrc
30+
.yarnrc
31+
32+
dev
33+
dist

assets/icon.icns

141 KB
Binary file not shown.

assets/icon.png

70 KB
Loading

config-overrides.js

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
const os = require('os')
2+
const path = require('path')
3+
const webpack = require('webpack')
4+
const {
5+
override,
6+
addWebpackAlias,
7+
addWebpackPlugin
8+
} = require('customize-cra')
9+
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
10+
11+
function findWebpackPlugin (plugins, pluginName) {
12+
return plugins.find(plugin => plugin.constructor.name === pluginName)
13+
}
14+
15+
function overrideProcessEnv (value) {
16+
return config => {
17+
const plugin = findWebpackPlugin(config.plugins, 'DefinePlugin')
18+
const processEnv = plugin.definitions['process.env'] || {}
19+
plugin.definitions['process.env'] = {
20+
...processEnv,
21+
...value
22+
}
23+
return config
24+
}
25+
}
26+
27+
function addWasmLoader (options) {
28+
return config => {
29+
config.resolve.extensions.push('.wasm')
30+
config.module.rules.forEach(rule => {
31+
(rule.oneOf || []).forEach(oneOf => {
32+
if (oneOf.loader && oneOf.loader.indexOf('file-loader') >= 0) {
33+
oneOf.exclude.push(/\.wasm$/);
34+
}
35+
})
36+
})
37+
return config
38+
}
39+
}
40+
41+
const overrides = [
42+
addWebpackAlias({
43+
'@': path.resolve(__dirname, 'src/lib'),
44+
'@obsidians/welcome': `@obsidians/${process.env.BUILD}-welcome`,
45+
'@obsidians/header': `@obsidians/${process.env.BUILD}-header`,
46+
'@obsidians/project': `@obsidians/${process.env.BUILD}-project`,
47+
'@obsidians/instances': `@obsidians/${process.env.BUILD}-instances`,
48+
'@obsidians/bottombar': `@obsidians/${process.env.BUILD}-bottombar`,
49+
'@obsidians/keypair': `@obsidians/${process.env.BUILD}-keypair`,
50+
}),
51+
overrideProcessEnv({
52+
BUILD: JSON.stringify(process.env.BUILD),
53+
PROJECT_NAME: JSON.stringify(process.env.PROJECT_NAME),
54+
OS_IS_LINUX: JSON.stringify(os.type() === 'Linux'),
55+
}),
56+
addWasmLoader(),
57+
]
58+
59+
overrides.push(addWebpackPlugin(
60+
new MonacoWebpackPlugin({
61+
languages: ['json', 'javascript', 'typescript', 'css', 'html', 'markdown', 'c', 'cpp', 'shell']
62+
})
63+
))
64+
65+
module.exports = {
66+
webpack: override(...overrides)
67+
}

package.json

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"name": "algorand-studio",
3+
"description": "Graphic IDE for Algorand smart contract development",
4+
"version": "0.1.0",
5+
"author": {
6+
"name": "Algorand Studio",
7+
"email": "[email protected]",
8+
"url": "https://obsidians.io"
9+
},
10+
"private": true,
11+
"homepage": "./",
12+
"main": "build/main/index.js",
13+
"engines": {
14+
"node": "12"
15+
},
16+
"scripts": {
17+
"install": "electron-rebuild",
18+
"dev:react": "react-app-rewired start",
19+
"build:react": "react-app-rewired build",
20+
"dev:main": "webpack --config webpack.main.config.js && electron ./dev/index.js",
21+
"build:main": "cross-env NODE_ENV=production webpack --config webpack.main.prod.config.js",
22+
"prepare:main": "electron-rebuild && electron-builder install-app-deps",
23+
"dev": "concurrently \"yarn dev:react\" \"wait-on http://localhost:3000 && yarn dev:main\"",
24+
"build": "yarn build:react && yarn build:main",
25+
"dist": "yarn build && electron-builder -c.extraMetadata.main=build/main/index.js",
26+
"lint": "tslint '{src,test,mocks}/**/*.{ts,tsx}' --project ./tsconfig.json",
27+
"test": "jest '(\\/test\\/(?!e2e/)).*'",
28+
"pretest:e2e": "yarn build",
29+
"test:e2e": "jest '(\\/test\\/e2e/).*'",
30+
"pack": "yarn build && electron-builder --dir",
31+
"eject": "react-scripts eject"
32+
},
33+
"dependencies": {
34+
"@obsidians/algorand-account": "^0.1.0",
35+
"@obsidians/algorand-bottombar": "^0.1.0",
36+
"@obsidians/algorand-compiler": "^0.1.0",
37+
"@obsidians/algorand-header": "^0.1.0",
38+
"@obsidians/algorand-instances": "^0.1.0",
39+
"@obsidians/algorand-keypair": "^0.1.0",
40+
"@obsidians/algorand-project": "^0.1.0",
41+
"@obsidians/algorand-sdk": "^0.1.0",
42+
"@obsidians/algorand-welcome": "^0.1.0",
43+
"@obsidians/code-editor": "^0.1.0",
44+
"@obsidians/file-ops": "^0.1.0",
45+
"@obsidians/filetree": "^0.1.1",
46+
"@obsidians/ipc": "^0.1.1",
47+
"@obsidians/navbar": "^0.1.0",
48+
"@obsidians/notification": "^0.1.0",
49+
"@obsidians/pty": "^0.9.1",
50+
"@obsidians/terminal": "^0.1.1",
51+
"@obsidians/workspace": "^0.1.1",
52+
"fs-extra": "^8.1.0",
53+
"node-pty": "^0.9.0",
54+
"strip-ansi": "^6.0.0",
55+
"trash": "^6.0.0"
56+
},
57+
"optionalDependencies": {
58+
"keytar": "^5.6.0"
59+
},
60+
"devDependencies": {
61+
"@babel/plugin-proposal-class-properties": "^7.5.5",
62+
"@babel/polyfill": "^7.6.0",
63+
"@babel/preset-typescript": "^7.6.0",
64+
"@fortawesome/fontawesome-pro": "^5.12.0",
65+
"@hot-loader/react-dom": "^16.9.0",
66+
"@types/jest": "24.0.15",
67+
"@types/node": "12.6.3",
68+
"@types/react": "16.8.23",
69+
"@types/react-dom": "16.8.4",
70+
"babel-loader": "^8.0.6",
71+
"babel-plugin-import": "^1.12.0",
72+
"bootstrap": "^4.3.1",
73+
"concurrently": "^4.1.2",
74+
"copy-webpack-plugin": "^5.1.1",
75+
"cross-env": "^5.2.0",
76+
"customize-cra": "^0.7.0",
77+
"default-shell": "^1.0.1",
78+
"dotenv": "^8.0.0",
79+
"electron": "^8.2.3",
80+
"electron-builder": "^21.2.0",
81+
"electron-is-dev": "^1.1.0",
82+
"electron-rebuild": "^1.8.8",
83+
"electron-updater": "^4.1.2",
84+
"immutable": "^4.0.0-rc.12",
85+
"less": "^3.9.0",
86+
"less-loader": "^5.0.0",
87+
"lodash": "^4.17.14",
88+
"moment": "^2.24.0",
89+
"monaco-editor": "^0.20.0",
90+
"monaco-editor-webpack-plugin": "^1.9.0",
91+
"native-ext-loader": "^2.3.0",
92+
"node-fetch": "^2.6.0",
93+
"node-sass": "^4.12.0",
94+
"react": "^16.12.0",
95+
"react-app-rewired": "^2.1.3",
96+
"react-dom": "^16.12.0",
97+
"react-json-view": "^1.19.1",
98+
"react-redux": "^7.1.0",
99+
"react-router": "^5.0.1",
100+
"react-router-cache-route": "^1.4.6",
101+
"react-router-dom": "^5.0.1",
102+
"react-scripts": "3.3.0",
103+
"redux": "^4.0.4",
104+
"redux-config": "^0.1.1",
105+
"redux-logger": "^3.0.6",
106+
"redux-persist": "^5.10.0",
107+
"redux-persist-transform-immutable": "^5.0.0",
108+
"shell-path": "^2.1.0",
109+
"source-map-loader": "^0.2.4",
110+
"typescript": "3.7.2",
111+
"wait-on": "^3.3.0",
112+
"webpack-cli": "^3.3.9",
113+
"webpack-merge": "^4.2.2"
114+
},
115+
"browserslist": {
116+
"production": [
117+
">0.2%",
118+
"not dead",
119+
"not ie <= 11",
120+
"not op_mini all"
121+
],
122+
"development": [
123+
"last 1 chrome version",
124+
"last 1 firefox version",
125+
"last 1 safari version"
126+
]
127+
},
128+
"build": {
129+
"productName": "Algorand Studio",
130+
"artifactName": "AlgorandStudio-${version}.${ext}",
131+
"files": [
132+
"build/**/*",
133+
"node_modules/**/*"
134+
],
135+
"publish": [
136+
{
137+
"provider": "generic",
138+
"url": "http://www.obsidians.io"
139+
}
140+
],
141+
"directories": {
142+
"buildResources": "assets"
143+
},
144+
"mac": {
145+
"appId": "com.obsidians.algorandstudio",
146+
"category": "developer-tools"
147+
},
148+
"dmg": {
149+
"contents": [
150+
{
151+
"x": 160,
152+
"y": 220
153+
},
154+
{
155+
"x": 380,
156+
"y": 220,
157+
"type": "link",
158+
"path": "/Applications"
159+
}
160+
]
161+
},
162+
"win": {
163+
"target": [
164+
"nsis"
165+
]
166+
},
167+
"linux": {
168+
"icon": "./assets/icon.icns",
169+
"target": [
170+
"AppImage",
171+
"deb"
172+
],
173+
"category": "Development"
174+
},
175+
"extends": null
176+
}
177+
}

paths.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["lib/*"]
5+
}
6+
}
7+
}

public/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
<!--
9+
manifest.json provides metadata used when your web app is added to the
10+
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
11+
-->
12+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
13+
<!--
14+
Notice the use of %PUBLIC_URL% in the tags above.
15+
It will be replaced with the URL of the `public` folder during the build.
16+
Only files inside the `public` folder can be referenced from the HTML.
17+
18+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
19+
work correctly both with client-side routing and a non-root public URL.
20+
Learn how to configure a non-root public URL by running `npm run build`.
21+
-->
22+
<title></title>
23+
</head>
24+
<body>
25+
<div id="root"></div>
26+
</body>
27+
</html>

public/manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "Algorand Studio",
3+
"name": "Algorand Studio",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

0 commit comments

Comments
 (0)