Skip to content

Commit

Permalink
refactor: make use of rollup-plugin-node-resolve & rollup-plugin-comm…
Browse files Browse the repository at this point in the history
…onjs
  • Loading branch information
arlac77 committed Feb 5, 2018
1 parent f0555eb commit 3fe25cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
},
"devDependencies": {
"ava": "^0.25.0",
"documentation": "^5.3.5",
"markdown-doctest": "^0.9.1",
"nyc": "^11.4.1",
"rollup": "^0.55.3",
"rollup-plugin-commonjs": "^8.3.0",
"rollup-plugin-multi-entry": "^2.0.2",
"rollup-plugin-node-resolve": "^3.0.2",
"semantic-release": "^13.0.2",
"documentation": "^5.3.5",
"travis-deploy-once": "^4.3.4"
},
"engines": {
Expand Down
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import pkg from './package.json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
input: pkg.module,
output: {
file: pkg.main,
format: 'cjs'
},
plugins: [],
external: ['repository-provider']
plugins: [resolve(), commonjs()],
external: ['repository-provider', 'url']
};
3 changes: 2 additions & 1 deletion src/bitbucket-repository-provider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Provider, Repository, Branch, Content } from 'repository-provider';
import { URL } from 'url';

const request = require('request-promise');
const { URL } = require('url');
//const { URL } = require('url');

/**
* Provider for bitbucket repositories
Expand Down
6 changes: 4 additions & 2 deletions tests/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import multiEntry from 'rollup-plugin-multi-entry';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
input: 'tests/**/*-test.js',
Expand All @@ -7,6 +9,6 @@ export default {
format: 'cjs',
sourcemap: true
},
external: ['ava', 'repository-provider'],
plugins: [multiEntry()]
external: ['ava', 'repository-provider', 'url'],
plugins: [multiEntry(), resolve(), commonjs()]
};

0 comments on commit 3fe25cf

Please sign in to comment.