Integrate typedoc to generate code documentation. (#236)
[poolifier.git] / rollup.config.mjs
index bac8f614a5524bd3983969c29ef1d4b36f6fb202..77d516bd6e483da4c5cac72391b3a05cb1bb4087 100644 (file)
@@ -2,9 +2,11 @@ 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'
 
 const isDevelopmentBuild = process.env.BUILD === 'development'
 const isAnalyze = process.env.ANALYZE
+const isDocumentation = process.env.DOCUMENTATION
 
 export default {
   input: 'src/index.ts',
@@ -26,6 +28,7 @@ export default {
     del({
       targets: ['lib/*']
     }),
-    isAnalyze && analyze()
+    isAnalyze && analyze(),
+    isDocumentation && command('npm run typedoc')
   ]
 }