Skip to content

Commit

Permalink
refactor!: upgrade to Vue 3
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop support for Vue 2.
  • Loading branch information
fengyuanchen committed Jan 19, 2021
1 parent 90fa66b commit 669dae8
Show file tree
Hide file tree
Showing 44 changed files with 11,033 additions and 10,624 deletions.
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.local*
coverage
dist
node_modules
33 changes: 0 additions & 33 deletions .eslintrc

This file was deleted.

33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'airbnb-typescript/base',
'plugin:vue/vue3-recommended',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: 'tsconfig.eslint.json',
sourceType: 'module',
extraFileExtensions: ['.vue'],
},
plugins: [
'@typescript-eslint',
'vue',
],
rules: {
'no-restricted-properties': 'off',
},
overrides: [
{
files: ['tests/**/*.ts'],
env: {
jest: true,
},
},
],
};
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- run: npm install
- run: npm run lint
- run: npm run build
- run: npm test
- run: npm run test:coverage
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: deploy

on:
push:
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- run: npm install
- run: npm run build:docs
- run: |
cd docs/dist
git init
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add --all
git commit --message "♥"
git push --force https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master:gh-pages
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.local*
*.log
*.map
.DS_Store
coverage
dist
node_modules
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.local*
coverage
dist
node_modules
13 changes: 0 additions & 13 deletions .stylelintrc

This file was deleted.

7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

66 changes: 0 additions & 66 deletions README-pt.md

This file was deleted.

38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# vue-feather

[![Build Status](https://img.shields.io/travis/fengyuanchen/vue-feather.svg)](https://travis-ci.org/fengyuanchen/vue-feather) [![Downloads](https://img.shields.io/npm/dm/vue-feather.svg)](https://www.npmjs.com/package/vue-feather) [![Version](https://img.shields.io/npm/v/vue-feather.svg)](https://www.npmjs.com/package/vue-feather)
[![Build Status](https://img.shields.io/github/workflow/status/fengyuanchen/vue-feather/ci/main.svg)](https://github.com/fengyuanchen/vue-feather/actions) [![Coverage Status](https://img.shields.io/codecov/c/github/fengyuanchen/vue-feather.svg)](https://codecov.io/gh/fengyuanchen/vue-feather) [![Downloads](https://img.shields.io/npm/dm/vue-feather.svg)](https://www.npmjs.com/package/vue-feather) [![Version](https://img.shields.io/npm/v/vue-feather.svg)](https://www.npmjs.com/package/vue-feather)

> [Feather](https://feathericons.com/) component for [Vue.js](https://vuejs.org/).
> [Feather](https://feathericons.com/) component for Vue 3.
- [Docs](src/README.md)
- [Demo](https://fengyuanchen.github.io/vue-feather)
- [Leia esta página em português](https://github.com/fengyuanchen/vue-feather/blob/master/README-pt.md)

## Main
## Main files

```text
dist/
├── vue-feather.js (UMD)
├── vue-feather.min.js (UMD, compressed)
├── vue-feather.common.js (CommonJS, default)
└── vue-feather.esm.js (ES Module)
├── vue-feather.js (UMD, default)
├── vue-feather.min.js (UMD, compressed)
├── vue-feather.esm.js (ECMAScript Module)
└── vue-feather.esm.min.js (ECMAScript Module, compressed)
```

## Getting started
Expand All @@ -31,7 +30,7 @@ In browser:
```html
<script src="/path/to/vue.js"></script><!-- Vue.js is required -->
<script src="/path/to/feather.js"></script><!-- Feather is required -->
<script src="/path/to/vue-feather.js"></script><!-- Register automatically once loaded -->
<script src="/path/to/vue-feather.js"></script>
```

### Usage
Expand All @@ -40,25 +39,22 @@ In browser:
import Vue from 'vue';
import VueFeather from 'vue-feather';

Vue.use(VueFeather);
// Or
Vue.component(VueFeather.name, VueFeather);
// Or
Vue.component('vue-feather', VueFeather);
const app = Vue.createApp({});

app.component(VueFeather.name, VueFeather);
```

```html
<feather type="feather"></feather>
<vue-feather type="feather"></vue-feather>
```

## Browser support

- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Opera (latest)
- Edge (latest)
- Internet Explorer 9+
Same as Vue 3.

## Versioning

Maintained under the [Semantic Versioning guidelines](https://semver.org/).

## License

Expand Down
9 changes: 1 addition & 8 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
],
presets: ['@babel/preset-env'],
};
Loading

0 comments on commit 669dae8

Please sign in to comment.