@@ -173,7 +173,7 @@ export function createInputImage(attributes, inputClass, params) {
`
}
-export function createInputText(attributes, inputClass, params) {
+export function createInputText(attributes, inputClass) {
return `
diff --git a/src/cli/cms/operations/create.js b/src/cli/cms/operations/create.js
index fff0b5f..c019eec 100644
--- a/src/cli/cms/operations/create.js
+++ b/src/cli/cms/operations/create.js
@@ -1,6 +1,5 @@
import path from 'path'
import {
- Manager,
coreUtils,
cmsTemplates,
cmsOperations,
diff --git a/src/cli/cms/operations/remove.js b/src/cli/cms/operations/remove.js
index 9a6c8b2..5ee92ca 100644
--- a/src/cli/cms/operations/remove.js
+++ b/src/cli/cms/operations/remove.js
@@ -2,7 +2,6 @@ import fse from 'fs-extra'
import path from 'path'
import {
- config,
abeExtend,
cmsData,
coreUtils,
diff --git a/src/cli/cms/structure/structure.js b/src/cli/cms/structure/structure.js
index ada1ff5..c0158d7 100644
--- a/src/cli/cms/structure/structure.js
+++ b/src/cli/cms/structure/structure.js
@@ -1,10 +1,5 @@
-import path from 'path'
-
import {
- coreUtils,
- cmsStructure,
- cmsData,
- config
+ coreUtils
} from '../../'
export function editStructure(type, folderPath) {
diff --git a/src/cli/cms/templates/handlebars/attrAbe.js b/src/cli/cms/templates/handlebars/attrAbe.js
index c91836e..d563f5e 100755
--- a/src/cli/cms/templates/handlebars/attrAbe.js
+++ b/src/cli/cms/templates/handlebars/attrAbe.js
@@ -1,5 +1,4 @@
import Handlebars from 'handlebars'
-import abeEngine from '../../../'
/**
* Print properties inside html tag
diff --git a/src/cli/cms/templates/handlebars/isAuthorized.js b/src/cli/cms/templates/handlebars/isAuthorized.js
index c6a4ec1..5c83bc7 100644
--- a/src/cli/cms/templates/handlebars/isAuthorized.js
+++ b/src/cli/cms/templates/handlebars/isAuthorized.js
@@ -1,5 +1,4 @@
import {
- config,
User
} from '../../../'
diff --git a/src/cli/cms/templates/prepare.js b/src/cli/cms/templates/prepare.js
index 6359cfd..dfda082 100755
--- a/src/cli/cms/templates/prepare.js
+++ b/src/cli/cms/templates/prepare.js
@@ -35,24 +35,22 @@ export function addHasAbeAttr(text) {
export function getAbeAttributeData(match, text, htmlAttribute, abeTag) {
var valueOfAttritube
var key = cmsData.regex.getAttr(match, 'key')
- var getattr
var res
if (cmsData.regex.isSingleAbe(match, text)) {
valueOfAttritube = key.replace(/\./g, '-')
key = cmsData.regex.validDataAbe(valueOfAttritube)
- getattr = key.replace(/\./g, '-')
- res = ' data-abe-attr-' + valueOfAttritube + '="' + htmlAttribute + '"' + ' data-abe-' + valueOfAttritube + '="' + getattr + '"' + abeTag
+ key = key.replace(/\./g, '-')
+ res = ' data-abe-attr-' + valueOfAttritube + '="' + htmlAttribute + '"' + ' data-abe-' + valueOfAttritube + '="' + key + '"' + abeTag
}else {
- var valueOfAttritube = key.split('.')
+ valueOfAttritube = key.split('.')
var parentKey = valueOfAttritube.shift()
valueOfAttritube = `${parentKey}[index].${valueOfAttritube[0]}`
var valueOfAttritubeIndexed = valueOfAttritube.replace(/\[index\]/, '{{@index}}')
key = cmsData.regex.validDataAbe(valueOfAttritube)
- getattr = key
- res = ` data-abe-attr-${valueOfAttritube}="${htmlAttribute}" data-abe-${valueOfAttritube}="${getattr}"`
- + ` data-abe-attr-${valueOfAttritubeIndexed}="${htmlAttribute}" data-abe-${valueOfAttritubeIndexed}="${getattr}"${abeTag}`
+ res = ` data-abe-attr-${valueOfAttritube}="${htmlAttribute}" data-abe-${valueOfAttritube}="${key}"`
+ + ` data-abe-attr-${valueOfAttritubeIndexed}="${htmlAttribute}" data-abe-${valueOfAttritubeIndexed}="${key}"${abeTag}`
}
return res
@@ -83,7 +81,7 @@ data-abe-image_key="image_key" src="{{abe type='image' key='image_key' tab='defa
* @param {[type]} template [description]
*/
-export function addAbeDataAttrForHtmlAttributes(template, key) {
+export function addAbeDataAttrForHtmlAttributes(template) {
var text = template.replace(/<([A-Za-z]+)/g, '\nABE_SPLIT<$1')
let abeTagIntoAttribute = text.match(cmsData.regex.abeAsAttributePattern)
diff --git a/src/cli/core/manager/Manager.js b/src/cli/core/manager/Manager.js
index 7694c42..03cbb40 100644
--- a/src/cli/core/manager/Manager.js
+++ b/src/cli/core/manager/Manager.js
@@ -70,18 +70,18 @@ class Manager {
try {
fse.accessSync(this._pathTemplate, fse.F_OK)
this._watchTemplateFolder = watch.createMonitor(this._pathTemplate, (monitor) => {
- monitor.on('created', (f, stat) => {
+ monitor.on('created', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
})
- monitor.on('changed', (f, curr, prev) => {
+ monitor.on('changed', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
})
- monitor.on('removed', (f, stat) => {
+ monitor.on('removed', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
@@ -95,18 +95,18 @@ class Manager {
try {
fse.accessSync(this._pathPartials, fse.F_OK)
this._watchPartialsFolder = watch.createMonitor(this._pathPartials, (monitor) => {
- monitor.on('created', (f, stat) => {
+ monitor.on('created', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
})
- monitor.on('changed', (f, curr, prev) => {
+ monitor.on('changed', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
})
- monitor.on('removed', (f, stat) => {
+ monitor.on('removed', () => {
this.getKeysFromSelect()
this.updateStructureAndTemplates()
this.events.template.emit('update')
@@ -119,15 +119,15 @@ class Manager {
try {
fse.accessSync(this._pathStructure, fse.F_OK)
this._watchStructure = watch.createMonitor(this._pathStructure, (monitor) => {
- monitor.on('created', (f, stat) => {
+ monitor.on('created', () => {
this.updateStructureAndTemplates()
this.events.structure.emit('update')
})
- monitor.on('changed', (f, curr, prev) => {
+ monitor.on('changed', () => {
this.updateStructureAndTemplates()
this.events.structure.emit('update')
})
- monitor.on('removed', (f, stat) => {
+ monitor.on('removed', () => {
this.updateStructureAndTemplates()
this.events.structure.emit('update')
})
@@ -139,16 +139,16 @@ class Manager {
try {
fse.accessSync(this._pathReference, fse.F_OK)
this._watchReferenceFolder = watch.createMonitor(this._pathReference, (monitor) => {
- monitor.on('created', (f, stat) => {
+ monitor.on('created', (f) => {
this.updateReferences(f)
this.events.reference.emit('update')
})
- monitor.on('changed', (f, curr, prev) => {
+ monitor.on('changed', (f) => {
this.updateReferences(f)
this.events.reference.emit('update')
})
- monitor.on('removed', (f, stat) => {
+ monitor.on('removed', () => {
this.updateReferences()
this.events.reference.emit('update')
})
diff --git a/src/cli/core/utils/file.js b/src/cli/core/utils/file.js
index 447fedb..8148398 100755
--- a/src/cli/core/utils/file.js
+++ b/src/cli/core/utils/file.js
@@ -1,7 +1,6 @@
import Promise from 'bluebird'
import path from 'path'
import mkdirp from 'mkdirp'
-import execPromise from 'child-process-promise'
var fse = Promise.promisifyAll(require('fs-extra'))
import {
diff --git a/src/cli/extend/process.js b/src/cli/extend/process.js
index 76aa450..9af59b0 100644
--- a/src/cli/extend/process.js
+++ b/src/cli/extend/process.js
@@ -40,7 +40,7 @@ var abeProcess = function(name, args = []) {
}
if(typeof proc !== 'undefined' && proc !== null) {
- proc.on('message', function(msg) {
+ proc.on('message', function() {
abeExtend.lock.remove(name)
proc.kill()
})
diff --git a/src/cli/index.js b/src/cli/index.js
index 39430f8..595e62a 100755
--- a/src/cli/index.js
+++ b/src/cli/index.js
@@ -14,9 +14,7 @@ import {
moduloIf,
attrAbe,
ifIn,
- ifCond,
- isTrue,
- truncate
+ ifCond
} from './cms/templates/index'
import {