Skip to content

Commit

Permalink
fix: build package
Browse files Browse the repository at this point in the history
  • Loading branch information
caioagiani committed Feb 22, 2021
1 parent 8f116d1 commit 27248e6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
indent: ['error', 2],
'no-undef': 0,
'no-console': 0,
'import/prefer-default-export': 0,
'linebreak-style': ['error', 'unix'],
'no-unused-vars': ['error', { argsIgnorePattern: 'next' }],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Pacote: `npm i mobizon-node` ou `yarn add mobizon-node`
## Configuração:

```js
const mobizon = require('mobizon-node');
const { mobizon } = require('mobizon-node');

mobizon.setConfig({
apiServer: 'https://api.mobizon.com.br',
apiKey: process.env.API_KEY,
apiKey: 'br01xxxxxx',
format: 'json',
});
```
Expand Down Expand Up @@ -64,7 +64,7 @@ Confira em [docs](https://github.com/caioagiani/mobizon-node/blob/master/docs) t

/** Enviar SMS */
const sendSms = await mobizon.sendSms({
recipient: process.env.NUMBER,
recipient: '5511900000000',
from: '',
text: 'SMS sent by Mobizon.',
});
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var _balance = require('./structures/balance'); var _balance2 = _interopRequireD
var _shortlink = require('./structures/shortlink'); var _shortlink2 = _interopRequireDefault(_shortlink);
var _sms = require('./structures/sms'); var _sms2 = _interopRequireDefault(_sms);

exports. default = {
const mobizon = {
environment: _environment2.default,
setConfig({ apiServer, apiKey, format }) {
_environment2.default.apiKey = apiKey;
Expand All @@ -20,4 +20,4 @@ exports. default = {
deleteShort: (data) => _shortlink2.default.delete(data),
updateShort: (data) => _shortlink2.default.update(data),
getStatsShort: (data) => _shortlink2.default.getstats(data),
};
}; exports.mobizon = mobizon;
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dotenv/config';

import mobizon from 'mobizon-node';
import { mobizon } from 'mobizon-node';

mobizon.setConfig({
/** Endpoint do serviço. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobizon-node",
"version": "0.3.0",
"version": "0.3.1",
"description": "Biblioteca NodeJS para trabalhar com os serviços Mobizon API",
"readmeFilename": "README.md",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import balance from './structures/balance';
import short from './structures/shortlink';
import sms from './structures/sms';

export default {
export const mobizon = {
environment,
setConfig({ apiServer, apiKey, format }) {
environment.apiKey = apiKey;
Expand Down

0 comments on commit 27248e6

Please sign in to comment.