Skip to content

Commit

Permalink
Merged branch master into type_rich_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wonknu committed Dec 6, 2016
2 parents 03f4718 + b2e7ba2 commit 433dc75
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/cli/cms/Create.js
Expand Up @@ -22,7 +22,6 @@ export default class Create {
this.addFolder(config.structure.url)
this.addFolder(config.reference.url)
this.addFolder(config.data.url)
this.addFolder(config.draft.url)
}).catch(function(e) {
console.error(e)
})
Expand Down
9 changes: 0 additions & 9 deletions src/cli/cms/data/file.js
Expand Up @@ -21,8 +21,6 @@ export function getAbeMeta(fileObject, json) {
if(json.abe_meta != null) {
if (json.abe_meta.status === 'publish') {
fileObject.htmlPath = path.join(config.root, config.publish.url, path.join('/', fileObject.filePath.replace(/\.json/, `.${config.files.templates.extension}`)))
}else {
fileObject.htmlPath = path.join(config.root, config.draft.url, path.join('/', fileObject.filePath.replace(/\.json/, `.${config.files.templates.extension}`)))
}
var date = null
if (json.abe_meta.latest.date !== null) {
Expand Down Expand Up @@ -122,27 +120,20 @@ export function fromUrl(url) {
link = link.replace(new RegExp('\\' + path.sep, 'g'), '/')
link = cmsData.fileAttr.delete('/'+link)

let draft = config.draft.url
let publish = config.publish.url
let data = config.data.url

res.root = config.root

// set dir path draft/json
res.draft.dir = coreUtils.file.changePath(dir, draft)
res.json.dir = coreUtils.file.changePath(dir, data)
res.publish.dir = coreUtils.file.changePath(dir, publish)
res.publish.json = res.json.dir

// set filename draft/json
res.draft.file = filename
res.publish.file = cmsData.fileAttr.delete(filename)
res.publish.link = link
res.json.file = filename.replace(`.${config.files.templates.extension}`, '.json')
res.publish.json = path.join(res.json.dir, cmsData.fileAttr.delete(res.json.file))

// set filename draft/json
res.draft.path = path.join(res.draft.dir, res.draft.file)
res.publish.path = path.join(res.publish.dir, res.publish.file)
res.json.path = path.join(res.json.dir, res.json.file)
}
Expand Down
3 changes: 0 additions & 3 deletions src/cli/core/config/config.js
Expand Up @@ -141,9 +141,6 @@ result.getConfigByWebsite = () => {
case 'data':
configBySite.default.data = localConfig[item]
break
case 'draft':
configBySite.default.draft = localConfig[item]
break
case 'publish':
configBySite.default.publish = localConfig[item]
break
Expand Down
3 changes: 0 additions & 3 deletions src/cli/core/config/config.json
Expand Up @@ -17,9 +17,6 @@
"data": {
"url": "data"
},
"draft": {
"url": "draft"
},
"publish": {
"url": "site"
},
Expand Down

0 comments on commit 433dc75

Please sign in to comment.