For WebStorm and
Intellij IDEA Ultimate

program .command('configTemplate') .usage('') .description('Creates a configuration file template, which can be used to create site by setting config details and running s3-website create') .action(function () { getConfig('.s3-website.json', templateConfig, function (err, config) { // eslint-disable-line handle-callback-er if (err) { console.err(err) } }) })
// build source to weex_bundle with watch mode. webpack(weexConfig, (err, stats) => { if (err) { console.err('COMPILE ERROR:', err.stack) } })
moveToDraft(article, workspace) { const draft_dir = this.draft_dir; const filename = (article.filename ? article.filename : article.title) + suffix; const oldPath = this.getPathByWorkspace(workspace) + filename; const newPath = draft_dir + filename; fs.rename(oldPath, newPath) .then((err) => { if (err) { console.err(err); } }); }
moveToPost(article, workspace) { const filename = article.filename + suffix; const oldPath = this.getPathByWorkspace(workspace) + filename; const newPath = this.post_dir + filename; fs.rename(oldPath, newPath) .then((err) => { if (err) { console.err(err); } }); }
// Test to check the list of collections after another collection has been added tap.test('GET collections (more than one)', function(t) { const options = { url: base + '/appmetrics/api/v1/collections', method: 'GET' }; // Create another collection request({url: options.url, method: 'POST' }, function(err) { if (err) { console.err('Error creating another collection'); } t.ifError(err); }); debug('request %j', options); request(options, function(err, res, body) { t.ifError(err); let expectedResponse = '{"collectionUris":["collections/0","collections/1"]}'; t.equal(body, expectedResponse); t.equal(res.statusCode, 200); t.end(); }); });
let reset = function(callback){ if(app && server) { server.destroy(); } //todo: don't do this.. but the pool b draining setTimeout(function(){ require("../config/db").destroy().then(function(res){ console.log("POOL!", res); Object.keys(require.cache).forEach(function(key) { delete require.cache[key] }); knex.raw('DROP DATABASE IF EXISTS testing') .then(() => knex.raw('CREATE DATABASE testing')) .then(() => require("../app")(initConfig)) .then(function(newApp){ server = newApp.listen("3001"); enableDestroy(server); app = newApp; callback(true); }).catch(function(reason){ console.err(reason); }) }) }, 500) }
deletePost(article) { const path = this.trash_dir + article.filename + suffix; console.log(path); fs.unlink(path) .then((err) => { if (err) { console.err(err); } }); }
console.err('Error removing batterystatus event listener: ' + e);
console.err('Error removing batterylow event listener: ' + e);
moveToTrash(article, workspace) { const trash_dir = this.trash_dir; const filename = article.filename + suffix; const oldPath = this.getPathByWorkspace(workspace) + filename; const newPath = trash_dir + filename; fs.rename(oldPath, newPath) .then((err) => { if (err) { console.err(err); } }); }
console.err('Error removing batterycritical event listener: ' + e);