Comparing version 2.5.7 to 3.0.0
@@ -5,36 +5,69 @@ { | ||
"keywords": [ | ||
"chinese", | ||
"file", | ||
"japanese", | ||
"korean", | ||
"obsessive-compulsive disorder", | ||
"ocd", | ||
"pangu", | ||
"paranoia", | ||
"paranoid", | ||
"readability", | ||
"spacing", | ||
"text", | ||
"file" | ||
"text" | ||
], | ||
"version": "2.5.7", | ||
"author": "Vinta Chen <vinta.chen@gmail.com> (http://vinta.ws/)", | ||
"version": "3.0.0", | ||
"author": { | ||
"name": "Vinta Chen", | ||
"email": "vinta.chen@gmail.com", | ||
"url": "https://vinta.ws/" | ||
}, | ||
"license": "MIT", | ||
"homepage": "http://pangu.space/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/vinta/paranoid-auto-spacing.git" | ||
"url": "git://github.com/vinta/pangu.js.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/vinta/paranoid-auto-spacing/issues" | ||
"url": "https://github.com/vinta/pangu.js/issues" | ||
}, | ||
"main": "./dist/node/index.js", | ||
"browser": "./dist/browser/pangu.js", | ||
"scripts": { | ||
"test": "grunt test" | ||
"clear:browser": "rm -rf ./dist/browser/", | ||
"clear:node": "rm -rf ./dist/node/ ./dist/shared/", | ||
"clear": "npm run clear:browser && npm run clear:node", | ||
"build:browser": "npm run clear:browser && ./node_modules/.bin/webpack", | ||
"build:node": "npm run clear:node && ./node_modules/.bin/babel src -d dist --ignore src/browser/*", | ||
"build": "npm run build:browser && npm run build:node", | ||
"test:browser": "npm run build:browser && ./node_modules/.bin/karma start", | ||
"test:node": "npm run build:node && ./node_modules/.bin/mocha --require babel-core/register test/shared/ test/node/", | ||
"test": "npm run test:browser && npm run test:node", | ||
"watch:browser": "npm run test:browser -- --watch", | ||
"watch:node": "npm run test:node -- --watch" | ||
}, | ||
"devDependencies": { | ||
"grunt": "0.4.5", | ||
"grunt-contrib-clean": "0.6.0", | ||
"grunt-contrib-copy": "0.8.0", | ||
"grunt-contrib-sass": "0.9.2", | ||
"grunt-contrib-uglify": "0.9.1", | ||
"grunt-contrib-watch": "0.6.1", | ||
"grunt-karma": "0.10.1", | ||
"grunt-strip": "0.2.1", | ||
"grunt-stripcomments": "0.3.1", | ||
"karma": "0.12.32", | ||
"karma-coverage": "0.3.1", | ||
"karma-jasmine": "0.1.5", | ||
"karma-phantomjs-launcher": "0.1.4", | ||
"karma-script-launcher": "0.1.0" | ||
"babel-cli": "6.3.17", | ||
"babel-core": "6.3.26", | ||
"babel-loader": "6.2.0", | ||
"babel-plugin-add-module-exports": "0.1.2", | ||
"babel-polyfill": "6.3.14", | ||
"babel-preset-es2015": "6.3.13", | ||
"chai": "3.4.1", | ||
"eslint": "1.10.3", | ||
"eslint-config-airbnb": "2.1.1", | ||
"istanbul": "0.4.1", | ||
"karma": "0.13.19", | ||
"karma-babel-preprocessor": "6.0.1", | ||
"karma-coverage": "0.5.3", | ||
"karma-html2js-preprocessor": "0.1.0", | ||
"karma-mocha": "0.2.1", | ||
"karma-mocha-reporter": "1.1.5", | ||
"karma-phantomjs-launcher": "0.2.2", | ||
"karma-sourcemap-loader": "0.3.6", | ||
"karma-webpack": "1.7.0", | ||
"mocha": "2.3.4", | ||
"phantomjs": "1.9.19", | ||
"webpack": "1.12.9" | ||
} | ||
} |
# 為什麼你們就是不能加個空格呢? | ||
[![](http://img.shields.io/travis/vinta/paranoid-auto-spacing.svg?style=flat-square)](https://travis-ci.org/vinta/paranoid-auto-spacing) | ||
[![](https://img.shields.io/codecov/c/github/vinta/paranoid-auto-spacing/master.svg?style=flat-square)](https://codecov.io/github/vinta/paranoid-auto-spacing) | ||
[![](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](http://vinta.ws) | ||
[![](http://img.shields.io/travis/vinta/pangu.js.svg?style=flat-square)](https://travis-ci.org/vinta/pangu.js) | ||
[![](https://img.shields.io/codecov/c/github/vinta/pangu.js/master.svg?style=flat-square)](https://codecov.io/github/vinta/pangu.js) | ||
[![](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://vinta.ws) | ||
@@ -18,48 +18,52 @@ 如果你跟我一樣,每次看到網頁上的中文字和英文、數字、符號擠在一塊,就會坐立難安,忍不住想在它們之間加個空格。這個外掛(支援 Chrome 和 Firefox)正是你在網路世界走跳所需要的東西,它會自動替你在網頁中所有的中文字和半形的英文、數字、符號之間插入空白。 | ||
* [Google Chrome](https://chrome.google.com/webstore/detail/paphcfdffjnbcgkokihcdjliihicmbpd) (2015-05-13 updated) | ||
* [Mozilla Firefox](https://github.com/vinta/paranoid-auto-spacing/raw/master/browser_extensions/firefox/paranoid-auto-spacing.user.js) (2015-05-13 updated) | ||
* [Mozilla Firefox](https://github.com/vinta/pangu.js/raw/master/browser_extensions/firefox/paranoid-auto-spacing.user.js) (2015-05-13 updated) | ||
### for Developers | ||
* Go version: [pangu.go](https://github.com/vinta/pangu) | ||
* Java version: [pangu.java](https://github.com/vinta/pangu.java) | ||
* JavaScript version: [pangu.js](https://github.com/vinta/paranoid-auto-spacing) | ||
* Node.js version: [pangu.node](https://github.com/huei90/pangu.node) | ||
* Objective-C version: [pangu.objective-c](https://github.com/Cee/pangu.objective-c) | ||
* PHP version: [pangu.php](https://github.com/Kunr/pangu.php) | ||
* Python version: [pangu.py](https://github.com/vinta/pangu.py) | ||
* Ruby version: [pangu.rb](https://github.com/dlackty/pangu.rb) | ||
* [pangu.go](https://github.com/vinta/pangu) (Go) | ||
* [pangu.java](https://github.com/vinta/pangu.java) (Java) | ||
* [pangu.js](https://github.com/vinta/pangu.js) (JavaScript, both Node.js and Browser) | ||
* [pangu.objective-c](https://github.com/Cee/pangu.objective-c) (Objective-C) | ||
* [pangu.php](https://github.com/Kunr/pangu.php) (PHP) | ||
* [pangu.py](https://github.com/vinta/pangu.py) (Python) | ||
* [pangu.rb](https://github.com/dlackty/pangu.rb) (Ruby) | ||
![Pangu](https://raw.github.com/vinta/paranoid-auto-spacing/master/browser_extensions/chrome/images/pangu_260.jpg) | ||
## Usage | ||
``` bash | ||
$ bower install pangu | ||
$ npm install pangu | ||
``` | ||
### Browser | ||
``` html | ||
<head> | ||
<meta charset="UTF-8"> | ||
<script src="bower_components/pangu/dist/pangu.min.js"></script> | ||
// Files are located on ./node_modules/pangu/dist/browser/ | ||
<script src="pangu.min.js"></script> | ||
</head> | ||
<script> | ||
pangu.page_spacing(); | ||
// or | ||
pangu.element_spacing('#main'); | ||
// or | ||
pangu.element_spacing('.comment'); | ||
// or | ||
pangu.element_spacing('p'); | ||
pangu.spacingPage(); | ||
pangu.spacingElementById('main'); | ||
pangu.spacingElementByClassName('comment'); | ||
pangu.spacingElementByTagName('p'); | ||
</script> | ||
``` | ||
## Run Tests | ||
### Node.js | ||
You need to install [Node.js](http://vinta.ws/code/install-node-js-via-nvm.html). | ||
``` js | ||
var pangu = require('pangu'); // ES5 | ||
import pangu from 'pangu'; // ES6 | ||
pangu.spacingText('新八的構造成分有95%是眼鏡、3%是水、2%是垃圾'); | ||
// outpu: 新八的構造成分有 95% 是眼鏡、3% 是水、2% 是垃圾 | ||
``` | ||
## Testing | ||
You need to install [Node.js](https://vinta.ws/code/install-node-js-via-nvm.html). | ||
``` bash | ||
$ gem install sass | ||
$ npm install -g grunt-cli | ||
$ npm install | ||
$ grunt test | ||
$ npm run test | ||
``` | ||
@@ -74,14 +78,12 @@ | ||
* Twitter: [@vinta](https://twitter.com/vinta) | ||
* Website: [vinta.ws](http://vinta.ws/) | ||
* Website: [vinta.ws](https://vinta.ws/) | ||
## Contributors | ||
[偉哉 Open Source!](https://github.com/vinta/paranoid-auto-spacing/graphs/contributors) | ||
## Related Projects | ||
* Atom: [atom-pangu](https://github.com/7kfpun/atom-pangu) | ||
* Command-line interface: [pangu-cli](https://github.com/SDLyu/pangu) | ||
* Emacs: [pangu-spacing](http://coldnew.github.io/blog/2013/05/20_5cbb7.html) | ||
* Gulp: [gulp-pangu](https://github.com/7kfpun/gulp-pangu) | ||
* JavaScript: [为什么我就是能这样娴熟地加上空格呢?](https://github.com/Dustland/daft-auto-spacing) | ||
* Node.js: [pangu.node](https://github.com/huei90/pangu.node) | ||
* Ruby: [auto-correct](https://github.com/huacnlee/auto-correct) | ||
@@ -88,0 +90,0 @@ * Vim: [pangu.vim](https://github.com/hotoo/pangu.vim) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
91
1
213046
22
30
1302
2