Skip to content

Commit

Permalink
Full rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Tiberiu Imre-Lucaci authored and Gabriel-Tiberiu Imre-Lucaci committed Apr 2, 2019
1 parent 7080847 commit e23f12b
Show file tree
Hide file tree
Showing 40 changed files with 7,567 additions and 5,145 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
libfec.js
node_modules
dist
src/libquiet
!.gitkeep
15 changes: 15 additions & 0 deletions config/rollup.config.common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

import { string } from 'rollup-plugin-string'

export default {
input: 'src/index.mjs',
plugins: [
string( {
include: [
'src/libquiet/quiet.js',
'src/processors/receive.mjs',
'src/processors/transmit.mjs',
]
} )
]
}
17 changes: 17 additions & 0 deletions config/rollup.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import livereload from 'rollup-plugin-livereload'
import serve from 'rollup-plugin-serve'
import prod from './rollup.config.prod'
import web from './rollup.config.web'

export default {
... web,
plugins: [
... web.plugins.filter( plugin => ! prod.plugins.includes( plugin ) ),
serve( {
contentBase: 'example',
open: true,
} ),
livereload( 'dist' )
]
}
15 changes: 15 additions & 0 deletions config/rollup.config.npm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

import common from './rollup.config.common'
import prod from './rollup.config.prod'

export default {
... common,
plugins: [
... common.plugins,
... prod.plugins,
],
output: {
file: 'dist/index.js',
format: 'cjs',
},
}
8 changes: 8 additions & 0 deletions config/rollup.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import minify from 'rollup-plugin-babel-minify'

export default {
plugins: [
minify( ),
]
}
16 changes: 16 additions & 0 deletions config/rollup.config.web.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

import common from './rollup.config.common'
import prod from './rollup.config.prod'

export default {
... common,
plugins: [
... common.plugins,
... prod.plugins,
],
output: {
file: 'dist/quiet.js',
format: 'iife',
name: 'Quiet',
},
}
Loading

0 comments on commit e23f12b

Please sign in to comment.