Skip to content

Commit

Permalink
fix(build): fix package
Browse files Browse the repository at this point in the history
  • Loading branch information
jaebradley committed Apr 24, 2018
1 parent 1759486 commit 4e371a0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
"jest": {
"testEnvironment": "node"
},
"dependencies": {
"axios": "^0.18.0",
"qs": "^6.5.1"
"peerDependencies": {
"axios": "^0.18.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.42",
Expand All @@ -53,6 +52,7 @@
"@commitlint/config-angular": "^6.1.3",
"@commitlint/prompt": "^6.1.3",
"@commitlint/prompt-cli": "^6.1.3",
"axios": "^0.18.0",
"babel-core": "^7.0.0-bridge.0",
"codecov": "^3.0.0",
"eslint": "^4.19.1",
Expand Down
24 changes: 19 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,46 @@ const config = {
file: 'build/index.js',
format: 'umd',
name: 'npms-client',
globals: [
'axios',
],
},
{
file: 'build/index.cjs.js',
format: 'cjs',
name: 'npms-client',
globals: [
'axios',
],
},
{
file: 'build/index.esm.js',
format: 'es',
globals: [
'axios',
],
},
],
external: [
'axios',
],
plugins: [
globals(),
builtins(),
babel({ exclude: 'node_modules/**' }),
minify(),
uglify(),
localResolve({
localResolve(),
json(),
resolve({
module: true,
jsnext: true,
main: true,
preferBuiltins: true,
browser: true,
modulesOnly: true,
}),
resolve(),
json(),
commonjs(),
minify(),
uglify(),
filesize(),
],
};
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import qs from 'qs';
import qs from 'querystring';

import buildSearchQuery from './buildSearchQuery';
import PACKAGE_TYPES from './packageTypes';
Expand Down

0 comments on commit 4e371a0

Please sign in to comment.