@timberio/browser
Advanced tools
Comparing version 0.21.0 to 0.22.0
# License | ||
Copyright (c) 2018, Timber Technologies, Inc. | ||
Copyright (c) 2018. Timber Technologies, Inc. | ||
@@ -5,0 +5,0 @@ Permission to use, copy, modify, and/or distribute this software for any purpose |
{ | ||
"name": "@timberio/browser", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "Timber.io browser logging", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@timberio/types": "^0.21.0", | ||
"@timberio/types": "^0.22.0", | ||
"@types/nock": "^9.3.0", | ||
@@ -52,7 +52,7 @@ "@types/node": "^10.12.12", | ||
"dependencies": { | ||
"@timberio/core": "^0.21.0", | ||
"@timberio/tools": "^0.21.0", | ||
"@timberio/core": "^0.22.0", | ||
"@timberio/tools": "^0.22.0", | ||
"cross-fetch": "^2.2.3" | ||
}, | ||
"gitHead": "ad47bc5850606d875f014d39f5a81daf87810729" | ||
"gitHead": "40597144b884fdb8481049eac289b7ff9015a671" | ||
} |
# 🌲 Timber - Browser logging | ||
## 👷️ WIP - Don't use yet! Use [this Timber JS lib](https://github.com/timberio/timber-node) for now | ||
![Beta: Ready for testing](https://img.shields.io/badge/early_release-beta-green.svg) | ||
![Speed: Blazing](https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg) | ||
[![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md) | ||
@@ -38,3 +40,3 @@ **New to Timber?** [Here's a low-down on logging in Javascript.](https://github.com/timberio/timber-js) | ||
``` | ||
<script src="https://unpkg.com/@timberio/browser@0.16.0/dist/umd/timber.js"></script> | ||
<script src="https://unpkg.com/@timberio/browser@0.21.0/dist/umd/timber.js"></script> | ||
``` | ||
@@ -44,3 +46,3 @@ | ||
### Creating a logging client | ||
## Creating a client | ||
@@ -55,4 +57,79 @@ You can instantiate the client in the same way, whether you use a module bundler or the `<script>` tag method. | ||
### Logging | ||
## Documentation | ||
TBA | ||
This browser library extends [`@timberio/core`](https://github.com/timberio/timber-js/tree/master/packages/core), which provides a simple API for logging, adding middleware and more. | ||
Visit the relevant readme section for more info/how-to: | ||
- [Logging](https://github.com/timberio/timber-js/tree/master/packages/core#logging) | ||
- [Middleware](https://github.com/timberio/timber-js/tree/master/packages/core#middleware) | ||
### LICENSE | ||
[ISC](LICENSE.md) | ||
# 🌲 Timber - Browser logging | ||
![Beta: Ready for testing](https://img.shields.io/badge/early_release-beta-green.svg) | ||
![Speed: Blazing](https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg) | ||
[![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md) | ||
**New to Timber?** [Here's a low-down on logging in Javascript.](https://github.com/timberio/timber-js) | ||
## `@timberio/browser` | ||
This NPM library is for logging in the browser. | ||
Here's how to get started: | ||
### Using Webpack / Rollup | ||
If you're using a module bundler like Webpack or Rollup, you can install the package directly from NPM: | ||
``` | ||
npm i @timberio/browser | ||
``` | ||
In ES6/Typescript, import the `Timber` class: | ||
```typescript | ||
import { Timber } from "@timberio/browser"; | ||
``` | ||
For CommonJS, require the package: | ||
```js | ||
const { Timber } = require("@timberio/browser"); | ||
``` | ||
### Via a `<script>` tag | ||
If you're not using a Node.js module bundler, you can log in any client-side app by dropping in a `<script>` tag: | ||
``` | ||
<script src="https://unpkg.com/@timberio/browser@0.21.0/dist/umd/timber.js"></script> | ||
``` | ||
This will place the `Timber` class on `window.Timber`. | ||
## Creating a client | ||
You can instantiate the client in the same way, whether you use a module bundler or the `<script>` tag method. | ||
Simply pass your [Timber.io](https://timber.io) API key as a parameter to a new `Timber` instance: | ||
```typescript | ||
const timber = new Timber("api-goes-here"); | ||
``` | ||
## Documentation | ||
This browser library extends [`@timberio/core`](https://github.com/timberio/timber-js/tree/master/packages/core), which provides a simple API for logging, adding middleware and more. | ||
Visit the relevant readme section for more info/how-to: | ||
- [Logging](https://github.com/timberio/timber-js/tree/master/packages/core#logging) | ||
- [Middleware](https://github.com/timberio/timber-js/tree/master/packages/core#middleware) | ||
### LICENSE | ||
[ISC](LICENSE.md) |
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
52981
42
133
4
+ Added@timberio/core@0.22.0(transitive)
+ Added@timberio/tools@0.22.0(transitive)
+ Added@timberio/types@0.22.0(transitive)
- Removed@timberio/core@0.21.0(transitive)
- Removed@timberio/tools@0.21.0(transitive)
- Removed@timberio/types@0.21.0(transitive)
Updated@timberio/core@^0.22.0
Updated@timberio/tools@^0.22.0