generated from fluture-js/fluture-template
-
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.
Merge the commit history and changes from the template repository
- Loading branch information
Showing
10 changed files
with
118 additions
and
11 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/coverage/ | ||
/index.cjs | ||
/dist/* | ||
/node_modules/ | ||
|
||
!/dist/package.json |
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,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
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 |
---|---|---|
|
@@ -5,6 +5,34 @@ | |
//. | ||
//. ## Usage | ||
//. | ||
//. ### Node | ||
//. | ||
//. ```console | ||
//. $ npm install --save fluture-observe | ||
//. ``` | ||
//. | ||
//. On Node 12 and up, this module can be loaded directly with `import` or | ||
//. `require`. On Node versions below 12, `require` or the [esm][]-loader can | ||
//. be used. | ||
//. | ||
//. ### Deno and Modern Browsers | ||
//. | ||
//. You can load the EcmaScript module from various content delivery networks: | ||
//. | ||
//. - [Skypack](https://cdn.skypack.dev/[email protected]) | ||
//. - [JSPM](https://jspm.dev/[email protected]) | ||
//. - [jsDelivr](https://cdn.jsdelivr.net/npm/[email protected]/+esm) | ||
//. | ||
//. ### Old Browsers and Code Pens | ||
//. | ||
//. There's a [UMD][] file included in the NPM package, also available via | ||
//. jsDelivr: https://cdn.jsdelivr.net/npm/[email protected]/dist/umd.js | ||
//. | ||
//. This file adds `flutureObserve` to the global scope, or use CommonJS/AMD | ||
//. when available. | ||
//. | ||
//. ### Usage Example | ||
//. | ||
//. ```js | ||
//. import {observe, cata} from 'fluture-observe/index.js'; | ||
//. | ||
|
@@ -32,6 +60,9 @@ | |
//. } | ||
//. })); | ||
//. ``` | ||
//. | ||
//. ## API | ||
|
||
import daggy from 'daggy'; | ||
import {forkCatch, isFuture} from 'fluture/index.js'; | ||
|
||
|
@@ -143,3 +174,5 @@ export function observe(f) { | |
//. [Fluture]: https://github.com/fluture-js/Fluture | ||
//. [Daggy]: https://github.com/fantasyland/daggy | ||
//. [types from Fluture]: https://github.com/fluture-js/Fluture#types | ||
//. [esm]: https://github.com/standard-things/esm | ||
//. [UMD]: https://github.com/umdjs/umd |
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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import pkg from './package.json'; | ||
|
||
const dependencyNames = Array.prototype.concat.call ( | ||
Object.keys (pkg.dependencies), | ||
Object.keys (pkg.peerDependencies) | ||
); | ||
|
||
export default { | ||
input: 'index.js', | ||
external: dependencyNames, | ||
output: { | ||
format: 'umd', | ||
file: 'index.cjs', | ||
file: 'dist/umd.js', | ||
name: 'flutureObserve', | ||
interop: false | ||
exports: 'named', | ||
globals: {} | ||
} | ||
}; |
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