@timberio/browser
Advanced tools
Comparing version 0.25.0 to 0.26.0
{ | ||
"name": "@timberio/browser", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"description": "Timber.io browser logging", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@timberio/types": "^0.25.0", | ||
"@timberio/types": "^0.26.0", | ||
"@types/nock": "^9.3.0", | ||
@@ -52,7 +52,7 @@ "@types/node": "^10.12.18", | ||
"dependencies": { | ||
"@timberio/core": "^0.25.0", | ||
"@timberio/tools": "^0.25.0", | ||
"@timberio/core": "^0.26.0", | ||
"@timberio/tools": "^0.26.0", | ||
"cross-fetch": "^3.0.0" | ||
}, | ||
"gitHead": "afa8877e5963382a6909588e856e49d23264f158" | ||
"gitHead": "4d524b02c233eb6c5a4c6d374cbb751ea384b180" | ||
} |
@@ -15,68 +15,4 @@ # 🌲 Timber - Browser logging | ||
### Using Webpack / Rollup | ||
## Installation | ||
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) | ||
# 🌲 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 | ||
@@ -131,4 +67,4 @@ | ||
### LICENSE | ||
## LICENSE | ||
[ISC](LICENSE.md) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
31170
69
+ Added@timberio/core@0.26.0(transitive)
+ Added@timberio/tools@0.26.0(transitive)
+ Added@timberio/types@0.26.0(transitive)
- Removed@timberio/core@0.25.0(transitive)
- Removed@timberio/tools@0.25.0(transitive)
- Removed@timberio/types@0.25.0(transitive)
Updated@timberio/core@^0.26.0
Updated@timberio/tools@^0.26.0