Skip to content

Commit

Permalink
Fix exports for new version of rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed May 31, 2016
1 parent 1fbfe0e commit 92e9720
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"rimraf": "^2.5.1",
"rollup": "^0.26.0",
"rollup-plugin-babel": "^2.4.0",
"rollup-plugin-memory": "^1.0.0",
"sinon": "^1.17.4",
"sinon-chai": "^2.8.0",
"uglify-js": "^2.6.1"
Expand Down
6 changes: 6 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import babel from 'rollup-plugin-babel';
import memory from 'rollup-plugin-memory';

export default {
exports: 'default',
plugins: [
memory({
path: 'src/index',
contents: "export { default } from './index';"
}),
babel({
babelrc: false,
presets: ['es2015-rollup', 'stage-0', 'react'],
Expand Down
4 changes: 3 additions & 1 deletion test/dist.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Router, Link, route } from '../';
import { h } from 'preact';
import { expect } from 'chai';
const router = require('../'); // eslint-disable-line
const { Router, Link, route } = router;
/** @jsx h */

describe('dist', () => {
it('should export Router, Link and route', () => {
expect(Router).to.be.a('function');
expect(Link).to.be.a('function');
expect(route).to.be.a('function');
expect(router).to.equal(Router);
});

describe('Router', () => {
Expand Down

0 comments on commit 92e9720

Please sign in to comment.