-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rollup and esm, remove toCase
- Loading branch information
1 parent
7f054b0
commit 4d68b05
Showing
9 changed files
with
374 additions
and
225 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,14 @@ | |
"case.d.ts" | ||
], | ||
"main": "dist/Case.js", | ||
"module": "dist/Case.mjs", | ||
"exports": { | ||
".": { | ||
"import": "./dist/Case.mjs", | ||
"require": "./dist/Case.js", | ||
"default": "./dist/Case.js" | ||
} | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/nbubna/Case/issues", | ||
"email": "[email protected]" | ||
|
@@ -40,6 +48,7 @@ | |
}, | ||
"license": "(MIT OR GPL-3.0-or-later)", | ||
"scripts": { | ||
"build": "rollup --config ./rollup.config.js", | ||
"test": "grunt qunit" | ||
}, | ||
"devDependencies": { | ||
|
@@ -52,7 +61,9 @@ | |
"grunt-contrib-qunit": "^3.1.0", | ||
"grunt-contrib-uglify": "^4.0.1", | ||
"grunt-contrib-watch": "^1.1.0", | ||
"grunt-nuget": "~0.3.1" | ||
"grunt-nuget": "~0.3.1", | ||
"rollup": "^2.17.1", | ||
"rollup-plugin-terser": "^6.1.0" | ||
}, | ||
"typings": "case.d.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// @ts-check | ||
|
||
import { terser } from 'rollup-plugin-terser'; | ||
|
||
/** | ||
* @type { import('rollup').RollupOptions } | ||
*/ | ||
const config = { | ||
input: './src/Case.mjs', | ||
output: [ | ||
{ | ||
file: './dist/Case.js', | ||
format: 'umd', | ||
name: 'Case', | ||
sourcemap: true, | ||
sourcemapExcludeSources: true, | ||
}, | ||
{ | ||
file: './dist/Case.mjs', | ||
format: 'esm', | ||
sourcemap: true, | ||
sourcemapExcludeSources: true, | ||
}, | ||
{ | ||
file: './dist/Case.min.js', | ||
format: 'umd', | ||
name: 'Case', | ||
sourcemap: true, | ||
sourcemapExcludeSources: true, | ||
plugins: [terser()], | ||
}, | ||
{ | ||
file: './dist/Case.min.mjs', | ||
format: 'esm', | ||
sourcemap: true, | ||
sourcemapExcludeSources: true, | ||
plugins: [terser()], | ||
}, | ||
], | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.