Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

Commit

Permalink
migrate to esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
1player committed Aug 12, 2021
1 parent a82706c commit 14fad6d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 44 deletions.
19 changes: 19 additions & 0 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { build } = require('esbuild');

const common = {
entryPoints: ['./oddslib.mjs'],
bundle: true,
platform: 'node',
};

build({
...common,
outfile: 'dist/oddslib.cjs.js',
});

build({
...common,
outfile: 'dist/oddslib.esm.js',
format: 'esm'
});

48 changes: 20 additions & 28 deletions package-lock.json

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

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "oddslib",
"version": "2.0.1",
"version": "2.1.0",
"description": "Odds conversion and formatting library",
"main": "dist/oddslib.cjs.js",
"module": "dist/oddslib.esm.js",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"build": "node ./esbuild.js",
"test": "mocha --reporter spec"
},
"author": "Stéphane Travostino <[email protected]>",
Expand All @@ -33,7 +32,7 @@
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^8.3.2",
"rollup": "^2.46.0"
"esbuild": "^0.12.19",
"mocha": "^8.3.2"
}
}
11 changes: 0 additions & 11 deletions rollup.config.js

This file was deleted.

0 comments on commit 14fad6d

Please sign in to comment.