Dev: Move eruda.js to root directory
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
/.idea/
|
||||
/node_modules/
|
||||
/dist/
|
||||
eruda*
|
||||
/script/icomoon/
|
||||
@@ -49,7 +49,7 @@ npm install eruda --save
|
||||
Add this script to your page.
|
||||
|
||||
```html
|
||||
<script src="node_modules/eruda/dist/eruda.min.js"></script>
|
||||
<script src="node_modules/eruda/eruda.min.js"></script>
|
||||
<script>eruda.init();</script>
|
||||
```
|
||||
|
||||
@@ -60,7 +60,7 @@ for example:
|
||||
|
||||
```javascript
|
||||
(function () {
|
||||
var src = 'node_modules/eruda/dist/eruda.min.js';
|
||||
var src = 'node_modules/eruda/eruda.min.js';
|
||||
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
|
||||
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
||||
document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
|
||||
|
||||
@@ -37,7 +37,7 @@ npm install eruda --save
|
||||
在页面中加载脚本:
|
||||
|
||||
```html
|
||||
<script src="node_modules/eruda/dist/eruda.min.js"></script>
|
||||
<script src="node_modules/eruda/eruda.min.js"></script>
|
||||
<script>eruda.init();</script>
|
||||
```
|
||||
|
||||
@@ -45,7 +45,7 @@ Js文件对于移动端来说略重(gzip后大概85kb)。建议通过url参
|
||||
|
||||
```javascript
|
||||
(function () {
|
||||
var src = 'node_modules/eruda/dist/eruda.min.js';
|
||||
var src = 'node_modules/eruda/eruda.min.js';
|
||||
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
|
||||
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
||||
document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eruda",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Console for Mobile Browsers",
|
||||
"main": "dist/eruda.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = {
|
||||
port: 3000
|
||||
},
|
||||
output: {
|
||||
path: __dirname + '/dist/',
|
||||
path: __dirname,
|
||||
publicPath: "/assets/",
|
||||
filename: 'eruda.js',
|
||||
library: ['eruda'],
|
||||
|
||||
Reference in New Issue
Block a user