deftjs/DeftJS — pull request #91 by superstructor (2013-06-18 22:53:14+00:00)
Title: Sencha Cmd based Package & Build Process

The root of the repository is a Sencha Cmd workspace.

The DeftJS package is in `packages/deft`.

The main build script is `packages/deft/build.xml`

The Node.js / NPM `package.json` remains in the root of the repository.

The Sencha Cmd `package.json` is `packages/deft/packages.json`.

Storing the entire workspace in the repository gives us the required separation of the two incompatible `package.json` formats.

Sources are in `packages/deft/src/coffee`, compiled into JavaScript during `sencha package build` to `packages/deft/src/js`, and concatenated into `deft.js` and `deft-debug.js` to `packages/deft/build`.

Tests are in `packages/deft/test/coffee`, also compiled into JavaScript during `sencha package build` to `packages/deft/test/js`. Everything else is copied as-is for tests. The existing ant task `packages/deft/test/build.xml` is simply included from `packages/deft/build.xml`.

Test are still run via `cd packages/deft && ant test` and not part of the `sencha package build` process yet but there is nothing stopping us from hooking into a Sencha Cmd extension point.

Documentation is built during `sencha package build` (-before-pkg) into `packages/deft/docs`, this means it is in the resulting package zip file `build/deft/deft.pkg`.

**Outstanding Issues**

1. Copyright notice is not added to the head of the built `deft.js` and `deft-debug.js`. This used to be done during concatenation. Not sure how to do this.

2. `// Generated by CoffeeScript` lines not stripped from compiled JavaScripts. This used to be done during concatenation. Not sure how to do this.

3. SASS / SCSS is compiled but is not needed for DeftJS. This is just default Sencha Cmd package stuff (e.g. for a theme package) that we need to work out how to remove. Doesn't break anything just a bit untidy.

4. `package/deft/build` directory and `packages/deft/test/js` needs to be committed for tests to pass on Travis CI. Trivial just left out until we decided what to do re 1, 2 ,3.

5. `creator` property in `packages/deft/package.json` needs to be changed to match the local repository name of the person who will build deployable packages and sign with their encryption keys (i.e. John). Currently "anonymous". To setup this just run `sencha repo init -name "The name of the creator"`, backup your encryption keys from you local repo (in Sencha Cmd install location), and change `creator` in `package.json` to "The name of the creator". Then `sencha package build` (inside the `packages/deft` directory) should sign the `deft.pkg` file with your encryption key, you can confirm this by looking at the console output of `sencha package build`.

6. Deployment of John's local repository to http://deftjs.org, as far as I can tell basically involves copying the required files to a static HTTP server.

7. README.md potentially needs some updates to cover the Sencha Cmd installation from the deftjs.org repository, repo structure and/or build process