Skip to content

Commit

Permalink
添加 .min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lmk123 committed Jun 30, 2016
1 parent 2ad954d commit 6959e93
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
/node_modules/
/coverage/
.DS_Store
/namedstorage.min.js
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,16 @@

下文统一使用 WebStorage 来表示 `localStorage``sessionStorage`

## 下载

使用 NPM 安装:

```
npm install namedstorage
```

或者直接下载: https://npmcdn.com/namedstorage/namedstorage.min.js

## 特点及使用示例

### JSON 友好
Expand Down
4 changes: 2 additions & 2 deletions karma.conf.js
Expand Up @@ -53,12 +53,12 @@ module.exports = function (config) {
basePath: '',
frameworks: ['jasmine'],
files: [
'storage.js',
'namedstorage.js',
'test/**/*-spec.js'
],
exclude: [],
preprocessors: {
'storage.js': ['coverage']
'namedstorage.js': ['coverage']
},
reporters: ['progress', 'coverage'],
coverageReporter: {
Expand Down
5 changes: 5 additions & 0 deletions storage.js → namedstorage.js
@@ -1,3 +1,8 @@
/*!
* NamedStorage v1.0.1
* https://github.com/lmk123/NamedStorage
* Released under the MIT License.
*/
/* global define:false */
(function (global, factory) {
var mod = factory(global)
Expand Down
10 changes: 7 additions & 3 deletions package.json
@@ -1,20 +1,24 @@
{
"name": "namedstorage",
"version": "1.0.0",
"version": "1.0.1",
"description": "更高效的使用 localStorage 与 sessionStorage。",
"main": "storage.js",
"main": "namedstorage.js",
"files": [
"storage.js"
"namedstorage.js",
"namedstorage.min.js"
],
"repository": {
"type": "git",
"url": "git+https://github.com/lmk123/NamedStorage.git"
},
"scripts": {
"min": "uglifyjs namedstorage.js -c -m --screw-ie8 --comments /!/ -o namedstorage.min.js",
"lint": "eslint --ignore-pattern '/coverage/' \"**/*.js\"",
"test": "karma start"
},
"devDependencies": {
"uglify-js":"^2.6.4",

"jasmine-core": "^2.4.1",
"karma-jasmine": "^1.0.2",
"phantomjs-prebuilt": "^2.1.6",
Expand Down

0 comments on commit 6959e93

Please sign in to comment.