Skip to content

Commit c6758b2

Browse files
authored
Extract common to a lib (codesandbox#1653)
Allows homepage and dynamic-pages to work standalone
1 parent 8f067eb commit c6758b2

File tree

326 files changed

+770
-639
lines changed

Some content is hidden

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

326 files changed

+770
-639
lines changed

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
workspaces-experimental true
1+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build:prod": "lerna run build --scope homepage --stream && lerna run build --scope app --stream && gulp",
99
"build:embed": "lerna run build:embed --scope app --stream && gulp",
1010
"build:clean": "lerna run build:clean --scope app --scope homepage && rimraf www",
11-
"build:deps": "lerna run build:dev --scope codesandbox-api && lerna run build:dev --scope common && lerna run build:dev --scope vscode-textmate --scope codesandbox-browserfs --scope node-services && lerna run build:dev --scope sse-hooks",
11+
"build:deps": "lerna run build:dev --scope codesandbox-api && lerna run build:dev --scope @codesandbox/common && lerna run build:dev --scope vscode-textmate --scope codesandbox-browserfs --scope node-services && lerna run build:dev --scope sse-hooks",
1212
"build:dynamic": "lerna run build --scope dynamic-pages --stream",
1313
"start": "yarn build:deps && lerna run start --scope app --stream",
1414
"start:fast": "lerna run start --scope app --stream",

packages/app/config/webpack.common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
77
const CopyWebpackPlugin = require('copy-webpack-plugin');
88
const HappyPack = require('happypack');
99
const WatchMissingNodeModulesPlugin = require('../scripts/utils/WatchMissingNodeModulesPlugin');
10-
const env = require('common/lib/config/env');
11-
const getHost = require('common/lib/utils/host');
10+
const env = require('@codesandbox/common/lib/config/env');
11+
const getHost = require('@codesandbox/common/lib/utils/host');
1212

1313
const babelDev = require('./babel.dev');
1414
const babelProd = require('./babel.prod');

packages/app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"cerebral": "^4.0.0",
160160
"circular-json": "^0.4.0",
161161
"codemirror": "^5.27.4",
162-
"codesandbox-api": "^0.0.20",
162+
"codesandbox-api": "^0.0.22",
163163
"codesandbox-import-utils": "2.1.1",
164164
"color": "^0.11.4",
165165
"compare-versions": "^3.1.0",
@@ -247,7 +247,6 @@
247247
"sha1": "^1.1.1",
248248
"shelljs": "^0.7.8",
249249
"shortid": "^2.2.8",
250-
"socket.io-client": "^2.1.1",
251250
"store": "^2.0.12",
252251
"string-replace-loader": "^2.1.1",
253252
"styled-components": "^4.1.2",

packages/app/src/app/components/Alert/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { Button } from 'common/lib/components/Button';
3+
import { Button } from '@codesandbox/common/lib/components/Button';
44
import { Container, Title, Text, Buttons } from './elements';
55

66
function Alert({ title, body, onCancel, onDelete }) {

packages/app/src/app/components/CodeEditor/CodeMirror/elements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled, { css, keyframes } from 'styled-components';
2-
import theme from 'common/lib/theme';
2+
import theme from '@codesandbox/common/lib/theme';
33

44
const fadeInAnimation = keyframes`
55
0% { background-color: #374140; }

packages/app/src/app/components/CodeEditor/CodeMirror/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as React from 'react';
44
import CodeMirror from 'codemirror';
55
import { withTheme } from 'styled-components';
66

7-
import type { ModuleError, Module } from 'common/lib/types';
7+
import type { ModuleError, Module } from '@codesandbox/common/lib/types';
88
import { getCodeMirror } from 'app/utils/codemirror';
99

1010
import 'codemirror/addon/dialog/dialog';

packages/app/src/app/components/CodeEditor/Configuration/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react';
22
import { TextOperation } from 'ot';
3-
import { Module } from 'common/lib/types';
4-
import getUI from 'common/lib/templates/configuration/ui';
3+
import { Module } from '@codesandbox/common/lib/types';
4+
import getUI from '@codesandbox/common/lib/templates/configuration/ui';
55
import getType from 'app/utils/get-type';
66
import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons';
7-
import Tooltip from 'common/lib/components/Tooltip';
8-
import { ConfigurationFile } from 'common/lib/templates/configuration/types';
7+
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
8+
import { ConfigurationFile } from '@codesandbox/common/lib/templates/configuration/types';
99

1010
import CodeIcon from 'react-icons/lib/md/code';
1111

packages/app/src/app/components/CodeEditor/FilePath/elements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components';
22
import ChevronLeft from 'react-icons/lib/md/chevron-left';
33
import ExitZen from 'react-icons/lib/md/fullscreen-exit';
4-
import { withTooltip } from 'common/lib/components/Tooltip';
4+
import { withTooltip } from '@codesandbox/common/lib/components/Tooltip';
55

66
export const Container = styled.div`
77
background-color: rgba(0, 0, 0, 0.3);

packages/app/src/app/components/CodeEditor/FilePath/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { getModulePath } from 'common/lib/sandbox/modules';
2+
import { getModulePath } from '@codesandbox/common/lib/sandbox/modules';
33
import EntryIcons from 'app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons';
44
import getType from 'app/utils/get-type';
55

0 commit comments

Comments
 (0)