Skip to content

Commit b2c50bc

Browse files
Ready to publish 🎉
1 parent 88fbcb9 commit b2c50bc

File tree

7 files changed

+655
-17
lines changed

7 files changed

+655
-17
lines changed

‎.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
.editorconfig
33
.eslintrc.json
44
.eslintrc.prod.json
5-
README.md

‎.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
node_js:
3+
- 9
4+
- 8
5+
- 7
6+
cache:
7+
yarn: true
8+
directories:
9+
- node_modules
10+
script:
11+
- yarn build
12+
- yarn lint
13+
notifications:
14+
slack:
15+
on_success: change
16+
rooms:
17+
- secure: VpK8glNVwiZaJK/Qx+DaA/Sy6O1CKpyF/Y6Q9y3nApmXZP4Ua4xPJS3yp6oSShVTKaTZzkgbNdD7P4GChyo8+uaiDo3kYr/tChNkkQmEX83HHult+HesD+ndId83ltXyHC/39l7ul25g/2o84yo1b6RKyjlnw0BVOs54+SecPQK6C45ODhp/p6gxQtx42INM/ZFxlMiC7h7lmMveqGMo8ByMy2LCvpt13SR5FSITPKW9HJFBfFTj9Bzl8skRNcS/LT3d2uYD2YXfJO8FtHzoP/6cEeUKnHFLdjgTnIjorXCStAA7/Z/iiImFbGYScvr1HIqOb8jr3p4rRrqz5KZ8N3rdQQSDHSprhy/4FqMcLBUTBraNSftwrNHrvQVumsLDRHJfjvH8y9ZJM4Fc8vTt+aLPOF5uBRz6RIXgdEcKH6ULNApL/0uGZnfAVA3w7uuo5/efk9cRI6Lw+8+7cyvYDAzB4X7J7t4CrKY58ieXROFimWIijmIFzsVri0AXDoNP2NWAlGejnrgQ+BRmc/GAT31q5GBHg7A3fmTn4H+UQB03pK8QLbQl+KWbWFFtlMKgBpmm7HutmzcPLq2VBOZYB3K5GKztZ3rH3X6+Vz9xn89Q/MhvYpDQ9M/OYpCdA0j6UNr0O5ZMcROFkDItwI58GwB7d5HD82SIsj29zo9s2lM=

‎LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2018 Firework Web & Mobile. https://fireworkweb.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import VueChill from 'vue-chill';
2727
Vue.use(VueChill);
2828
```
2929

30-
Then, on every component you need to freeze something, just add a `freeze` array with the attributes to freeze to the root object:
30+
Then, on every component you need to chill something, just add a `chill` array with the attributes to unwatch to the root object:
3131

3232
```js
3333
Vue.component('example-component', {
@@ -40,7 +40,7 @@ Vue.component('example-component', {
4040
},
4141
},
4242

43-
freeze: [ 'someUnwatchedAttribute' ],
43+
chill: [ 'someUnwatchedAttribute' ],
4444
});
4545
```
4646

‎package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,29 @@
22
"name": "vue-chill",
33
"version": "0.0.1",
44
"description": "Chill down Vue.js data watchers",
5+
"keywords": [
6+
"vue",
7+
"vuejs",
8+
"freeze",
9+
"unwatch",
10+
"observer",
11+
"observable"
12+
],
513
"main": "dist/index.js",
614
"repository": "https://github.com/fireworkweb/vue-chill.git",
715
"author": "Firework Web & Mobile",
816
"license": "MIT",
917
"scripts": {
1018
"build": "babel src --out-dir dist",
11-
"prod": "NODE_ENV=production babel src --out-dir dist"
19+
"prod": "NODE_ENV=production babel src --out-dir dist",
20+
"prepare": "yarn prod",
21+
"lint": "eslint -c .eslintrc.prod.json --ext js src",
22+
"lint:fix": "yarn lint --fix"
1223
},
1324
"devDependencies": {
1425
"babel-cli": "^6.26.0",
1526
"babel-preset-env": "^1.6.1",
16-
"babel-preset-minify": "^0.3.0"
27+
"babel-preset-minify": "^0.3.0",
28+
"eslint": "^4.19.1"
1729
}
1830
}

‎src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export default {
22
install (Vue) {
33
Vue.mixin({
44
created () {
5-
let freezeArr = this.$options.freeze || [];
5+
let chillArr = this.$options.chill || [];
66

7-
freezeArr.forEach(freezeAttr => Object.freeze(this[freezeAttr]));
7+
chillArr.forEach(chillAttr => Object.freeze(this[chillAttr]));
88
},
99
});
1010
},

0 commit comments

Comments
 (0)