jmoenig/morphic.js — pull request #12 by milmazz (2014-11-24 04:15:55+00:00)
Title: morphic.js in multiple files

This proposal split `morphic.js` in several files, see more details in the issue #4. In order to generate the final `morphic.js` you must use the [Gulp](http://gulpjs.com/) build system, so, the new workflow is something like this:

```
$ git clone https://github.com/milmazz/morphic.js.git
$ cd morphic.js
$ git checkout multiple-files
$ npm install # You need to install npm and node.js first
$ gulp
```

The `default` task in gulp (see `gulpfile.js` for more details) is in charge to re-run the necessary tasks that generate your main `morphic.js`.

Notice that the task `intro` in gulp is in charge to generate the header of the `morphic.js` from the `morphic.txt`. So, the advantage of this change is that from now on you don't need to replicate the changes made to `morphic.txt` into the header section of the `morphic.js` file, this change try to follow the [Don't Repeat Yourself ](http://c2.com/cgi/wiki?DontRepeatYourself) principle.

The new layout of the project is like the following:

```
|-- morphic.js
|-- morphic.txt
`-- src
|-- colors.js
|-- doc.js
|-- morph
| |-- blinker-morph.js
| |-- bouncer-morph.js
| |-- box-morph.js
| |-- circle-box-morph.js
| |-- color-palette-morph.js
| |-- color-picker-morph.js
| |-- cursor-morph.js
| |-- frame-morph.js
| |-- gray-palette-morph.js
| |-- hand-morph.js
| |-- handle-morph.js
| |-- inspector-morph.js
| |-- list-morph.js
| |-- menu-item-morph.js
| |-- menu-morph.js
| |-- morph.js
| |-- mouse-sensor-morph.js
| |-- pen-morph.js
| |-- scroll-frame-morph.js
| |-- shadow-morph.js
| |-- slider-button-morph.js
| |-- slider-morph.js
| |-- speech-bubble-morph.js
| |-- string-field-morph.js
| |-- string-morph.js
| |-- text-morph.js
| |-- trigger-morph.js
| `-- world-morph.js
|-- nodes.js
|-- points.js
|-- rectangles.js
|-- settings.js
`-- utils.js
```

If you have any suggestion don't hesitate to tell me.