@orion27/orion
v1.0.0
Published
Sencha Test Product, codename Orion.
Downloads
3
Readme
Orion
Sencha Test Product, codename Orion.
Development Setup
Add Ext JS SDK to /ext/
at the project root. See the code guidelines.
Or Download ext.pkg and d3.pkg from Team City and add them as packages... sencha repo sencha repo init -name Sencha sencha package add ~/Downloads/ext.pkg sencha package add ~/Downloads/d3.pkg
NOTE: If you get an error like:
[ERR] Directory /Users/craigcomstock/orion/ext651 not recognized as a framework
[ERR] Unable to load required framework: ext651@null
then extract the ext package locally like this:
sencha package extract -o ext651 [email protected]
Cmd
Get Sencha Cmd 6.5.1 from Team City here.
There are known issues with Sencha Cmd 6.5.2 as of 9/11/17 so 6.5.1 is preferred.
Node.js
Get the current LTS version of Node.js from their downloads page.
Minimum required version is v6.x.x
npm
Node.js comes with a version of npm
but you can get the latest version like so:
sudo npm install npm -g
(inception)
npm install
Note: Studio depends on sencha/tern. In order for npm to resolve this dependency you must have an ssh key in the Sencha Developers group on GitHub.
This project has some inter-dependencies which require the use of `npm link`. To do a clean rebuild including the linking of modules use the
rebuildworkspace.sh script at the root of this project.
App build
npm run build
Install Anti-piracy jar
- Download the anti-piracy jar.
- Rename the jar to utils.jar
- Copy the jar to ~/path/to/repository/orion/Studio/util/utils.jar
Launch
Studio can be launched using npm
scripts from the root folder like so:
npm run studio # Mac/Linux
npm run winstudio # Windows
QA testing for Anti-piracy pings
To test if pings are registered replace production
to testing
on line command += "-mode production "
in ~/path/to/repository/orion/orion-core/lib/App.js
Running Tests in orion-core
To run unit tests on orion-core:
cd orion-core
npm test
or add the following (or similar) to .vscode/launch.json in the workspace
{
"type": "node",
"request": "launch",
"name": "run current jasmine test",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/orion-core/node_modules/jasmine/bin/jasmine.js",
"args": ["${relativeFile}"]
},
{
"type": "node",
"request": "launch",
"name": "coverage on current jasmine test",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/orion-core/node_modules/.bin/istanbul",
"args": ["cover", "${workspaceRoot}/orion-core/node_modules/jasmine/bin/jasmine.js", "${relativeFile}"]
}
Code Linting - eslint
In order to support IDEs usage of eslint the .eslintignore must be at the top-level of the workspace. Currently
only orion-core is configured so that existing files with issues are ignored.
Visual Studio Code Plugins
To have in-line code coverage decorations:
https://marketplace.visualstudio.com/items?itemName=alexdima.vscode-lcov
Enable/Disable coverage decorations with Cmd/Ctrl-Shift-P 'lcov' and then 'Enable/Disable decorations'
To have real-time eslint warnings:
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
You must install eslint and eslint-plugin-compat globally before this plugin will work
npm i -g eslint eslint-plugin-compat
Local Builds
Global Dependencies
Install global Node things:
sudo npm install -g grunt-cli
Build as local executable
Install local things:
npm install
Build the app:
grunt testBuild
At this stage you may test by running with electron and the built app directory:
node_modules/.bin/electron --enable-logging build/production/Studio
NOTE: this build is not quite complete but can be used as a smoke test to ensure the app starts.
there are other assets which must be copied into the production/Studio folder such as tiles/templates/** TODO
Package app as an electron app for the desired platform:
grunt electron:osxBuild
grunt electron:win32
grunt electron:win64
grunt electron:linux32
grunt electron:linux64
Run the project locally by starting the generated executable at:
build/bin/Sencha Studio-<platform-arch>
You can add the "--enable-logging" chrome flag to see basic javascript errors and console logs. Add "--v=1" as well to see more verbose internal chrome logging (probably not interesting most of the time).
On OSX you may cd into build/bin/Sencha Studio-darwin-x64/Sencha Studio.app/Contents/MacOS and run Studio with
./Sencha\ Studio --enable-logging
Build as Installer
NOTE: the build process must be run on a Linux/OSX machine, as the dependencies and build scripts assume that environment.
We use grunt-electron
to create our electron
builds... which requires wine
as part of its build process.
brew install wine
The build scripts also require 7-zip as a globally-accessible binary, so be sure to install it.
7z
Finally, install4j
is the program we use to create the x-platform installers. You'll need that installed too.
To build the project (locally) to get x-platform binaries, simply run grunt
from the project root. This will:
- clean some junk from various folders (namely npm dependencies and build output)
- re-install project dependencies (npm stuff)
- build the Sencha application located in
/Studio/
- generate the
./build/
folder with binary output per the defined Grunt build process (inGruntfile.js
) - contact the Sencha signing server to get our executables properly signed
The grunt build process will output the configured platform installers under ./build/production/installers/
.
Parts of this process (notably, the code signing steps) require a VPN connection to the Sencha signing server.
Testing
See the Test Plan document for details on automated and manual tests for the Sencha Test (Orion) project.
et cetera
* attic - Archive of old code, used for reference
* senchacon-orlando-bulk-runner - Bulk runner shown at SenchaCon '13 in Orlando
* the-eye-server - The EyE is Sencha's former internal test runner / manager
* TestRunner - Local test runner
* JasmineExample - Example app used to develop the local test runner
* Studio - UI for the Electron application