Apply dependencies update (#482)
[poolifier.git] / rollup.config.mjs
index bac8f614a5524bd3983969c29ef1d4b36f6fb202..f301a0871b09c655762b1ceee7495a9fa2af8dc3 100644 (file)
@@ -2,9 +2,12 @@ import typescript from 'rollup-plugin-typescript2'
 import analyze from 'rollup-plugin-analyzer'
 import { terser } from 'rollup-plugin-terser'
 import del from 'rollup-plugin-delete'
+import command from 'rollup-plugin-command'
+import istanbul from 'rollup-plugin-istanbul'
 
 const isDevelopmentBuild = process.env.BUILD === 'development'
 const isAnalyze = process.env.ANALYZE
+const isDocumentation = process.env.DOCUMENTATION
 
 export default {
   input: 'src/index.ts',
@@ -23,9 +26,11 @@ export default {
         ? 'tsconfig.development.json'
         : 'tsconfig.json'
     }),
+    isDevelopmentBuild && istanbul(),
     del({
       targets: ['lib/*']
     }),
-    isAnalyze && analyze()
+    isAnalyze && analyze(),
+    isDocumentation && command('npm run typedoc')
   ]
 }