Skip to content

Commit 1d6fd43

Browse files
merge and fix VIM
2 parents 7f39cd4 + b1590c0 commit 1d6fd43

File tree

32 files changed

+667
-414
lines changed

32 files changed

+667
-414
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-153-orange.svg?style=flat-square)](#contributors-) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1+
<p align="center">
2+
<a href="https://codesandbox.io">
3+
<img src="https://user-images.githubusercontent.com/1863771/68405395-5020f400-0180-11ea-8818-8cb255d9fe71.png" height="200px">
4+
</a>
5+
</p>
6+
7+
&nbsp;
8+
9+
[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox)
10+
[![All Contributors](https://img.shields.io/badge/all_contributors-153-orange.svg?style=flat-square)](#contributors-)
11+
[![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client)
12+
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)
13+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
14+
[![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
15+
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
216

317
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
418
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
519

6-
![Banner](https://codesandbox.io/static/img/banner.png)
7-
820
An online code editor tailored for web applications.
921

1022
This project was bootstrapped with
@@ -246,6 +258,7 @@ Thanks goes to these wonderful people
246258

247259
<!-- markdownlint-enable -->
248260
<!-- prettier-ignore-end -->
261+
249262
<!-- ALL-CONTRIBUTORS-LIST:END -->
250263

251264
## Backers

packages/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
"http-browserify": "^1.7.0",
127127
"https-browserify": "^1.0.0",
128128
"humps": "CompuIves/humps",
129+
"ignore": "^5.1.4",
129130
"immer": "^3.2.0",
130131
"immutability-helper": "^2.6.6",
131132
"instantsearch.css": "^7.1.0",

packages/app/src/app/components/Preview/DevTools/Console/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ class ConsoleComponent extends React.Component<StyledProps> {
180180
method: 'log',
181181
data: [
182182
'%cConsole was cleared',
183-
'font-style: italic; color: rgba(255, 255, 255, 0.3)',
183+
`font-style: italic; color: ${
184+
this.props.theme.vscodeTheme.type === 'light'
185+
? 'rgba(0, 0, 0, 0.3)'
186+
: 'rgba(255, 255, 255, 0.3)'
187+
}`,
184188
],
185189
},
186190
];

packages/app/src/app/components/Preview/DevTools/Tabs/Tab/UnreadDevToolsCount.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ const Container = styled.div<{ unread: number; status: StatusType }>`
1414
height: 16px;
1515
width: 16px;
1616
color: ${({ unread }) =>
17-
unread === 0 ? `rgba(255, 255, 255, 0.4)` : 'white'};
17+
unread === 0 ? 'rgba(255, 255, 255, 0.4)' : 'white'};
1818
background-color: ${({ status, unread, theme }) => {
1919
if (unread === 0) {
20-
return 'rgba(255, 255, 255, 0.2)';
20+
return theme.vscodeTheme.type === 'dark'
21+
? 'rgba(255, 255, 255, 0.2)'
22+
: 'rgba(0, 0, 0, 0.2)';
2123
}
2224
if (status === 'info') {
2325
return theme.secondary();

packages/app/src/app/overmind/effects/analytics.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import track, {
22
identify,
3+
setAnonymousId,
34
setUserId,
45
} from '@codesandbox/common/lib/utils/analytics';
56

@@ -16,6 +17,7 @@ export default (() => {
1617
track(event, data);
1718
},
1819
identify,
20+
setAnonymousId,
1921
setUserId,
2022
};
2123
})();

packages/app/src/app/overmind/effects/git/export-to-github.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export default async function deploy(sandbox: Sandbox) {
99
sandbox,
1010
sandbox.modules,
1111
sandbox.directories,
12-
false
12+
false,
13+
true
1314
);
1415

1516
if (!zipFile) {

packages/app/src/app/overmind/effects/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export { default as api } from './api';
44
export { default as browser } from './browser';
55
export { default as connection } from './connection';
66
export { default as jsZip } from './jsZip';
7-
export { default as jwt } from './jwt';
87
export { default as keybindingManager } from './keybindingManager';
98
export { default as live } from './live';
109
export { default as moduleRecover } from './moduleRecover';
@@ -24,4 +23,4 @@ export { default as codesandboxApi } from './codesandboxApi';
2423
export { default as themes } from './themes';
2524
export { default as executor } from './executor';
2625
export { default as stripe } from './stripe';
27-
export { default as chameleon } from './chameleon';
26+
export { default as jwt } from './jwt';

packages/app/src/app/overmind/effects/jwt.ts

100755100644
File mode changed.

packages/app/src/app/overmind/effects/vscode/index.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,25 @@ export class VSCodeEffect {
120120
// It will only load the editor once. We should probably call this
121121
const container = this.elements.editor;
122122

123-
this.initialized = Promise.all([
124-
new FontFaceObserver('dm').load(),
125-
new Promise(resolve => {
126-
loadScript(true, ['vs/editor/codesandbox.editor.main'])(resolve);
127-
}),
128-
sandboxFsSync.initialize({
123+
this.initialized = sandboxFsSync
124+
.initialize({
129125
getSandboxFs: options.getSandboxFs,
130-
}),
131-
]).then(() => this.loadEditor(window.monaco, container));
126+
})
127+
.then(() => {
128+
// We want to initialize before VSCode, but after browserFS is configured
129+
// For first-timers initialize a theme in the cache so it doesn't jump colors
130+
initializeExtensionsFolder();
131+
initializeCustomTheme();
132+
initializeThemeCache();
133+
initializeSettings();
134+
135+
return Promise.all([
136+
new FontFaceObserver('dm').load(),
137+
new Promise(resolve => {
138+
loadScript(true, ['vs/editor/codesandbox.editor.main'])(resolve);
139+
}),
140+
]).then(() => this.loadEditor(window.monaco, container));
141+
});
132142

133143
return this.initialized;
134144
}
@@ -396,12 +406,6 @@ export class VSCodeEffect {
396406
this.monaco = monaco;
397407
this.workbench = new Workbench(monaco, this.controller, this.runCommand);
398408

399-
// For first-timers initialize a theme in the cache so it doesn't jump colors
400-
initializeExtensionsFolder();
401-
initializeCustomTheme();
402-
initializeThemeCache();
403-
initializeSettings();
404-
405409
if (localStorage.getItem('settings.vimmode') === 'true') {
406410
this.enableExtension(VIM_EXTENSION_ID);
407411
}

packages/app/src/app/overmind/effects/zip/create-zip/create-react-app-typescript/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export default function createZip(
4545
await Promise.all(
4646
modules
4747
.filter(x => x.directoryShortid == null)
48-
.filter(x => x.title !== 'yarn.lock' && x.title !== 'package-lock.json')
4948
.map(x => {
5049
if (x.title === 'package.json' && x.directoryShortid == null) {
5150
return createFile(alterPackageJSON(x), src);

0 commit comments

Comments
 (0)