Permalink
Browse files

closes #763

  • Loading branch information...
scriptPilot committed Jan 10, 2018
1 parent 6f84f01 commit a387c4b5c6825209a2c6293f741fa283059775a0
Showing with 26 additions and 2 deletions.
  1. +4 −0 CHANGELOG.md
  2. +4 −0 config-scheme.json
  3. +2 −1 demo/config.json
  4. +3 −0 docs/configuration.md
  5. +13 −1 scripts/env.js
View
@@ -4,6 +4,10 @@
## Next version
### New features
- [x] [#763 - Allow debug mode for App Framework](https://github.com/scriptPilot/app-framework/issues/763)
### Bug-fixes
- [x] [#743 - Update framework7-vue to v0.9.4](https://github.com/scriptPilot/app-framework/issues/743)
View
@@ -233,5 +233,9 @@
},
"npmignore": {
"type": "object"
},
"debug": {
"type": "boolean",
"default": false
}
}
View
@@ -76,5 +76,6 @@
"fixCodeOnBuild": true,
"devServerPort": "8080",
"gitignore": {},
"npmignore": {}
"npmignore": {},
"debug": false
}
View
@@ -68,4 +68,7 @@ eslint | *object* |
fixCodeOnTest | *boolean* | true
fixCodeOnBuild | *boolean* | true
devServerPort | /^[0-9]{4}$/ | 8080
gitignore | *object* | {}
npmignore | *object* | {}
debug | *boolean* | false
<!-- /config-options -->
View
@@ -121,6 +121,17 @@ let ignored = function (path) {
return isIgnored
}
// Debug function
const debug = (input) => {
if (cfg.debug === true) {
const inputString = typeof input === 'string' ? input : JSON.stringify(input)
const debugFile = abs(proj, 'debug.log')
let debugFileContent = found(debugFile) ? fs.readFileSync(debugFile, 'utf-8') : ''
debugFileContent = debugFileContent + inputString + '\n'
fs.writeFileSync(debugFile, debugFileContent)
}
}
module.exports = {
framework: framework,
arg: arg,
@@ -131,5 +142,6 @@ module.exports = {
pkg: pkg,
cfg: cfg,
os: os,
ignored: ignored
ignored: ignored,
debug: debug
}

0 comments on commit a387c4b

Please sign in to comment.