Skip to content

Commit

Permalink
fix: build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Jan 29, 2019
1 parent 41d695a commit 5ce1433
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ insert_final_newline = true
[*.{json,yml,jade,pss,css,html,js}]
indent_size = 2

[changelog.md]
insert_final_newline = false

[*.html]
insert_final_newline = false

Expand Down
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-2-breadcrumbs",
"version": "0.4.0",
"version": "0.4.1",
"description": "Breadcrumbs for Vue.js 2.0",
"license": "MIT",
"repository": "Scrum/vue-2-breadcrumbs",
Expand All @@ -12,13 +12,12 @@
"url": "https://twitter.com/Scrum_"
},
"main": "lib/vue-2-breadcrumbs.js",
"browser": "lib/vue-2-breadcrumbs.js",
"engines": {
"node": ">=4"
},
"scripts": {
"precommit": "clinton && lint-staged",
"commitmsg": "commitlint --extends=@commitlint/config-angular -e",
"postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"build: update changelog\"",
"version": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"build: update changelog\"",
"prepare": "npm run build",
"build": "rimraf lib && babel src -d lib",
"test": "echo issue #3"
Expand Down Expand Up @@ -56,13 +55,19 @@
"lint-staged": "^8.1.1",
"rimraf": "^2.6.3"
},
"browser": "lib/vue-2-breadcrumbs.js",
"unpkg": "lib/vue-2-breadcrumbs.js",
"style": "lib/vue-2-breadcrumbs.css",
"lint-staged": {
"{src,test}/**/*.{js,html,htm}": "eslint",
"*.md": "eslint"
},
"unpkg": "lib/vue-2-breadcrumbs.js",
"style": "lib/vue-2-breadcrumbs.css",
"husky": {
"hooks": {
"pre-push": "npm t",
"pre-commit": "clinton && lint-staged",
"commit-msg": "commitlint --extends=@commitlint/config-angular -e"
}
},
"ava": {
"require": [
"@babel/register"
Expand Down
49 changes: 24 additions & 25 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# <a href="https://vuejs.org" target="_blank"><img valign="text-bottom" height="49" src="https://vuejs.org/images/logo.png"></a> breadcrumbs
> Vue breadcrumbs builds on the official [vue-router](https://github.com/vuejs/vue-router) package to provide simple breadcrumbs. [Demo](http://inside-demo.github.io/vue-demo/#/feeds)
> Vue breadcrumbs builds on the official [vue-router](https://github.com/vuejs/vue-router) package to provide simple breadcrumbs. [Demo](http://inside-demo.github.io/vue-demo/#/feeds)
[![Travis Build Status](https://img.shields.io/travis/GitScrum/vue-2-breadcrumbs/master.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/vue-2-breadcrumbs)[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg?style=flat-square)](https://vuejs.org/)[![node](https://img.shields.io/node/v/post-sequence.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/vue-2-breadcrumbs.svg?style=flat-square)](https://www.npmjs.com/package/vue-2-breadcrumbs)[![Dependency Status](https://david-dm.org/gitscrum/vue-2-breadcrumbs.svg?style=flat-square)](https://david-dm.org/gitscrum/vue-2-breadcrumbs)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/vue-2-breadcrumbs.svg?style=flat-square)](https://coveralls.io/r/GitScrum/vue-2-breadcrumbs)

Expand Down Expand Up @@ -94,22 +94,22 @@ new Vue({
router,
template: `
<div id="app" class="container">
<ul class="nav">
<li class="nav-item dropdown">
<router-link to="/feeds" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Feeds</router-link>
<div class="dropdown-menu">
<router-link to="/feeds/foo" class="dropdown-item">Foo</router-link>
<router-link to="/feeds/bar" class="dropdown-item">Bar</router-link>
<router-link to="/feeds/1" class="dropdown-item">Other Feed 1</router-link>
<router-link to="/feeds/2" class="dropdown-item">Other Feed 2</router-link>
<router-link to="/feeds/3" class="dropdown-item">Other Feed 3</router-link>
</div>
</li>
</ul>
<breadcrumbs/>
<router-view/>
<ul class="nav">
<li class="nav-item dropdown">
<router-link to="/feeds" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Feeds</router-link>
<div class="dropdown-menu">
<router-link to="/feeds/foo" class="dropdown-item">Foo</router-link>
<router-link to="/feeds/bar" class="dropdown-item">Bar</router-link>
<router-link to="/feeds/1" class="dropdown-item">Other Feed 1</router-link>
<router-link to="/feeds/2" class="dropdown-item">Other Feed 2</router-link>
<router-link to="/feeds/3" class="dropdown-item">Other Feed 3</router-link>
</div>
</li>
</ul>
<breadcrumbs/>
<router-view/>
</div>
`
`
}).$mount('#app');
```
## Options
Expand All @@ -120,14 +120,13 @@ import Vue from 'vue';
import VueBreadcrumbs from 'vue-2-breadcrumbs';

Vue.use(VueBreadcrumbs, {
template:
' <nav v-if="$breadcrumbs.length" aria-label="breadcrumb">\n' +
' <ol class="breadcrumb">\n' +
' <li v-for="(crumb, key) in $breadcrumbs" v-if="crumb.meta.breadcrumb" :key="key" class="breadcrumb-item active" aria-current="page">\n' +
' <router-link :to="{ path: crumb.path }">{{ getBreadcrumb(crumb.meta.breadcrumb) }}</router-link>' +
" </li>\n" +
" </ol>\n" +
" </nav>"
template:
' <nav v-if="$breadcrumbs.length" aria-label="breadcrumb">\n' +
' <ol class="breadcrumb">\n' +
' <li v-for="(crumb, key) in $breadcrumbs" v-if="crumb.meta.breadcrumb" :key="key" class="breadcrumb-item active" aria-current="page">\n' +
' <router-link :to="{ path: crumb.path }">{{ getBreadcrumb(crumb.meta.breadcrumb) }}</router-link>' +
' </li>\n' +
' </ol>\n' +
' </nav>'
});
```

0 comments on commit 5ce1433

Please sign in to comment.