Skip to content

Commit

Permalink
[build] 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
flatanimals committed Jan 18, 2017
0 parents commit 9c2d1ef
Show file tree
Hide file tree
Showing 13 changed files with 1,636 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// .babelrc
{
"presets": [
[
"es2015",
{
"modules": false
}
]
],
"plugins": [
"lodash"
]
}
28 changes: 28 additions & 0 deletions .eslintrc.js
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"
]
}
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.idea/
npm-debug.log
62 changes: 62 additions & 0 deletions README.md
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
});
```
28 changes: 28 additions & 0 deletions build/release.sh
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
Loading

0 comments on commit 9c2d1ef

Please sign in to comment.