automatically remove console logs
This commit is contained in:
parent
687cc5c961
commit
7a510101d0
|
@ -119,9 +119,7 @@
|
|||
stop('onScrollToBottom')
|
||||
},
|
||||
addStatuses(newStatuses) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('addStatuses()')
|
||||
}
|
||||
let instanceName = this.store.get('currentInstance')
|
||||
let timeline = this.get('timeline')
|
||||
let statusIds = this.get('statusIds')
|
||||
|
|
|
@ -22,16 +22,12 @@
|
|||
let scrollTop = this.store.get('scrollTop')
|
||||
if (scrollTop > 0) {
|
||||
this.observe('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight)
|
||||
}
|
||||
if (!this.get('initializedScrollTop') && allVisibleItemsHaveHeight && node) {
|
||||
this.set({'initializedScrollTop': true})
|
||||
requestAnimationFrame(() => {
|
||||
mark('set scrollTop')
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('forcing scroll top to ', scrollTop)
|
||||
}
|
||||
node.scrollTop = scrollTop
|
||||
stop('set scrollTop')
|
||||
})
|
||||
|
@ -88,9 +84,7 @@
|
|||
},
|
||||
onFullscreenChange() {
|
||||
mark('onFullscreenChange')
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('is fullscreen? ', isFullscreen())
|
||||
}
|
||||
this.set({ fullscreen: isFullscreen() })
|
||||
stop('onFullscreenChange')
|
||||
}
|
||||
|
|
|
@ -9,8 +9,7 @@ import {
|
|||
} from './constants'
|
||||
|
||||
export function getDatabase(instanceName) {
|
||||
if (!instanceName && process.env.NODE_ENV !== 'production') {
|
||||
console.trace()
|
||||
if (!instanceName) {
|
||||
throw new Error('instanceName is undefined in getDatabase()')
|
||||
}
|
||||
if (databaseCache[instanceName]) {
|
||||
|
|
|
@ -106,9 +106,7 @@
|
|||
try {
|
||||
await this.redirectToOauth()
|
||||
} catch (err) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.error(err)
|
||||
}
|
||||
let error = `${err.message || err.name}. ` +
|
||||
(navigator.onLine ?
|
||||
`Is this a valid Mastodon instance?` :
|
||||
|
|
|
@ -68,7 +68,15 @@ module.exports = {
|
|||
//new ExtractTextPlugin('main.css'),
|
||||
new LodashModuleReplacementPlugin(),
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
new UglifyJSPlugin(),
|
||||
new UglifyJSPlugin({
|
||||
parallel: true,
|
||||
uglifyOptions: {
|
||||
comments: false,
|
||||
compress: {
|
||||
drop_console: true
|
||||
}
|
||||
}
|
||||
}),
|
||||
new BundleAnalyzerPlugin({ // generates report.html and stats.json
|
||||
analyzerMode: 'static',
|
||||
generateStatsFile: true,
|
||||
|
|
Loading…
Reference in a new issue