-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring: moving cms data function into cms/data
- Loading branch information
1 parent
3b3ae10
commit 61dd3fd
Showing
8 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/cli/helpers/abe-remove-duplicate-attr.js → ...cli/cms/data/abe-remove-duplicate-attr.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import { | |
Manager, | ||
FileParser, | ||
getAttr | ||
} from '../' | ||
} from '../../' | ||
|
||
export default class Sql { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/cli/helpers/regex-helper.js → src/cli/cms/data/regex-helper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import path from 'path' | ||
import { | ||
config | ||
,FileParser | ||
,fileUtils | ||
,folderUtils | ||
,save | ||
,Hooks | ||
} from '../../' | ||
|
||
var pConfig = {} | ||
Array.prototype.forEach.call(process.argv, (item) => { | ||
if (item.indexOf('=') > -1) { | ||
var ar = item.split('=') | ||
pConfig[ar[0]] = ar[1] | ||
} | ||
}) | ||
|
||
if(typeof pConfig.ABE_WEBSITE !== 'undefined' && pConfig.ABE_WEBSITE !== null) { | ||
if(pConfig.ABE_WEBSITE) config.set({root: pConfig.ABE_WEBSITE.replace(/\/$/, '') + '/'}) | ||
|
||
var allJson | ||
|
||
pConfig.FILEPATH = path.join(config.root, config.data.url, pConfig.FILEPATH ? pConfig.FILEPATH.replace(config.root) : '') | ||
|
||
if(pConfig.FILETYPE) { | ||
allJson = FileParser.getFilesByType(pConfig.FILEPATH, pConfig.FILETYPE) | ||
} | ||
else { | ||
allJson = FileParser.getFiles(pConfig.FILEPATH, true, 20, /\.json/) | ||
} | ||
|
||
var allJson = Hooks.instance.trigger('beforeUpdateJson', allJson) | ||
|
||
}else { | ||
console.log('ABE_WEBSITE is not defined use node process.js ABE_WEBSITE=/pat/to/website') | ||
process.exit(0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters