Skip to content

Commit

Permalink
remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberJe committed Mar 14, 2018
1 parent fc085d2 commit 85acdde
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# mossad
A mobile rolling performance observation tool
A mobile rolling performance observation webpack plugin.

## Usage

### install

`npm install --save-dev mossad`

### setting

```
const MossadWebpackPlugin = require('mossad')
/* .... */
plugins: [
new HtmlWebpackPlugin(),
new MossadWebpackPlugin()
]
```

## About

* 50~60 FPS, Comfortable
* 30~50 FPS, Instable
* Less than 30 FPS, Uncomfortable
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "mossad",
"version": "0.1.0",
"version": "0.1.3",
"description": "A mobile rolling performance observation tool",
"main": "index.js",
"main": "src/index.js",
"scripts": {
"test": "node ./example/server.js",
"start": "webpack-dev-server --inline --progress --content-base example/ --config example/webpack.conf.js"
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ class MossadWebpackPlugin {

apply (compiler) {
compiler.plugin('compilation', (compilation) => {
console.log('The compiler is starting a new compilation...');
const injectPos = '</body>'

compilation.plugin(
'html-webpack-plugin-before-html-processing',
data => {
Expand Down
1 change: 0 additions & 1 deletion src/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ var loop = function () {

if (now > 1000 + lastTime) {
var fps = Math.round((frame * 1000) / (now - lastTime))
console.log(`${new Date()} 1S内 FPS:`, fps)
fpsState.fps = fps
frame = 0
lastTime = now
Expand Down

0 comments on commit 85acdde

Please sign in to comment.