import buble from 'rollup-plugin-buble'
import uglify from 'rollup-plugin-uglify'
import banner from './rollup.conf.banner'

export default {
	banner,
	input: 'src/index.js',
	plugins: [
		buble(),
		uglify({
			output: {
				comments (node, comment) {
					const { value: text, type } = comment
					if ('comment2' === type) {
						return /@license/.test(text)
					}
				},
			},
		}),
	],
	output: {
		file: 'dist/rematrix.min.js',
		format: 'iife',
		name: 'Rematrix',
	},
}

@@ -205,16 +205,19 @@
 fy(%7B%0A%09%09%09
+// 
 output: 
@@ -221,16 +221,19 @@
 t: %7B%0A%09%09%09
+// 
 %09comment
@@ -259,57 +259,34 @@
 %0A%09%09%09
-%09%09const %7B value: text, type %7D = comment%0A%09%09%09%09%09if (
+// %09%09if (comment.type === 
 'com
@@ -295,24 +295,18 @@
 nt2'
- === type
 ) %7B%0A%09%09%09
+// 
 %09%09%09r
@@ -331,31 +331,49 @@
 est(
-text
+comment.value
 )%0A%09%09%09
+// 
 %09%09%7D%0A%09%09%09
+// 
 %09%7D,%0A%09%09%09
+// 
 %7D,%0A%09

remove license comment from minified dist