Skip to content

Commit

Permalink
Merge pull request #22314 from code-dot-org/revert-22298-revert-21452…
Browse files Browse the repository at this point in the history
…-revert-21388-revert-21137-export-maze

Build Maze app from external repo
  • Loading branch information
Hamms committed May 11, 2018
2 parents 10b7310 + 8433a76 commit d720692
Show file tree
Hide file tree
Showing 57 changed files with 166 additions and 5,214 deletions.
1 change: 1 addition & 0 deletions apps/package.json
Expand Up @@ -49,6 +49,7 @@
"@code-dot-org/johnny-five": "0.11.1-cdo.2",
"@code-dot-org/js-interpreter-tyrant": "0.2.2",
"@code-dot-org/js-numbers": "0.1.0-cdo.0",
"@code-dot-org/maze": "1.0.1",
"@code-dot-org/p5.play": "1.2.2-cdo",
"@code-dot-org/piskel": "0.13.0-cdo.3",
"@storybook/addon-info": "3.2.11",
Expand Down
6 changes: 4 additions & 2 deletions apps/src/code-studio/components/BeeCellEditor.jsx
@@ -1,11 +1,13 @@
/**
* @overview React component to allow for easy editing and creation of BeeCells
* @see @cdo/apps/maze/beeCell
* @see @code-dot-org/maze/src/beeCell
*/

import React from 'react';
import CellEditor from './CellEditor';
import BeeCell from '@cdo/apps/maze/beeCell';
import { cells } from '@code-dot-org/maze';

const BeeCell = cells.BeeCell;

export default class BeeCellEditor extends CellEditor {
/**
Expand Down
6 changes: 4 additions & 2 deletions apps/src/code-studio/components/CellEditor.jsx
@@ -1,10 +1,12 @@
/**
* @overview React component to allow for easy editing and creation of Cells.
* can be extended to allow for editing of various specialized kinds of cells.
* @see @cdo/apps/maze/cell
* @see @code-dot-org/maze/src/cell
*/
import React, {PropTypes} from 'react';
import { SquareType } from '@cdo/apps/maze/tiles';
import { tiles } from '@code-dot-org/maze';

const SquareType = tiles.SquareType;

export default class CellEditor extends React.Component {
static propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/Grid.jsx
Expand Up @@ -7,7 +7,7 @@ import {
WallCoordColMask,
WallCoordColShift
} from '@cdo/apps/studio/constants';
import mazeUtils from '@cdo/apps/maze/mazeUtils';
import { utils as mazeUtils } from '@code-dot-org/maze';

const CELL_WIDTH = 48;
const CELL_HEIGHT = 38;
Expand Down
16 changes: 7 additions & 9 deletions apps/src/code-studio/components/GridEditor.jsx
Expand Up @@ -4,12 +4,10 @@
* Supports both Bee and Farmer skins.
*/
import React, {PropTypes} from 'react';
var HarvesterCell = require('@cdo/apps/maze/harvesterCell');
var PlanterCell = require('@cdo/apps/maze/planterCell');
var BeeCell = require('@cdo/apps/maze/beeCell');
var Cell = require('@cdo/apps/maze/cell');

import {cells, utils as mazeUtils} from '@code-dot-org/maze';

var StudioCell = require('@cdo/apps/studio/cell');
var mazeUtils = require('@cdo/apps/maze/mazeUtils');

var HarvesterCellEditor = require('./HarvesterCellEditor');
var PlanterCellEditor = require('./PlanterCellEditor');
Expand Down Expand Up @@ -80,13 +78,13 @@ export default class GridEditor extends React.Component {
if (this.props.skin === 'playlab' || this.props.skin === 'starwarsgrid') {
return StudioCell;
} else if (mazeUtils.isBeeSkin(this.props.skin)) {
return BeeCell;
return cells.BeeCell;
} else if (mazeUtils.isHarvesterSkin(this.props.skin)) {
return HarvesterCell;
return cells.HarvesterCell;
} else if (mazeUtils.isPlanterSkin(this.props.skin)) {
return PlanterCell;
return cells.PlanterCell;
}
return Cell;
return cells.Cell;
}

getEditorClass() {
Expand Down
6 changes: 4 additions & 2 deletions apps/src/code-studio/components/HarvesterCellEditor.jsx
@@ -1,11 +1,13 @@
/**
* @overview React component to allow for easy editing and creation of HarvesterCells
* @see @cdo/apps/maze/harvesterCell
* @see @code-dot-org/maze/src/harvesterCell
*/

import React from 'react';
import CellEditor from './CellEditor';
import HarvesterCell from '@cdo/apps/maze/harvesterCell';
import { cells } from '@code-dot-org/maze';

const HarvesterCell = cells.HarvesterCell;

export default class PlanterCellEditor extends CellEditor {
/**
Expand Down
7 changes: 4 additions & 3 deletions apps/src/code-studio/components/PlanterCellEditor.jsx
@@ -1,12 +1,13 @@
/**
* @overview React component to allow for easy editing and creation of PlanterCells
* @see @cdo/apps/maze/harvesterCell
* @see @code-dot-org/maze/src/harvesterCell
*/

import React from 'react';
import CellEditor from './CellEditor';
import PlanterCell from '@cdo/apps/maze/planterCell';
import { SquareType } from '@cdo/apps/maze/tiles';
import { cells, tiles } from '@code-dot-org/maze';
const PlanterCell = cells.PlanterCell;
const SquareType = tiles.SquareType;

export default class PlanterCellEditor extends CellEditor {

Expand Down
8 changes: 5 additions & 3 deletions apps/src/code-studio/components/stageExtras/MazeThumbnail.jsx
@@ -1,11 +1,13 @@
import React, {PropTypes} from 'react';
import ProtectedStatefulDiv from '@cdo/apps/templates/ProtectedStatefulDiv';
import skins from "@cdo/apps/maze/skins";
import {getSubtypeForSkin} from '@cdo/apps/maze/mazeUtils';
import MazeMap from '@cdo/apps/maze/mazeMap';
import drawMap from '@cdo/apps/maze/drawMap';
import assetUrl from '@cdo/apps/code-studio/assetUrl';

import { utils, MazeMap, drawMap } from '@code-dot-org/maze';

const getSubtypeForSkin = utils.getSubtypeForSkin;


export default class MazeThumbnail extends React.Component {
static propTypes = {
level: PropTypes.shape({
Expand Down

0 comments on commit d720692

Please sign in to comment.