浏览代码

Fix discify script now that we have .json files in build

Renée Kooi 5 年之前
父节点
当前提交
c17e992485
共有 1 个文件被更改,包括 9 次插入6 次删除
  1. 9 6
      bin/disc.js

+ 9 - 6
bin/disc.js

@@ -8,12 +8,15 @@ const disc = require('disc')
 
 const outputPath = path.join(__dirname, '../website/src/disc.html')
 
-function minifyify () {
-  return minify({
-    sourceMap: false,
-    toplevel: true,
-    compress: { unsafe: true }
-  })
+function minifyify (filename) {
+  if (filename.endsWith('.js')) {
+    return minify({
+      sourceMap: false,
+      toplevel: true,
+      compress: { unsafe: true }
+    })
+  }
+  return new PassThrough()
 }
 
 const bundler = browserify(path.join(__dirname, '../packages/uppy/index.js'), {