Skip to content

Commit c2a8e41

Browse files
committed
publish es6 as mjs and declare type
1 parent ed6f19a commit c2a8e41

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "inkjs",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
5+
"type": "commonjs",
56
"main": "dist/ink-full.js",
67
"types": "ink.d.ts",
8+
"files": ["src/engine","src/compiler","ink.d.ts","script/inkjs-compiler.ts"],
79
"scripts": {
810
"test": "npm run test:typescript && npm run test:javascript",
911
"test:typescript": "jest",

rollup.config.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,27 @@ export default [
2525
input: engineOnlyInputFile,
2626
output: {
2727
name: moduleName,
28-
file: 'dist/ink-es6.js',
28+
file: 'dist/ink.mjs',
29+
format: 'es',
30+
sourcemap: true
31+
},
32+
plugins: [
33+
nodeResolve(),
34+
typescript(tsconfig),
35+
babel({
36+
exclude: 'node_modules/**',
37+
extensions: ['.js', '.ts'],
38+
babelHelpers: 'bundled'
39+
}),
40+
terser(),
41+
sourcemaps()
42+
]
43+
},
44+
{
45+
input: fullfeatureInputFile,
46+
output: {
47+
name: moduleName,
48+
file: 'dist/ink-full.mjs',
2949
format: 'es',
3050
sourcemap: true
3151
},

0 commit comments

Comments
 (0)