-
Notifications
You must be signed in to change notification settings - Fork 32
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 d041ee9
Showing
15 changed files
with
8,221 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,34 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: /usr/src/app | ||
docker: | ||
- image: banian/node | ||
steps: | ||
# Checkout repository | ||
- checkout | ||
|
||
# Restore cache | ||
- restore_cache: | ||
key: yarn-{{ checksum "yarn.lock" }} | ||
|
||
# Install dependencies | ||
- run: | ||
name: Install Dependencies | ||
command: NODE_ENV=dev yarn | ||
|
||
# Keep cache | ||
- save_cache: | ||
key: yarn-{{ checksum "yarn.lock" }} | ||
paths: | ||
- "node_modules" | ||
|
||
# Test | ||
- run: | ||
name: Tests | ||
command: yarn test | ||
|
||
# Coverage | ||
- run: | ||
name: Coverage | ||
command: yarn codecov |
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,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,15 @@ | ||
module.exports = { | ||
env: { | ||
jest: true | ||
}, | ||
extends: [ | ||
'buefy' | ||
], | ||
plugins: [ | ||
'jest' | ||
], | ||
globals: { | ||
'jest/globals': true, | ||
jasmine: true | ||
} | ||
} |
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,9 @@ | ||
node_modules | ||
*.iml | ||
.idea | ||
*.log* | ||
.nuxt | ||
.vscode | ||
.DS_STORE | ||
coverage | ||
dist |
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,17 @@ | ||
{ | ||
"non-interactive": true, | ||
"increment": "minor", | ||
"github": { | ||
"release": true, | ||
"releaseName": "🚀 Release %s", | ||
"tokenRef": "GITHUB_TOKEN" | ||
}, | ||
"npm": { | ||
"publish": true | ||
}, | ||
"src": { | ||
"commitMessage": "🔖 %s", | ||
"tagName": "v%s" | ||
}, | ||
"changelogCommand": "git log --pretty=format:'* %s (%h)' [REV_RANGE]" | ||
} |
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 @@ | ||
# CHANGELOG |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Antério Vieira <anteriovieira@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
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. |
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,56 @@ | ||
# nuxt-buefy | ||
[![npm (scoped with tag)](https://img.shields.io/npm/v/nuxt-buefy/latest.svg?style=flat-square)](https://npmjs.com/package/nuxt-buefy) | ||
[![npm](https://img.shields.io/npm/dt/nuxt-buefy.svg?style=flat-square)](https://npmjs.com/package/nuxt-buefy) | ||
[![CircleCI](https://img.shields.io/circleci/project/github/buefy/nuxt-buefy.svg?style=flat-square)](https://circleci.com/gh/buefy/nuxt-buefy) | ||
[![Codecov](https://img.shields.io/codecov/c/github/buefy/nuxt-buefy.svg?style=flat-square)](https://codecov.io/gh/buefy/nuxt-buefy) | ||
[![Dependencies](https://david-dm.org/buefy/nuxt-buefy/status.svg?style=flat-square)](https://david-dm.org/buefy/nuxt-buefy) | ||
[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com) | ||
|
||
> Nuxt buefy | ||
[📖 **Release Notes**](./CHANGELOG.md) | ||
|
||
## Install | ||
|
||
```bash | ||
npm i nux-buefy | ||
# or | ||
yarn add nuxt-buefy | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
{ | ||
modules: [ | ||
// Simple usage | ||
'nuxt-buefy', | ||
|
||
['nuxt-buefy', { /* buefy options */ }] | ||
] | ||
} | ||
``` | ||
|
||
or | ||
|
||
```js | ||
{ | ||
modules: [ | ||
// Simple usage | ||
'nuxt-buefy', | ||
], | ||
buefy: { /* buefy options */ } | ||
} | ||
``` | ||
|
||
## Development | ||
|
||
- Clone this repository | ||
- Install dependnecies using `yarn install` or `npm install` | ||
- Start development server using `yarn run dev` | ||
|
||
## License | ||
|
||
[MIT License](./LICENSE) | ||
|
||
Copyright (c) Rafael Beraldo |
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,31 @@ | ||
const { resolve } = require('path') | ||
|
||
const defaults = { | ||
css: true, | ||
materialDesignIcons: true | ||
} | ||
|
||
module.exports = async function module(moduleOptions) { | ||
const options = Object.assign({}, defaults, this.options.buefy, moduleOptions) | ||
|
||
// Add Material Design Icons font | ||
if (options.materialDesignIcons !== false) { | ||
this.options.head.link.push({ | ||
rel: 'stylesheet', | ||
type: 'text/css', | ||
href: '//cdn.materialdesignicons.com/2.0.46/css/materialdesignicons.min.css' | ||
}) | ||
} | ||
|
||
// Add css | ||
if (options.css !== false) { | ||
this.options.css.unshift('buefy/lib/buefy.css') | ||
} | ||
|
||
// Register plugin | ||
this.addPlugin({ | ||
src: resolve(__dirname, 'templates/plugin.js'), | ||
fileName: 'buefy.js', | ||
options | ||
}) | ||
} |
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,4 @@ | ||
import Vue from 'vue' | ||
import Buefy from 'buefy' | ||
|
||
Vue.use(Buefy, <%= JSON.stringify(options, null, 2) %>) |
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,45 @@ | ||
{ | ||
"name": "nuxt-buefy", | ||
"version": "0.0.1", | ||
"description": "Nuxt buefy", | ||
"license": "MIT", | ||
"contributors": [ | ||
{ | ||
"name": "Antério Vieira <anteriovieira@gmail.com>" | ||
} | ||
], | ||
"main": "lib/module.js", | ||
"repository": "https://github.com/buefy/nuxt-buefy", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"dev": "nuxt test/fixture", | ||
"lint": "eslint lib test", | ||
"test": "npm run lint && jest", | ||
"release": "standard-version && git push --follow-tags && npm publish" | ||
}, | ||
"eslintIgnore": [ | ||
"lib/templates/*.*" | ||
], | ||
"files": [ | ||
"lib" | ||
], | ||
"jest": { | ||
"testEnvironment": "node", | ||
"collectCoverage": true | ||
}, | ||
"dependencies": { | ||
"buefy": "^0.6.3" | ||
}, | ||
"devDependencies": { | ||
"codecov": "latest", | ||
"eslint": "latest", | ||
"eslint-config-buefy": "^0.0.1", | ||
"eslint-plugin-jest": "latest", | ||
"jest": "latest", | ||
"jsdom": "latest", | ||
"nuxt": "latest", | ||
"standard-version": "latest" | ||
} | ||
} |
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,11 @@ | ||
const { resolve } = require('path') | ||
|
||
module.exports = { | ||
rootDir: resolve(__dirname, '../..'), | ||
srcDir: __dirname, | ||
dev: false, | ||
render: { | ||
resourceHints: false | ||
}, | ||
modules: ['@@'] | ||
} |
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,11 @@ | ||
<template> | ||
<section> | ||
<b-tag type="is-success">Works!</b-tag> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
} | ||
</script> |
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,26 @@ | ||
const { Nuxt, Builder } = require('nuxt') | ||
const request = require('request-promise-native') | ||
|
||
const config = require('./fixture/nuxt.config') | ||
|
||
const url = (path) => `http://localhost:3000${path}` | ||
const get = (path) => request(url(path)) | ||
|
||
describe('basic', () => { | ||
let nuxt | ||
|
||
beforeAll(async () => { | ||
nuxt = new Nuxt(config) | ||
await new Builder(nuxt).build() | ||
await nuxt.listen(3000) | ||
}, 60000) | ||
|
||
afterAll(async () => { | ||
await nuxt.close() | ||
}) | ||
|
||
test('render', async () => { | ||
let html = await get('/') | ||
expect(html).toContain('Works!') | ||
}) | ||
}) |
Oops, something went wrong.