Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow BRJS to be run from outside of the SDK directory by putting brjs on the PATH #1130

Closed
andy-berry-dev opened this issue Dec 10, 2014 · 4 comments

Comments

@andy-berry-dev
Copy link
Member

I suspect its already possible to run BRJS from anywhere but it needs verifying.

We already pass the location of BRJS to the model via command line args (added by the brjs script) so if we started adding the current working directory that should allow us to both allow BRJS to run from anywhere and apps to live separately from BRJS.

This includes #93 and #95 which have been closed and tracked as a subtask of #1. We hadn't originally planned to do this work for 1.0 but it seems that it would be much more beneficial and sought after than context aware commands (#885), which we had planned to do, and would take a lot less dev effort.

@andy-berry-dev andy-berry-dev added this to the 1.0 RC1 milestone Dec 10, 2014
@andy-berry-dev andy-berry-dev changed the title Allow BRJS to be run from outside of the SDK directory and apps to live seperately Allow BRJS to be run from outside of the SDK directory and for apps to live seperately from the SDK Dec 11, 2014
@andy-berry-dev andy-berry-dev modified the milestones: 1.0 M1, 1.0 RC1 Dec 11, 2014
@dchambers dchambers changed the title Allow BRJS to be run from outside of the SDK directory and for apps to live seperately from the SDK Allow BRJS to be run from outside of the SDK directory and for apps to live separately from the SDK Dec 12, 2014
@dchambers
Copy link
Contributor

@andyberry88, are we going to move this out of 1.0 M1 now that we don't want it to be included in 1.0, or will we leave it in that milestone anyway, on the basis that it will be done in that time-frame?

@andy-berry-dev
Copy link
Member Author

@andyberry88, are we going to move this out of 1.0 M1 now that we don't want it to be included in 1.0, or will we leave it in that milestone anyway, on the basis that it will be done in that time-frame?

I've created a separate issue (#1154) to track the separation of the SDK and apps. This issue is only to allow BRJS to be run from outside of the sdk dir - i.e. by putting brjs on the PATH

@andy-berry-dev andy-berry-dev changed the title Allow BRJS to be run from outside of the SDK directory and for apps to live separately from the SDK Allow BRJS to be run from outside of the SDK directory by putting brjs on the PATH Jan 7, 2015
@leggetter leggetter mentioned this issue Jan 7, 2015
5 tasks
@andy-berry-dev
Copy link
Member Author

This was mostly already possible. Only the legacy test runner needed changing - see PR #1172. It's now possible to do the following:

andy@Andys-Mac:/Users/.../brjs-sdk/workspace (brjs-from-anywhere) [1 stashed] : PATH=$PATH:/Users/andy/Documents/Caplin/BladeRunnerJS/Development/brjs/brjs-sdk/workspace/sdk

andy@Andys-Mac:/Users/.../brjs-sdk/workspace (brjs-from-anywhere) [1 stashed] : pwd
/Users/andy/Documents/Caplin/BladeRunnerJS/Development/brjs/brjs-sdk/workspace

andy@Andys-Mac:/Users/.../brjs-sdk/workspace (brjs-from-anywhere) [1 stashed] : cd apps/

andy@Andys-Mac:/Users/.../workspace/apps (brjs-from-anywhere) [1 stashed] : brjs create-app foo
Successfully created new app 'foo'
/Users/andy/Documents/Caplin/BladeRunnerJS/Development/brjs/brjs-sdk/workspace/apps/foo
Successfully deployed 'foo' app

andy@Andys-Mac:/Users/.../workspace/apps (brjs-from-anywhere) [1 stashed] : ls
apps.txt foo

andy@Andys-Mac:/Users/.../workspace/apps (brjs-from-anywhere) [1 stashed] : brjs create-bladeset bs
Problem:
Parameter 'new-bladeset-name' is required.

Usage:
brjs create-bladeset <target-app-name> <new-bladeset-name> [(-T|--template) <template-group>]

andy@Andys-Mac:/Users/.../workspace/apps (brjs-from-anywhere) [1 stashed] : brjs create-bladeset foo bs
Successfully created new bladeset 'bs'
/Users/andy/Documents/Caplin/BladeRunnerJS/Development/brjs/brjs-sdk/workspace/apps/foo/bs-bladeset

andy@Andys-Mac:/Users/.../workspace/apps (brjs-from-anywhere) [1 stashed] : cd foo/

andy@Andys-Mac:/Users/.../apps/foo (brjs-from-anywhere) [1 stashed] : brjs create-blade foo bs b1
Successfully created new blade 'b1'
/Users/andy/Documents/Caplin/BladeRunnerJS/Development/brjs/brjs-sdk/workspace/apps/foo/bs-bladeset/blades/b1

andy@Andys-Mac:/Users/.../apps/foo (brjs-from-anywhere) [1 stashed] : brjs test .


Testing foo/test-unit (UTs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (1.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (1.00 ms)
Tests Passed.


Testing foo/test-acceptance (ATs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (2.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (2.00 ms)
Tests Passed.


Testing foo/bs-bladeset/test-unit (UTs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (1.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (1.00 ms)
Tests Passed.


Testing foo/bs-bladeset/blades/b1/test-unit (UTs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (3.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (3.00 ms)
Tests Passed.


Testing foo/bs-bladeset/blades/b1/test-acceptance (ATs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (4.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (4.00 ms)
Tests Passed.


== Runner Report ==
- Tests Passed

andy@Andys-Mac:/Users/.../apps/foo (brjs-from-anywhere) [1 stashed] : cd bs-bladeset/blades/b1/

andy@Andys-Mac:/Users/.../blades/b1 (brjs-from-anywhere) [1 stashed] : brjs test .


Testing foo/bs-bladeset/blades/b1/test-unit (UTs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (2.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (2.00 ms)
Tests Passed.


Testing foo/bs-bladeset/blades/b1/test-acceptance (ATs):
.
Total 1 tests (Passed: 1; Fails: 0; Errors: 0) (5.00 ms)
PhantomJS  : Run 1 tests (Passed: 1; Fails: 0; Errors 0) (5.00 ms)
Tests Passed.


== Runner Report ==
- Tests Passed

@thecapdan
Copy link
Contributor

tested. works on windows + also when integrated with CT. tested a multitude of commands: test, serve, help, export-app...

@andy-berry-dev andy-berry-dev modified the milestones: 1.0 M1, 0.15 Jan 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants