diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..87c041d Binary files /dev/null and b/.DS_Store differ diff --git a/.travis.yml b/.travis.yml index 3d767bb..95ce194 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: node_js node_js: - - stable - - "10" +- '10' deploy: provider: npm edge: true email: badgecrypto@gmail.com api_key: - secure: xUyfD7JJO+E3l8clHwSgExh2gU+BmU7D7sPE9+r2F8BMRW0EdCWfRM1OPM0gxSSrLg891qx81bvJYhDp/5731ULHje32k2K2yBs7ET6eE4WDkz3bMYiaxQz0hKykrRZdcgRPZgbfv4VclAmxTBKDepzg4YLHN3QHX7i1Si6b0F0+hzfIBCzxnvGKDaUUQR4RyafC4ZgyqE4M2T3+s7c3RW+HLmvcXJ88xgsfbeoaQKiRcRdhh4rVkwJduflEHuxkdK9PabH2MbYyQG8pCoyBZWQwLPqu3UzcqiRXPiLwtWNp1SlLquPbk9l4pbsAZeBT6y9g4DVze3nx2ZUmWEOrXM5n/fGWSJtPxys/+heON0i//HFeEpLbLZ1r4MWJcsfeCeBCUs+gos5bewYAOzQ/AwZA/mxH1doWau6zr05x5v6bPCS95DlYixPRv/6xwMcX4Qx9aATTcQEA+a6FI1ncdehdMP2JQ3k8ZZCk/GNfBgl1R58G1KZTys7MtL/YK38BB7r65sL3cARQEM1cy7buwhFFFhQnTELvDBZKq9zNzk7yX8yB9kkAzftDQodUlc2C9fRu7WdjmlWqIby8lcATmi3UNmnL8vNpSWFWVlHT7dxcBmyZrhd3W7hhFGT8mTQ2qzAwDa/W8QU+yWL56rNbIDtiJoZyOcbsghJAHlOycKE= + secure: "CAsP+04BTYfyn80qn5OROEj11X3t2QUZewJ236iGJSTZFtuFo8BhaEc0B3za5sS0thg1+Rdm2yZyM1FIaI1f/Xqy41f1Iyb84h+dVMfu8HRl/8UlIiQhMml+zQ3ZYdCYswWn7AdXGYQnx85+b8ajkyfaYYjb9E7GLn9XJilaFGdbuJ78Brb+3R2Lq0gWnNq0182gclUM0kx4UetGCQ7LsTu5DVsHAZl+i+6o7pnbcixWT/IDhokzacbylqC9II53zyoRNfnzVCDCxlHbMojxErRZVykV7d0NpmhXUYB46WpLTRI3qKZRE1LUpJEyp50E7dQbKSuB6fzi/UI3ihiamMwg+3J1Mq3ABxYu3SX2ZVTSA4j4jdxJxg2AQhrgjDRHJJr37uapPAZn28KPaC33pFBUNPGBCRMNjNRVlX5smEQbVa816HN94TQVdFHZA+BV4cnynfJCiNAQb0D9Ys/HzfhZ+mLW1T69PBUhxWX52t/zGmYOtepThXHGC9MqvbaQBM4ksy9G9ugaa5rw2q9SRIZ2V+TZbvvh+9C2kb9XOt2/q8JGCARrPU6sOMa+O6RY9AE42fstT/GR+cSdL31IsqSgWhxTpbVdcm47loZdRl0XamMK6Mcw1AtN8kY0c+XRAZp+fXDKlRTijvDaaStuf4ypbOELzfPEFtT6D8zxsCk=" on: tags: true branch: master + repo: canfoundation/can-pass-js diff --git a/README.md b/README.md index 6ed8280..5dd258e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ -# can-pass-api +# can-pass-js + +[![Build Status](https://travis-ci.org/canfoundation/can-pass-js.svg?branch=master)](https://travis-ci.org/canfoundation/can-pass-js) +[![NPM](https://img.shields.io/npm/v/can-pass-js.svg)](https://www.npmjs.org/package/can-pass-js) + +[![https://nodei.co/npm/can-pass-js.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/can-pass-js.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/can-pass-js) + +[![Build Status](https://travis-ci.com/can-lab-lecle/can-pass-js.svg?branch=master)](https://travis-ci.com/can-lab-lecle/can-pass-js) [![Build Status](https://travis-ci.com/can-lab-lecle/can-pass-js.svg?branch=master)](https://travis-ci.com/can-lab-lecle/can-pass-js) @@ -52,10 +59,10 @@ The full script for embedding to your HTML #### Import via yarn or npm -Run `yarn add http://git.baikal.io/can/can-pass-api.git` from terminal. +Run `yarn add can-pass-js` from terminal. ```javascript -import CanPass from "can-pass-api"; +import CanPass from "can-pass-js"; CanPass.init({ clientId: "{client-id}", diff --git a/package.json b/package.json index 01ad23f..c92c4d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "can-pass-js", - "version": "0.0.1", + "version": "0.9.5", "description": "Can Pass API SDK", "files": [ "dist", @@ -12,11 +12,11 @@ "build": "rm -rf dist lib && rollup -c && tsc -p .", "watch": "yarn run build -w", "test": "jest", - "prepublish": "npm run build" + "prepublish": "yarn build" }, "repository": { "type": "git", - "url": "git@git.baikal.io:can/can-pass-api.git" + "url": "https://github.com/canfoundation/can-pass-js" }, "keywords": [ "can-pass" diff --git a/src/fetch.ts b/src/fetch.ts index 4b1889b..f4294f9 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -1,9 +1,8 @@ -import { global } from './utils'; +import { global } from "./utils"; -// eslint-disable-next-line import/no-mutable-exports -let { fetch } = global; +let fetch = global.fetch.bind(global); -export const set = (f) => { +export const set = f => { fetch = f; }; diff --git a/tsconfig.json b/tsconfig.json index 003148c..5b46dc4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "declaration": true, - "module": "umd", + "module": "commonjs", "moduleResolution": "node", "esModuleInterop": true, "lib": ["esnext", "dom"], @@ -22,11 +22,6 @@ "outDir": "dist", "target": "es5" }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/__tests__/.*", - "./src/__mocks__/.*" - ] + "include": ["./src/**/*"], + "exclude": ["./src/__tests__/.*", "./src/__mocks__/.*"] }