forked from dexie/Dexie.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2335f9
commit 7e710e4
Showing
5 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
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
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,6 @@ | ||
// Issue #1127. Need another index.ts for the UMD module with only a default export | ||
// like it was before. | ||
// In practice though, the UMD export will also export the named export in | ||
// https://github.com/dfahlander/Dexie.js/blob/c9187ae60c0d7a424f85bab3af179fbbc9901c8e/src/classes/dexie/dexie-static-props.ts#L223-L228 | ||
import Dexie from "./index"; | ||
export default Dexie; |
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
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
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,38 @@ | ||
import sourcemaps from 'rollup-plugin-sourcemaps'; | ||
import nodeResolve from 'rollup-plugin-node-resolve'; | ||
import cleanup from 'rollup-plugin-cleanup'; | ||
|
||
import {readFileSync} from 'fs'; | ||
import path from 'path'; | ||
|
||
const version = require(path.resolve(__dirname, '../../package.json')).version; | ||
|
||
const ERRORS_TO_IGNORE = [ | ||
"CIRCULAR_DEPENDENCY" // Circular imports are OK. See https://github.com/rollup/rollup/issues/2271 | ||
]; | ||
|
||
export default { | ||
input: path.resolve(__dirname, '../../tools/tmp/src/index-umd.js'), | ||
output: [{ | ||
file: path.resolve(__dirname, '../../dist/dexie.js'), | ||
format: 'umd', | ||
name: 'Dexie', | ||
globals: {}, // For tests, use "QUnit". For addons, use "Dexie" | ||
sourcemap: true, | ||
banner: readFileSync(path.resolve(__dirname, 'banner.txt')), | ||
}], | ||
plugins: [ | ||
sourcemaps(), | ||
nodeResolve({module: true, jsnext: true, browser: true, ignoreGlobal: false}), | ||
cleanup() | ||
], | ||
onwarn ({loc, frame, code, message}) { | ||
if (ERRORS_TO_IGNORE.includes(code)) return; | ||
if ( loc ) { | ||
console.warn( `${loc.file} (${loc.line}:${loc.column}) ${message}` ); | ||
if ( frame ) console.warn( frame ); | ||
} else { | ||
console.warn(`${code} ${message}`); | ||
} | ||
} | ||
}; |