Skip to content

Commit

Permalink
address #68
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Jul 27, 2020
1 parent 5b173c3 commit 8936f7e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": ["@babel/env"],
"plugins": [
"@babel/proposal-export-namespace-from",
["@babel/plugin-transform-runtime", {"regenerator":true}]
]
}
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js
node_js:
- "node"
- "12"
- "10"
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
PJ=package.json
TS=combinatorics.ts
JS=combinatorics.js
MJS=combinatorics.mjs
DTS=combinatorics.d.ts

all: $(JS)
all: $(PJ) $(JS)

$(JS): $(TS)
$(JS): $(PJ) $(TS)
tsc -d --target es6 $(TS)

test: $(JS)
mocha --require esm
test: $(PJ) $(JS)
mocha --require @babel/register

clean:
-rm $(DTS) $(MJS) $(JS)
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "js-combinatorics",
"version": "1.2.1",
"type" : "module",
"description": "Simple combinatorics like power set, combination, and permutation in JavaScript",
"main": "combinatorics.js",
"module": "combinatorics.js",
Expand All @@ -13,6 +14,10 @@
"devDependencies": {
"typescript": "^3.9.7",
"@types/node": "^14.0.26",
"@babel/plugin-proposal-export-namespace-from": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/register": "^7.10.4",
"mocha": "^8.0.0",
"chai": "^4.2.0"
},
Expand Down
4 changes: 3 additions & 1 deletion test/00-node.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
global.chai = require('chai');
// global.chai = require('chai');
import chai from 'chai';
global.chai = chai;
global.isLegacySafari = false;

0 comments on commit 8936f7e

Please sign in to comment.