Skip to content

Commit

Permalink
refactoring: right name on the right parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Apr 7, 2017
1 parent 4dc6298 commit eeec6d5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cli/cms/operations/save.js
Expand Up @@ -7,8 +7,8 @@ import {
config
} from '../../'

export function saveJson(url, json) {
mkdirp.sync(path.dirname(url))
export function saveJson(jsonPath, json) {
mkdirp.sync(path.dirname(jsonPath))

if(json.abe_source != null) delete json.abe_source
if(json.abeEditor != null) delete json.abeEditor
Expand All @@ -25,10 +25,11 @@ export function saveJson(url, json) {

eachRecursive(json)

fse.writeJsonSync(url, json, {
fse.writeJsonSync(jsonPath, json, {
space: 2,
encoding: 'utf-8'
})

return true
}

Expand All @@ -37,4 +38,4 @@ export function saveHtml(url, html) {
fse.writeFileSync(url, html)

return true
}
}

0 comments on commit eeec6d5

Please sign in to comment.