-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix EZP-21963: create separate "promise-based" build #32
base: master
Are you sure you want to change the base?
Changes from 4 commits
34bebfc
784ddd7
b5a136b
eb4c690
c1b5375
25fbffb
48d9791
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,17 @@ The library can be built with: | |
$ grunt build | ||
``` | ||
|
||
This command will (re)generate the files `dist/CAPI.js` and `dist/CAPI-min.js`. | ||
This command will (re)generate the files `dist/CAPI.js`, `dist/CAPI-min.js` and `dist/PromiseCAPI.js`. | ||
First 2 files are full and minified versions of the regular client library wich doesn't have any dependencies and | ||
is intended for general use. | ||
|
||
The `PromiseCAPI.js` is a promise-based version of the library | ||
which has a dependency on the Q library. While using this version a developer himself is responsible for inclusion of Q library into the project. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to ease reviews (and reading of the raw markdown file), can you please configure your editor to limit the line length at less than 80 characters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (this comment also meant that you need to cut those lines, I'm sure you editor has a magic shortcut for that) |
||
It can be done by using preferred dependency management system or by simply downloading and including Q library file into scripts. | ||
For example see the source file from manual testing bundle: `test/manual/jsRestClientBundle/Resources/views/promise.test.html.twig`. | ||
|
||
More info on Q and promises: https://github.com/kriskowal/q. | ||
|
||
|
||
### Tests | ||
|
||
|
@@ -114,4 +124,8 @@ using following instruction: | |
After these steps you may access `/js-rest-client-test/` path where you will find | ||
testing html page. Most of requests can be configured a little bit before | ||
executing them by changing input values. See details of tests implementation in | ||
Resources/public/js/cookbook-*.js files. | ||
`Resources/public/js/cookbook-*.js` files. | ||
|
||
To test promise-based version of the CAPI you can use `/js-rest-client-promise-test/` path. | ||
This setup includes Q library as a downloaded file. See details of (rather basic) tests implementation | ||
in `Resources/public/js/cookbook-PromiseCAPI.js`. |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a build of the minified promise version is missing