qxc.promise
v0.0.4
Published
Includes a helper to use RequireJS/alameda, whatwg-fetch and bluebird with Qooxdoo.
Downloads
2
Readme
QXCPROMISE
Includes a helper to use Qooxdoo with RequireJS/alameda, whatwg-fetch and bluebird.
It also includes restful.js, swagger-client and swagger-parser all of this is optional.
Requirements
This requires grunt-qx with qxcompiler.
Install
Install from npm
npm install qxc.promise --save
Now add it as dependency to your Manifest.json
{
"dependencies": [
"qooxdoo-sdk",
"qxc.promise"
]
}
And your done.
Or install as submodule
mkdir vendor
cd vendor
git submodule add https://github.com/drawstack/qxc.promise.git
cd ..
Add it to your Gruntfile.js
You have the choice, either as librayHint
or vendor as libraryDir
.
libraryDir
(prefrerred):
grunt.initConfig({
qx: {
options: {
/* Your Options here */
libraryDirs: [
'node_modules',
'vendor'
]
}
}
});
librayHint
:
grunt.initConfig({
qx: {
options: {
/* Your Options here */
libraryHints: {
'qxc.promise': 'vendor/qxc.promise'
}
}
}
});
Now add it as dependency to your Manifest.json
{
"dependencies": [
"qooxdoo-sdk",
"qxc.promise"
]
}
Add these lines to your Application.js
// You can omit these, but they will only get loaded when
// you realy use them.
qxc.promise.Rest.getInstance().init();
qxc.promise.Swagger.getInstance().init();
// Init QXCPROMISE which will call requirejs.config.
// make sure to do this as last .init(),
// if you have other contribs that require QXCPROMISE.
qxc.promise.Init.getInstance().init();
If you want pretty printed deps
Download and copy them:
cd vendor/qxc.promise
npm install
grunt copy-pretty-deps
cd ../..
Add pretty-deps to your Application.js:
// You can omit these, but they will only get loaded when
// you realy use them.
qxc.promise.Rest.getInstance().initPretty();
qxc.promise.Swagger.getInstance().initPretty();
// Init QXCPROMISE which will call requirejs.config.
// make sure to do this as last .init(),
// if you have other contribs that require QXCPROMISE.
qxc.promise.Init.getInstance().init();
Building the demo
Do this to install the demo
cd vendor/qxc.promise/demo/default
npm install
git clone https://github.com/johnspackman/qooxdoo.git
cd qooxdoo
git checkout -b qxcompiler-master-v2 origin/qxcompiler-master-v2
cd ..
QOOXDOO_PATH=$PWD/qooxdoo grunt serve
Author
René Jochum [email protected]
License
MIT