aboutsummaryrefslogtreecommitdiff
path: root/node_modules/vue/src/core/config.js
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/vue/src/core/config.js
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/vue/src/core/config.js')
-rw-r--r--node_modules/vue/src/core/config.js121
1 files changed, 121 insertions, 0 deletions
diff --git a/node_modules/vue/src/core/config.js b/node_modules/vue/src/core/config.js
new file mode 100644
index 00000000..f25f09d1
--- /dev/null
+++ b/node_modules/vue/src/core/config.js
@@ -0,0 +1,121 @@
+/* @flow */
+
+import {
+ no,
+ noop,
+ identity
+} from 'shared/util'
+
+import { LIFECYCLE_HOOKS } from 'shared/constants'
+
+export type Config = {
+ // user
+ optionMergeStrategies: { [key: string]: Function };
+ silent: boolean;
+ productionTip: boolean;
+ performance: boolean;
+ devtools: boolean;
+ errorHandler: ?(err: Error, vm: Component, info: string) => void;
+ warnHandler: ?(msg: string, vm: Component, trace: string) => void;
+ ignoredElements: Array<string | RegExp>;
+ keyCodes: { [key: string]: number | Array<number> };
+
+ // platform
+ isReservedTag: (x?: string) => boolean;
+ isReservedAttr: (x?: string) => boolean;
+ parsePlatformTagName: (x: string) => string;
+ isUnknownElement: (x?: string) => boolean;
+ getTagNamespace: (x?: string) => string | void;
+ mustUseProp: (tag: string, type: ?string, name: string) => boolean;
+
+ // legacy
+ _lifecycleHooks: Array<string>;
+};
+
+export default ({
+ /**
+ * Option merge strategies (used in core/util/options)
+ */
+ // $flow-disable-line
+ optionMergeStrategies: Object.create(null),
+
+ /**
+ * Whether to suppress warnings.
+ */
+ silent: false,
+
+ /**
+ * Show production mode tip message on boot?
+ */
+ productionTip: process.env.NODE_ENV !== 'production',
+
+ /**
+ * Whether to enable devtools
+ */
+ devtools: process.env.NODE_ENV !== 'production',
+
+ /**
+ * Whether to record perf
+ */
+ performance: false,
+
+ /**
+ * Error handler for watcher errors
+ */
+ errorHandler: null,
+
+ /**
+ * Warn handler for watcher warns
+ */
+ warnHandler: null,
+
+ /**
+ * Ignore certain custom elements
+ */
+ ignoredElements: [],
+
+ /**
+ * Custom user key aliases for v-on
+ */
+ // $flow-disable-line
+ keyCodes: Object.create(null),
+
+ /**
+ * Check if a tag is reserved so that it cannot be registered as a
+ * component. This is platform-dependent and may be overwritten.
+ */
+ isReservedTag: no,
+
+ /**
+ * Check if an attribute is reserved so that it cannot be used as a component
+ * prop. This is platform-dependent and may be overwritten.
+ */
+ isReservedAttr: no,
+
+ /**
+ * Check if a tag is an unknown element.
+ * Platform-dependent.
+ */
+ isUnknownElement: no,
+
+ /**
+ * Get the namespace of an element
+ */
+ getTagNamespace: noop,
+
+ /**
+ * Parse the real tag name for the specific platform.
+ */
+ parsePlatformTagName: identity,
+
+ /**
+ * Check if an attribute must be bound using property, e.g. value
+ * Platform-dependent.
+ */
+ mustUseProp: no,
+
+ /**
+ * Exposed for legacy reasons
+ */
+ _lifecycleHooks: LIFECYCLE_HOOKS
+}: Config)