You've already forked Documentation
mirror of
https://github.com/FullScreenShenanigans/Documentation.git
synced 2026-04-28 13:03:28 -07:00
Moved build details into a full setup/development page (#40)
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
Builds are managed by [gulp-shenanigans](https://github.com/FullScreenShenanigans/gulp-shenanigans/).
|
||||
See the [#Builds documentation](https://github.com/FullScreenShenanigans/gulp-shenanigans/blob/master/README.md#builds) there for how to build, test, and run individual projects.
|
||||
|
||||
## Referencing module updates locally
|
||||
|
||||
When updating project with changes that should be reflected in other projects, use [`npm link`](https://docs.npmjs.com/cli/link) to create symlinks within `node_modules` directories.
|
||||
|
||||
For example, to make `C:/Code/QuadsKeepr`'s `node_modules/ObjectMakr` point to `C:/Code/ObjectMakr`:
|
||||
|
||||
```cmd
|
||||
cd C:/Code/ObjectMakr
|
||||
npm link
|
||||
|
||||
cd C:/Code/QuadsKeepr
|
||||
npm link ObjectMakr
|
||||
```
|
||||
|
||||
### `shenanigans-manager`
|
||||
|
||||
The `shenanigans-manager` npm package may also be useful for larger-scale package management.
|
||||
For example, to set up a directory with all relevant FullScreenShenanigans repositories linked to each other:
|
||||
|
||||
```cmd
|
||||
npm install -g shenanigans-manager
|
||||
|
||||
shenanigans-manager complete-setup --directory C:/Code/Shenanigans
|
||||
```
|
||||
|
||||
*(`complete-setup` will take a while)*
|
||||
@@ -0,0 +1,56 @@
|
||||
# Development
|
||||
|
||||
Development on projects under the FullScreenShenanigans organization is generally managed by two packages:
|
||||
* **[`shenanigans-manager`](https://github.com/FullScreenShenanigans/shenanigans-manager)** sets up your computer with cloned packages pointing to each other.
|
||||
* **[`gulp-shenanigans`](https://github.com/FullScreenShenanigans/gulp-shenanigans)** provides [Gulp](http://gulpjs.com/) build tasks for each package.
|
||||
|
||||
## Initial Setup
|
||||
|
||||
First, install the prerequisite software:
|
||||
* [Node.js](http://node.js.org)
|
||||
* [Git](https://git-scm.com/downloads)
|
||||
|
||||
It's recommended to use [Visual Studio Code](https://code.visualstudio.com/) as your editor with the [TSLint extension](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) installed.
|
||||
|
||||
|
||||
### `shenanigans-manager`
|
||||
|
||||
Use `shenanigans-manager`'s `complete-setup` command to set up a directory with all the relevant FullScreenShenanigans projects linked to each other.
|
||||
|
||||
Using a shell / command prompt with administrative privileges:
|
||||
|
||||
```shell
|
||||
npm install -g shenanigans-manager gulp
|
||||
shenanigans-manager complete-setup --directory C:/Code/Shenanigans
|
||||
```
|
||||
|
||||
After this, all the repositories will be fully built.
|
||||
Their `node_modules` dependencies will by symbolically linked to each other.
|
||||
|
||||
You can launch Code in a project by starting it on the command-line and passing it a directory.
|
||||
|
||||
```shell
|
||||
code C:/Code/Shenanigans/AreaSpawnr
|
||||
```
|
||||
|
||||
See the [`shenanigans-manager` documentation](https://github.com/FullScreenShenanigans/shenanigans-manager) for details on the available commands.
|
||||
|
||||
## Building
|
||||
|
||||
Full builds can be launched with `gulp`, though those are too slow for general development.
|
||||
The recommended way to build is to start Gulp watching your source files:
|
||||
|
||||
```shell
|
||||
gulp watch
|
||||
```
|
||||
|
||||
This will trigger incremental compilation whenever a source file changes.
|
||||
|
||||
### `src` and `test`
|
||||
|
||||
The `tsconfig.json` for files under `/src` is located in the root of the project, but a different one exists at `/test/tsconfig.json` for test files.
|
||||
The two directories have separate build steps and will both output compiled files next to their source equivalents.
|
||||
|
||||
You can run tests using `gulp test` or by opening `/test/index.html` in a browser.
|
||||
|
||||
See the [`gulp-shenanigans` documentation](https://github.com/FullScreenShenanigans/gulp-shenanigans/blob/master/README.md#builds) for details on how to build, test, and run individual projects.
|
||||
Reference in New Issue
Block a user