Kind: global class
- StudioHelper
- new StudioHelper(settings)
- .push(settings) ⇒
Promise.<Array.<Object>>
| Param | Type | Default | Description |
|---|---|---|---|
| settings | Object |
||
| settings.studio | string |
Studio host ('xyz.studio.crasman.fi') | |
| [settings.proxy] | string |
Proxy | |
| [settings.loginPromptEnabled] | boolean |
true |
Show login prompt if authentication fails |
| [settings.credentialsFile] | string |
".studio-credentials" |
File in which credentials are saved |
Example
var StudioHelper = require('studio-helper'),
studio = new StudioHelper({
studio: 'xyz.studio.crasman.fi',
proxy: 'http://xyz.intra:8080/'
});Push changes to Studio
Kind: instance method of StudioHelper
Returns: Promise.<Array.<Object>> - Array of objects with file upload information
| Param | Type | Description |
|---|---|---|
| settings | Object |
|
| settings.folders | Array.<Object> |
|
| settings.folders[].folderId | string |
Studio folder id |
| settings.folders[].localFolder | string |
Local folder path |
Example
studio.push({
folders: [{
folderId: '568a7a2aadd4532b0f4f4f5b',
localFolder: 'dist/js'
}, {
folderId: '568a7a27add453aa1a4f4f58',
localFolder: 'dist/css'
}]
}).then(function (res) {
console.log(res.length + 'files uploaded');
})