Skip to content

Commit 6a34d0f

Browse files
ricardogobbosouzapi0
authored andcommitted
refactor(package): update module (#206)
1 parent 2347b08 commit 6a34d0f

19 files changed

+1827
-1664
lines changed

.circleci/config.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ jobs:
2323
paths:
2424
- "node_modules"
2525

26-
# Build
27-
# - run:
28-
# name: Build
29-
# command: |
30-
# mkdir -p dist
31-
# yarn build
32-
3326
# Test
3427
- run:
3528
name: Tests
36-
command: yarn test && yarn codecov
29+
command: yarn test
30+
31+
# Coverage
32+
- run:
33+
name: Coverage
34+
command: yarn codecov

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Common
2+
node_modules
3+
dist
4+
.nuxt
5+
coverage
6+
7+
# Plugin
8+
lib/plugin.js

.eslintrc.js

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
module.exports = {
22
root: true,
3-
// parser: 'babel-eslint',
43
parserOptions: {
4+
parser: 'babel-eslint',
55
sourceType: 'module'
66
},
7-
env: {
8-
browser: true,
9-
node: true,
10-
jest: true
11-
},
12-
extends: 'standard',
13-
plugins: [
14-
'jest',
15-
'vue'
16-
],
17-
rules: {
18-
// Allow paren-less arrow functions
19-
'arrow-parens': 0,
20-
// Allow async-await
21-
'generator-star-spacing': 0,
22-
// Allow debugger during development
23-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
24-
// Do not allow console.logs etc...
25-
'no-console': 2
26-
},
27-
globals: {
28-
'jest/globals': true,
29-
jasmine: true
30-
}
7+
extends: [
8+
'@nuxtjs'
9+
]
3110
}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ node_modules
44
*.log*
55
.nuxt
66
.vscode
7-
.DS_STORE
7+
.DS_Store
88
coverage
9-
_book
9+
dist

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Nuxt Community
3+
Copyright (c) Nuxt Community
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
# 📦 Axios Module
22

3-
> Secure and Easy <a href="https://github.com/mzabriskie/axios">Axios</a> integration with Nuxt.js.
3+
[![npm version][npm-version-src]][npm-version-href]
4+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5+
[![Circle CI][circle-ci-src]][circle-ci-href]
6+
[![Codecov][codecov-src]][codecov-href]
7+
[![Dependencies][david-dm-src]][david-dm-href]
8+
[![Standard JS][standard-js-src]][standard-js-href]
49

5-
<p align="center">
6-
<a href="https://david-dm.org/nuxt-community/axios-module">
7-
<img alt="" src="https://david-dm.org/nuxt-community/axios-module/status.svg?style=flat-square">
8-
</a>
9-
<a href="https://standardjs.com">
10-
<img alt="" src="https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square">
11-
</a>
12-
<a href="https://circleci.com/gh/nuxt-community/axios-module">
13-
<img alt="" src="https://img.shields.io/circleci/project/github/nuxt-community/axios-module.svg?style=flat-square">
14-
</a>
15-
<a href="https://codecov.io/gh/nuxt-community/axios-module">
16-
<img alt="" src="https://img.shields.io/codecov/c/github/nuxt-community/axios-module.svg?style=flat-square">
17-
</a>
18-
<br>
19-
<a href="https://npmjs.com/package/@nuxtjs/axios">
20-
<img alt="" src="https://img.shields.io/npm/v/@nuxtjs/axios/latest.svg?style=flat-square">
21-
</a>
22-
<a href="https://npmjs.com/package/@nuxtjs/axios">
23-
<img alt="" src="https://img.shields.io/npm/dt/@nuxtjs/axios.svg?style=flat-square">
24-
</a>
25-
</p>
10+
> Secure and Easy <a href="https://github.com/mzabriskie/axios">Axios</a> integration with Nuxt.js.
2611
2712
## ✅ Features
2813

@@ -46,4 +31,20 @@
4631

4732
## 📑 License
4833

49-
[MIT License](./LICENSE) - Nuxt Community
34+
[MIT License](./LICENSE)
35+
36+
Copyright (c) Nuxt Community
37+
38+
<!-- Badges -->
39+
[npm-version-src]: https://img.shields.io/npm/dt/@nuxtjs/axios.svg?style=flat-square
40+
[npm-version-href]: https://npmjs.com/package/@nuxtjs/axios
41+
[npm-downloads-src]: https://img.shields.io/npm/v/@nuxtjs/axios/latest.svg?style=flat-square
42+
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/axios
43+
[circle-ci-src]: https://img.shields.io/circleci/project/github/nuxt-community/axios-module.svg?style=flat-square
44+
[circle-ci-href]: https://circleci.com/gh/nuxt-community/axios-module
45+
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/axios-module.svg?style=flat-square
46+
[codecov-href]: https://codecov.io/gh/nuxt-community/axios-module
47+
[david-dm-src]: https://david-dm.org/nuxt-community/axios-module/status.svg?style=flat-square
48+
[david-dm-href]: https://david-dm.org/nuxt-community/axios-module
49+
[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square
50+
[standard-js-href]: https://standardjs.com

babel.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env', {
5+
targets: {
6+
esmodules: true
7+
}
8+
}
9+
]
10+
]
11+
}

commitlint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
extends: [
3+
'@commitlint/config-conventional'
4+
]
5+
}

husky.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
hooks: {
3+
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
4+
'pre-commit': 'yarn lint',
5+
'pre-push': 'yarn lint'
6+
}
7+
}

jest.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
testEnvironment: 'node',
3+
collectCoverage: true,
4+
collectCoverageFrom: [
5+
'lib/**/*.js',
6+
'!lib/plugin.js'
7+
],
8+
moduleNameMapper: {
9+
'^~/(.*)$': '<rootDir>/lib/$1',
10+
'^~~$': '<rootDir>',
11+
'^@@$': '<rootDir>',
12+
'^@/(.*)$': '<rootDir>/lib/$1'
13+
},
14+
transform: {
15+
'^.+\\.js$': 'babel-jest'
16+
}
17+
}

0 commit comments

Comments
 (0)