Permalink
Browse files

Split up UI into multiple files and bundle with rollup

  • Loading branch information...
lovett committed Oct 18, 2018
1 parent 66be4d0 commit 4e2bef49801262e91ff12b15e6ca0145ab451c0e
@@ -7,7 +7,7 @@ bower_components
config/*
!config/default.json
.nodemonignore
server/static/lib
server/static/bundle.js
archive
*.log
env.json
@@ -37,14 +37,19 @@ resetdb: dummy
#
# Run the test suite.
#
test: dummy
test: test-dispatcher test-ui

test-dispatcher: dummy
mocha --bail --reporter min test/dispatcher

test-ui: dummy
mocha --bail --reporter min ui/test

#
# Generate a test coverage report.
#
coverage: dummy
nyc --reporter=html mocha --bail --reporter min test/dispatcher
nyc --reporter=html mocha --bail --reporter min ui/test coverage/ui

#
# Check for coding style violations.
@@ -67,3 +72,7 @@ puc: dummy
git checkout master
git add package.json package-lock.json
git commit -m "Upgrade npm packages"


ui: dummy
rollup -c -w
@@ -0,0 +1,18 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
input: 'ui/index.js',
output: {
file: 'server/static/bundle.js',
format: 'iife',
name: 'Headlines',
},
plugins: [
resolve(),
commonjs()
],
watch: {
include: 'ui/**/*.js'
}
};
Oops, something went wrong.

0 comments on commit 4e2bef4

Please sign in to comment.