Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AdFabConnect/abejs
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Oct 25, 2016
2 parents 3b09fad + b68ae88 commit 35fd3e6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/cli/extend/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var abeProcess = function(name, args = []) {
proc.on('message', function( msg ) {
abeExtend.lock.remove(name)
proc.kill()
});
})
return true
}

Expand Down
4 changes: 2 additions & 2 deletions src/cli/process/publish-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ if(typeof pConfig.ABE_WEBSITE !== 'undefined' && pConfig.ABE_WEBSITE !== null) {
}
dateStart = (Math.round((new Date().getTime() - dateStart.getTime()) / 1000 / 60 * 100)) / 100
console.log('publish process finished in ' + clc.green(dateStart) + 'm')
process.send('finished');
process.exit(0);
process.send('finished')
process.exit(0)
})
})
.catch((e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/server/public/scripts/modules/EditorSave.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class EditorSave {

this._abeDisplayStatus.innerHTML = result.json.abe_meta.status
if(result.success === 1) {
json = result.json
window.json = result.json
}
this.onFileSaved._fire()
}).catch(function(e) {
Expand Down
4 changes: 2 additions & 2 deletions src/server/public/scripts/template-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class Engine {
})
})

var abeReady = new Event('abeReady');
document.dispatchEvent(abeReady);
var abeReady = new Event('abeReady')
document.dispatchEvent(abeReady)
}

inject() {
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/get-republish.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
} from '../../cli'

var route = function(req, res) {
var result
var result
if (abeExtend.process('publish-all', [''])) {
result = {
success: 1,
Expand Down
Empty file.
16 changes: 2 additions & 14 deletions test/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,11 @@ describe('Create', function() {
it('cmsOperations.create()', function(done) {
cmsOperations.create('article', '', 'article-2.html', {query: ''}, this.fixture.jsonArticle, false)
.then(function(resSave) {
var html = path.join(config.root, config.draft.url, resSave.abe_meta.latest.abeUrl)
var json = path.join(config.root, config.data.url, resSave.abe_meta.latest.abeUrl.replace('.html', '.json'))
var stat = fse.statSync(html)
var stat = fse.statSync(json)
if (stat) {
chai.expect(stat).to.not.be.undefined;
}
stat = fse.statSync(json)
if (stat) {
chai.expect(stat).to.not.be.undefined;
}
fse.removeSync(html)
fse.removeSync(json)
done()
}.bind(this));
Expand All @@ -55,17 +49,11 @@ describe('Create', function() {
it('cmsOperations.duplicate()', function(done) {
cmsOperations.duplicate('article-1.html', 'article', '', 'article-2.html', {}, false)
.then(function(resSave) {
var html = path.join(config.root, config.draft.url, resSave.abe_meta.latest.abeUrl)
var json = path.join(config.root, config.data.url, resSave.abe_meta.latest.abeUrl.replace('.html', '.json'))
var stat = fse.statSync(html)
if (stat) {
chai.expect(stat).to.not.be.undefined;
}
stat = fse.statSync(json)
var stat = fse.statSync(json)
if (stat) {
chai.expect(stat).to.not.be.undefined;
}
fse.removeSync(html)
fse.removeSync(json)
done()
}.bind(this))
Expand Down

0 comments on commit 35fd3e6

Please sign in to comment.