Skip to content

Commit fe5ec7c

Browse files
committed
Merge branch 'master' into prototype-common-sync
2 parents 8e4d02b + b6f0d96 commit fe5ec7c

File tree

337 files changed

+25474
-17765
lines changed

Some content is hidden

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

337 files changed

+25474
-17765
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ steps:
2626
- yarn build
2727

2828
- name: deploy
29-
image: lbogdan/codesandbox-deploy-plugin:2
29+
image: lbogdan/codesandbox-deploy-plugin:3
3030
settings:
3131
domain: &domain build.csb.dev
3232
volumes:
@@ -177,6 +177,6 @@ trigger:
177177
branch: master
178178
---
179179
kind: signature
180-
hmac: 015a8ddaa2fa145808e3c30ad05da71d03e3b8653b6bddb41547f13611397070
180+
hmac: e625eaf2e469b9b6763641d4cc1f089900ef8d8c41db32c6f6aacb27bee8c19c
181181

182182
...

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/cra-files/*.*
22
**/eslint-lint.js
3+
**/stories/*.*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ npm-debug.log
2121
yarn-error.log
2222
.idea
2323
jest
24+
stats.json
2425

2526
lerna-debug.log
2627

README.md

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="https://codesandbox.io">
3-
<img src="https://user-images.githubusercontent.com/1863771/68405395-5020f400-0180-11ea-8818-8cb255d9fe71.png" height="200px">
3+
<img src="https://codesandbox.io/static/img/banner.png" height="200px">
44
</a>
55
</p>
66

@@ -14,25 +14,7 @@
1414
[![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
1515
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1616

17-
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
18-
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
19-
20-
An online code editor tailored for web applications.
21-
22-
This project was bootstrapped with
23-
[Create React App](https://github.com/facebook/create-react-app).
24-
25-
The JavaScript community has sharing as its selling point. It has the biggest
26-
open source community and every day new ideas and proposals are shared on
27-
Twitter. This is great and a really strong point, but the side effect of this is
28-
that there are a lot of tools and configurations to consider before you can
29-
start building.
30-
31-
CodeSandbox aims to solve this by allowing developers to simply go to a URL in
32-
their browser to start building. This not only makes it easier to get started,
33-
it also makes it easier to share. You can just share your created work by
34-
sharing the URL, others can then (without downloading) further develop on these
35-
sandboxes.
17+
An instantly ready, full-featured online IDE for web development on any device with a browser. Enabling you to start new projects quickly and prototype rapidly. With CodeSandbox, you can create web apps, experiment with code, test ideas, and share creations easily.
3618

3719
## Other CodeSandbox repositories
3820

@@ -260,27 +242,3 @@ Thanks goes to these wonderful people
260242
<!-- prettier-ignore-end -->
261243

262244
<!-- ALL-CONTRIBUTORS-LIST:END -->
263-
264-
## Backers
265-
266-
Thank you to all our backers! 🙏
267-
[[Become a backer](https://opencollective.com/codesandbox#backer)]
268-
269-
<a href="https://opencollective.com/codesandbox#backers" target="_blank"><img src="https://opencollective.com/codesandbox/backers.svg?width=890"></a>
270-
271-
## Sponsors
272-
273-
Support this project by becoming a sponsor. Your logo will show up here with a
274-
link to your website.
275-
[[Become a sponsor](https://opencollective.com/codesandbox#sponsor)]
276-
277-
<a href="https://opencollective.com/codesandbox/sponsor/0/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/0/avatar.svg"></a>
278-
<a href="https://opencollective.com/codesandbox/sponsor/1/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/1/avatar.svg"></a>
279-
<a href="https://opencollective.com/codesandbox/sponsor/2/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/2/avatar.svg"></a>
280-
<a href="https://opencollective.com/codesandbox/sponsor/3/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/3/avatar.svg"></a>
281-
<a href="https://opencollective.com/codesandbox/sponsor/4/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/4/avatar.svg"></a>
282-
<a href="https://opencollective.com/codesandbox/sponsor/5/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/5/avatar.svg"></a>
283-
<a href="https://opencollective.com/codesandbox/sponsor/6/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/6/avatar.svg"></a>
284-
<a href="https://opencollective.com/codesandbox/sponsor/7/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/7/avatar.svg"></a>
285-
<a href="https://opencollective.com/codesandbox/sponsor/8/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/8/avatar.svg"></a>
286-
<a href="https://opencollective.com/codesandbox/sponsor/9/website" target="_blank"><img src="https://opencollective.com/codesandbox/sponsor/9/avatar.svg"></a>

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
"packages/homepage",
1414
"packages/common",
1515
"packages/codesandbox-api",
16-
"packages/sandpack",
17-
"packages/react-sandpack",
1816
"packages/node-services",
1917
"packages/sandbox-hooks",
2018
"packages/sse-hooks",
@@ -39,9 +37,9 @@
3937
"build:embed": "lerna run build:embed --scope app --stream && gulp",
4038
"build:prod": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" lerna run build --scope homepage --stream && lerna run build --scope app --stream && lerna run copy-assets --scope app --stream",
4139
"commit": "concurrently \"yarn typecheck\" \"yarn lint\" && git commit -m",
40+
"postinstall": "yarn lerna run install-dependencies --stream --concurrency 1 && opencollective postinstall",
4241
"contributors:add": "all-contributors add",
4342
"contributors:generate": "all-contributors generate",
44-
"postinstall": "yarn lerna run install-dependencies --scope vscode-textmate --scope codesandbox-browserfs --scope sse-loading-screen --stream && opencollective postinstall",
4543
"lint": "lerna run lint --stream",
4644
"now-build": "yarn build:deps && lerna run build:storybook --scope @codesandbox/common",
4745
"start": "yarn build:deps && lerna run start --scope @codesandbox/common --scope app --parallel",

packages/app/config/babel.dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232
require.resolve('@babel/plugin-transform-destructuring'),
3333
require.resolve('@babel/plugin-proposal-object-rest-spread'),
3434
require.resolve('@babel/plugin-proposal-class-properties'),
35+
require.resolve('@babel/plugin-proposal-optional-chaining'),
3536
require.resolve('@babel/plugin-transform-runtime'),
3637
require.resolve('babel-plugin-lodash'),
3738
require.resolve('@babel/plugin-syntax-dynamic-import'),

packages/app/config/babel.prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = {
3030
require.resolve('@babel/plugin-transform-async-to-generator'),
3131
require.resolve('@babel/plugin-proposal-object-rest-spread'),
3232
require.resolve('@babel/plugin-proposal-class-properties'),
33+
require.resolve('@babel/plugin-proposal-optional-chaining'),
3334
require.resolve('@babel/plugin-transform-runtime'),
3435
require.resolve('babel-plugin-lodash'),
3536
require.resolve('@babel/plugin-syntax-dynamic-import'),

packages/app/config/build.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
const isDev = process.env.NODE_ENV === 'development';
2+
const { SANDBOX_ONLY } = process.env;
23
const staticAssets = [
3-
{
4+
!SANDBOX_ONLY && {
45
from: 'standalone-packages/vscode-editor/release/min/vs',
5-
to: 'public/vscode24/vs',
6+
to: 'public/vscode25/vs',
67
},
7-
{
8+
!SANDBOX_ONLY && {
89
from: 'standalone-packages/vscode-extensions/out',
9-
to: 'public/vscode-extensions/v10',
10+
to: 'public/vscode-extensions/v11',
1011
},
11-
{
12+
!SANDBOX_ONLY && {
1213
from: 'node_modules/onigasm/lib/onigasm.wasm',
1314
to: 'public/onigasm/2.2.1/onigasm.wasm',
1415
},
15-
{
16+
!SANDBOX_ONLY && {
1617
from:
1718
'standalone-packages/vscode-textmate/node_modules/onigasm/lib/onigasm.wasm',
1819
to: 'public/onigasm/2.1.0/onigasm.wasm',
1920
},
20-
{
21+
!SANDBOX_ONLY && {
2122
from: 'node_modules/monaco-vue/release/min',
2223
to: 'public/14/vs/language/vue',
2324
},
24-
{
25+
!SANDBOX_ONLY && {
2526
from: 'standalone-packages/monaco-editor/release/min/vs',
2627
to: 'public/14/vs',
2728
},
2829
{
2930
from: 'packages/app/static',
3031
to: 'static',
3132
},
33+
{
34+
from: isDev
35+
? 'standalone-packages/codesandbox-browserfs/build'
36+
: 'standalone-packages/codesandbox-browserfs/dist',
37+
to: 'static/browserfs7',
38+
},
39+
// For caching purposes
3240
{
3341
from: isDev
3442
? 'standalone-packages/codesandbox-browserfs/build'
@@ -56,7 +64,7 @@ const staticAssets = [
5664
: 'standalone-packages/codesandbox-browserfs/dist',
5765
to: 'static/browserfs3',
5866
},
59-
];
67+
].filter(Boolean);
6068

6169
module.exports = {
6270
staticAssets,

packages/app/config/webpack.common.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
const webpack = require('webpack');
33
const path = require('path');
44
const fs = require('fs');
5-
const paths = require('./paths');
65
const HtmlWebpackPlugin = require('html-webpack-plugin');
76
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
87
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
98
const threadLoader = require('thread-loader');
10-
const WatchMissingNodeModulesPlugin = require('../scripts/utils/WatchMissingNodeModulesPlugin');
119
const env = require('@codesandbox/common/lib/config/env');
1210
const getHost = require('@codesandbox/common/lib/utils/host');
1311
const postcssNormalize = require('postcss-normalize');
12+
const WatchMissingNodeModulesPlugin = require('../scripts/utils/WatchMissingNodeModulesPlugin');
13+
const paths = require('./paths');
1414

1515
const babelDev = require('./babel.dev');
1616
const babelProd = require('./babel.prod');
@@ -384,6 +384,7 @@ module.exports = {
384384
/browserfs\.min\.js/,
385385
/standalone-packages\/codesandbox-browserfs/,
386386
/standalone-packages\/vscode\//,
387+
/fontfaceobserver\.standalone\.js/,
387388
],
388389
},
389390

@@ -426,7 +427,7 @@ module.exports = {
426427
new HtmlWebpackPlugin({
427428
inject: true,
428429
chunks: ['sandbox-startup', 'vendors~sandbox', 'sandbox'],
429-
filename: 'frame.html',
430+
filename: 'index.html',
430431
template: paths.sandboxHtml,
431432
minify: __PROD__ && {
432433
removeComments: true,

packages/app/config/webpack.prod.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = merge(commonConfig, {
180180
},
181181
},
182182
{
183-
urlPattern: /\/vscode24/,
183+
urlPattern: /\/vscode25/,
184184
handler: 'cacheFirst',
185185
options: {
186186
cache: {
@@ -227,7 +227,9 @@ module.exports = merge(commonConfig, {
227227
minify: true,
228228
// For unknown URLs, fallback to the index page
229229
navigateFallback: 'https://new.codesandbox.io/frame.html',
230-
staticFileGlobs: ['www/frame.html'],
230+
staticFileGlobs: process.env.SANDBOX_ONLY
231+
? ['www/index.html']
232+
: ['www/frame.html'],
231233
stripPrefix: 'www/',
232234
// Ignores URLs starting from /__ (useful for Firebase):
233235
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219

0 commit comments

Comments
 (0)