-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9c2d1ef
Showing
13 changed files
with
1,636 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// .babelrc | ||
{ | ||
"presets": [ | ||
[ | ||
"es2015", | ||
{ | ||
"modules": false | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
"lodash" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
.idea/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#vue-media-queries | ||
|
||
###Warning: Currently in development. | ||
|
||
Vue.js v 2.1+ plugin for using mediaMatch based queries. | ||
|
||
Thanks to [AStaroverov]( https://github.com/AStaroverov ) for creating [v-media-query](https://github.com/AStaroverov/v-media-query) which was the inspiration for this package. | ||
|
||
|
||
##Basic Usage | ||
|
||
##### Setup | ||
|
||
```javascript | ||
import Vue from 'vue'; | ||
import {MediaQueries} from 'vue-media-queries'; | ||
import App from './App'; | ||
|
||
const mediaQueries = new MediaQueries(); | ||
|
||
Vue.use(mediaQueries); | ||
|
||
new Vue({ | ||
el: '#app', | ||
template: '<App/>', | ||
components: { App }, | ||
mediaQueries: mediaQueries | ||
}); | ||
``` | ||
|
||
#####Vue Component | ||
|
||
```vue | ||
<template> | ||
<div> | ||
<div> | ||
<strong>Screen Size:</strong> | ||
</div> | ||
<div v-if="$resize && $mq.above(992)">Desktop</div> | ||
<div v-else>Tablet and Below</div> | ||
</div> | ||
</template> | ||
``` | ||
|
||
##Using common CSS Framework responsive bands | ||
|
||
```javascript | ||
import Vue from 'vue'; | ||
import {MediaQueries} from 'vue-media-queries'; | ||
import App from './App'; | ||
|
||
const mediaQueries = new MediaQueries(); | ||
|
||
Vue.use(mediaQueries); | ||
|
||
new Vue({ | ||
el: '#app', | ||
template: '<App/>', | ||
components: { App }, | ||
mediaQueries: mediaQueries | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
## Graciously copied from vue-router | ||
## https://github.com/vuejs/vue-router/blob/dev/build/release.sh | ||
|
||
set -e | ||
echo "Enter release version: " | ||
read VERSION | ||
|
||
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r | ||
echo # (optional) move to a new line | ||
if [[ $REPLY =~ ^[Yy]$ ]] | ||
then | ||
echo "Releasing $VERSION ..." | ||
## skip testing, not implemented yet | ||
# npm test | ||
npm run build | ||
|
||
# commit | ||
git add -A | ||
git commit -m "[build] $VERSION" | ||
npm version $VERSION --message "[release] $VERSION" | ||
|
||
# publish | ||
git push origin refs/tags/v$VERSION | ||
git push | ||
npm publish | ||
fi |
Oops, something went wrong.