Skip to content

Commit

Permalink
added sourcemap output to rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhitley committed May 18, 2020
1 parent 203d2f6 commit 126320d
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 371 deletions.
8 changes: 5 additions & 3 deletions dist/main/apicache.js

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

1 change: 1 addition & 0 deletions dist/main/apicache.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions dist/module/apicache.js

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

1 change: 1 addition & 0 deletions dist/module/apicache.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"version": "1.5.3",
"scripts": {
"lint": "eslint src",
"test2": "nyc mocha $(find test -name '*_test.js') --recursive",
"test:old": "nyc mocha $(find test -name '*_test.js') --recursive",
"test": "nyc jest --verbose",
"dev": "yarn test --watch",
"test:coverage": "yarn test && yarn coverage",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"build": "rollup -c",
"build2": "rollup src/index.js --format cjs --file dist/apicache.js"
Expand Down Expand Up @@ -49,12 +50,13 @@
"husky": "^4.2.5",
"jest": "^26.0.1",
"mocha": "^7.0.0",
"nyc": "^13.3.0",
"nyc": "^15.0.1",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"restify": "^7.7.0",
"restify-etag-cache": "^1.0.12",
"rollup": "^2.10.2",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^5.3.0",
"supertest": "^4.0.2",
"yarn-release": "^1.10.2"
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import pkg from './package.json'
import { terser } from 'rollup-plugin-terser'
import json from '@rollup/plugin-json'
import { terser } from 'rollup-plugin-terser'
import sourcemaps from 'rollup-plugin-sourcemaps'

export default {
input: 'src/index.js', // our source file
output: [
{
file: pkg.main,
format: 'cjs',
sourcemap: true,
},
{
file: pkg.module,
format: 'es', // the preferred format
sourcemap: true,
},
],
plugins: [
sourcemaps(),
// terser() // minifies generated bundles
json(), // minifies generated bundles
],
Expand Down
Loading

0 comments on commit 126320d

Please sign in to comment.