Skip to content

Commit

Permalink
Ensure webuild is correct
Browse files Browse the repository at this point in the history
Follow up of #304
  • Loading branch information
dubzzz committed Feb 11, 2019
1 parent 2ef63a6 commit b277710
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ jobs:
env: STEP=ROLLUP
script:
- npm run prebuild
- npm run build:publish-cjs
- npm run build:publish-esm
- npm run test:rollup
- npm run webbuild
- npm run test:rollup-esm
- npm run test:rollup-iife
- stage: test
env: STEP=HEAD
script:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"watch": "tsc -w",
"test": "npm run build && jest --config jest.unit.config.js --coverage",
"e2e": "jest --config jest.e2e.config.js",
"test:rollup": "rollup --config test/rollup/rollup.config.js && node test/rollup/dist/main.js",
"test:rollup-esm": "rollup --config test/rollup/esm/rollup.config.js && node test/rollup/esm/dist/main.js",
"test:rollup-iife": "rollup --config test/rollup/iife/rollup.config.js && node test/rollup/iife/dist/main.js",
"coverage": "cat ./coverage/lcov.info | coveralls",
"docs": "typedoc --options typedoc.json ./src/",
"format": "prettier --write \"**/*.{js,ts}\"",
Expand Down
2 changes: 2 additions & 0 deletions test/rollup/esm/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import * as fc from '../../../lib/esm/fast-check';
console.log(fc.sample(fc.lorem(), { seed: 42, numRuns: 5 }));
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import resolve from 'rollup-plugin-node-resolve';
import cjs from 'rollup-plugin-commonjs';

export default {
input: 'test/rollup/main.js',
input: 'test/rollup/esm/main.js',
output: {
file: 'test/rollup/dist/main.js',
file: 'test/rollup/esm/dist/main.js',
format: 'iife',
name: 'RunFastCheck'
},
Expand Down
2 changes: 1 addition & 1 deletion test/rollup/main.js → test/rollup/iife/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import * as fc from '../../lib/esm/fast-check';
const fc = require('../../../lib/bundle');
console.log(fc.sample(fc.lorem(), { seed: 42, numRuns: 5 }));
12 changes: 12 additions & 0 deletions test/rollup/iife/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import resolve from 'rollup-plugin-node-resolve';
import cjs from 'rollup-plugin-commonjs';

export default {
input: 'test/rollup/iife/main.js',
output: {
file: 'test/rollup/iife/dist/main.js',
format: 'iife',
name: 'RunFastCheck'
},
plugins: [resolve(), cjs()]
};

0 comments on commit b277710

Please sign in to comment.