From bbd56da73ce2c7a9020f6680d8b5b94b42ad90e4 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Fri, 15 Jun 2018 22:23:40 -0700 Subject: [PATCH] chore(danger): disable size checker --- dangerfile.js | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 95d17170be..d7700c611b 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -94,47 +94,3 @@ function sizeDiffBadge(name, value) { } return 'https://img.shields.io/badge/' + name + '-' + getFormattedKB(getKB(value)) + 'KB-' + color + '.svg?style=flat-square'; } - -//post size of build -schedule(new Promise(function (res) { - getSize('./dist/cjs', function (e, result) { - var localGlobalFile = path.resolve('./dist/global', globalFile); - var localMinFile = path.resolve('./dist/global', minFile); - - //get sizes of PR build - var global = fs.statSync(localGlobalFile); - var global_gzip = gzipSize.sync(fs.readFileSync(localGlobalFile, 'utf8')); - var min = fs.statSync(localMinFile); - var min_gzip = gzipSize.sync(fs.readFileSync(localMinFile, 'utf8')); - - //resolve path to release build - var releasePath = path.dirname(require.resolve(require.resolve('rxjs'))); - var bundlePath = path.resolve(releasePath, 'bundles'); - var bundleGlobalFile = path.resolve(bundlePath, globalFile); - var bundleMinFile = path.resolve(bundlePath, minFile); - - var packagePath = path.resolve(releasePath, 'package.json'); - var releaseVersion = require(packagePath).version; - - //get sizes of release build - var bundleGlobal = fs.statSync(bundleGlobalFile); - var bundle_global_gzip = gzipSize.sync(fs.readFileSync(bundleGlobalFile, 'utf8')); - var bundleMin = fs.statSync(bundleMinFile); - var bundle_min_gzip = gzipSize.sync(fs.readFileSync(bundleMinFile, 'utf8')); - - var sizeMessage = ' '; - sizeMessage += ' '; - sizeMessage += ' '; - sizeMessage += ' '; - sizeMessage += ' '; - message(sizeMessage); - - markdown('> CJS: **' + getKB(result) + - '**KB, global: **' + getKB(global.size) + - '**KB (gzipped: **' + getKB(global_gzip) + - '**KB), min: **' + getKB(min.size) + - '**KB (gzipped: **' + getKB(min_gzip) + '**KB)'); - - res(); - }); -}));