Sha256: 55b951b83a41c170f69e7fb4d6a2503b958ceef69b5f0ea7807bfa63f28f0356
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
/** * Enable debug utilities. */ if (process.env.NODE_ENV !== 'production') { var config = require('../config') var hasConsole = typeof console !== 'undefined' /** * Log a message. * * @param {String} msg */ exports.log = function (msg) { if (hasConsole && config.debug) { console.log('[Vue info]: ' + msg) } } /** * We've got a problem here. * * @param {String} msg */ exports.warn = function (msg, e) { if (hasConsole && (!config.silent || config.debug)) { console.warn('[Vue warn]: ' + msg) /* istanbul ignore if */ if (config.debug) { console.warn((e || new Error('Warning Stack Trace')).stack) } } } /** * Assert asset exists */ exports.assertAsset = function (val, type, id) { /* istanbul ignore if */ if (type === 'directive') { if (id === 'with') { exports.warn( 'v-with has been deprecated in ^0.12.0. ' + 'Use props instead.' ) return } if (id === 'events') { exports.warn( 'v-events has been deprecated in ^0.12.0. ' + 'Pass down methods as callback props instead.' ) return } } if (!val) { exports.warn('Failed to resolve ' + type + ': ' + id) } } }
Version data entries
6 entries across 6 versions & 2 rubygems