config.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. module.exports = {
  2. /**
  3. * Whether to print debug messages.
  4. * Also enables stack trace for warnings.
  5. *
  6. * @type {Boolean}
  7. */
  8. debug: false,
  9. /**
  10. * Whether to suppress warnings.
  11. *
  12. * @type {Boolean}
  13. */
  14. silent: false,
  15. /**
  16. * Whether to use async rendering.
  17. */
  18. async: true,
  19. /**
  20. * Whether to warn against errors caught when evaluating
  21. * expressions.
  22. */
  23. warnExpressionErrors: true,
  24. /**
  25. * Whether or not to handle fully object properties which
  26. * are already backed by getters and seters. Depending on
  27. * use case and environment, this might introduce non-neglible
  28. * performance penalties.
  29. */
  30. convertAllProperties: false,
  31. /**
  32. * Internal flag to indicate the delimiters have been
  33. * changed.
  34. *
  35. * @type {Boolean}
  36. */
  37. _delimitersChanged: true,
  38. /**
  39. * List of asset types that a component can own.
  40. *
  41. * @type {Array}
  42. */
  43. _assetTypes: [
  44. 'component',
  45. 'directive',
  46. 'elementDirective',
  47. 'filter',
  48. 'transition',
  49. 'partial'
  50. ],
  51. /**
  52. * prop binding modes
  53. */
  54. _propBindingModes: {
  55. ONE_WAY: 0,
  56. TWO_WAY: 1,
  57. ONE_TIME: 2
  58. },
  59. /**
  60. * Max circular updates allowed in a batcher flush cycle.
  61. */
  62. _maxUpdateCount: 100
  63. }
  64. /**
  65. * Interpolation delimiters. Changing these would trigger
  66. * the text parser to re-compile the regular expressions.
  67. *
  68. * @type {Array<String>}
  69. */
  70. var delimiters = ['{{', '}}']
  71. var unsafeDelimiters = ['{{{', '}}}']
  72. var textParser = require('./parsers/text')
  73. Object.defineProperty(module.exports, 'delimiters', {
  74. get: function () {
  75. return delimiters
  76. },
  77. set: function (val) {
  78. delimiters = val
  79. textParser.compileRegex()
  80. }
  81. })
  82. Object.defineProperty(module.exports, 'unsafeDelimiters', {
  83. get: function () {
  84. return unsafeDelimiters
  85. },
  86. set: function (val) {
  87. unsafeDelimiters = val
  88. textParser.compileRegex()
  89. }
  90. })