From 2fd676588e770e04b2dbf2b587591e3cbab4d379 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 8 May 2017 20:32:42 -0700 Subject: [PATCH] Moved build details into a full setup/development page (#40) --- Build Details.md | 29 ------------------------- Development.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 29 deletions(-) delete mode 100644 Build Details.md create mode 100644 Development.md diff --git a/Build Details.md b/Build Details.md deleted file mode 100644 index c54a1fa..0000000 --- a/Build Details.md +++ /dev/null @@ -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)* diff --git a/Development.md b/Development.md new file mode 100644 index 0000000..81821f1 --- /dev/null +++ b/Development.md @@ -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.