Skip to content

Commit 5578c10

Browse files
committed
Moved to rollup for better releases
Now released as a `UMD`, `CJS` and `ES` module packages for better support
1 parent 6c1c1d7 commit 5578c10

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

rollup.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import rollupTypescript from '@rollup/plugin-typescript';
2+
import { nodeResolve } from '@rollup/plugin-node-resolve';
3+
import terser from '@rollup/plugin-terser';
4+
import commonjs from '@rollup/plugin-commonjs';
5+
6+
export default {
7+
input: 'src/index.ts',
8+
output: [
9+
{
10+
file: 'lib/index.js',
11+
format: 'umd',
12+
sourcemap: true,
13+
compact: false,
14+
name: 'TopMarksDevelopment',
15+
},
16+
{
17+
file: 'lib/index.cjs',
18+
format: 'cjs',
19+
sourcemap: true,
20+
compact: false,
21+
},
22+
{
23+
file: 'lib/index.m.js',
24+
format: 'es',
25+
sourcemap: true,
26+
compact: false,
27+
},
28+
],
29+
plugins: [rollupTypescript(), terser(), commonjs(), nodeResolve()],
30+
};

tsconfig.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"compilerOptions": {
3+
"strict": true,
34
"target": "es2015",
4-
"module": "commonjs",
5+
"moduleResolution": "node",
56
"sourceMap": true,
67
"outDir": "./lib",
78
"declaration": true,
8-
"declarationMap": true
9-
}
9+
"declarationMap": true,
10+
"rootDir": "./src"
11+
},
12+
"include": ["src/**/*"]
1013
}

0 commit comments

Comments
 (0)