Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "mouselog", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "The mouse tracking agent for Mouselog.", | ||
@@ -8,3 +8,4 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "cd webpack-build && webpack && webpack --config comp.js && cd .." | ||
}, | ||
@@ -21,3 +22,7 @@ "keywords": [], | ||
"uuid": "^3.3.3" | ||
}, | ||
"devDependencies": { | ||
"webpack": "^4.41.5", | ||
"webpack-cli": "^3.3.10" | ||
} | ||
} |
@@ -10,6 +10,6 @@ [![NPM version](https://img.shields.io/npm/v/mouselog)](https://www.npmjs.com/package/mouselog) | ||
## Embedded JS | ||
## CDN | ||
Embed Mouselog in your HTML files: | ||
```html | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mouselog@latest/mouselog.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mouselog@latest/build/mouselog.js"></script> | ||
<script> | ||
@@ -23,7 +23,7 @@ mouselog.run({ | ||
``` | ||
You can also refer mouselog dynamically in Javascript: | ||
You can also include mouselog dynamically in Javascript: | ||
```Javascript | ||
(function() { | ||
var script = document.createElement("script"); | ||
script.src = "https://cdn.jsdelivr.net/npm/mouselog@latest/mouselog.js"; | ||
script.src = "https://cdn.jsdelivr.net/npm/mouselog@latest/build/mouselog.js"; | ||
script.onload = () => { | ||
@@ -41,2 +41,9 @@ mouselog.run({ | ||
``` | ||
## Build Manually | ||
You can also bundle Mouselog.js manually via | ||
``` | ||
npm i | ||
npm run build | ||
``` | ||
This will generate the bundled scripts in `./build`. | ||
@@ -104,10 +111,5 @@ ## NPM | ||
# Demo | ||
[Mouselog-demo](https://github.com/hsluoyz/mouselog-demo) | ||
<!-- # Demo | ||
[Mouselog-demo](https://github.com/hsluoyz/mouselog-demo) --> | ||
# Schema | ||
![image](schema.jpg) | ||
# Contributing | ||
@@ -114,0 +116,0 @@ |
@@ -48,3 +48,3 @@ let {config, updateConfig} = require('./config'); | ||
}).catch(err => { | ||
_appendFailedData(data); | ||
this._appendFailedData(data); | ||
resolve({status: -1, msg: `Fail to upload a bunch of data: ${err.message}`}); | ||
@@ -51,0 +51,0 @@ }) |
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
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
124
44529
2
10