diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 00000000..918c6df6
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,32 @@
+name: "publish to npm"
+on: workflow_dispatch
+jobs:
+ main:
+ runs-on: ubuntu-latest
+ steps:
+ - name: ⬇️ Checkout repo
+ uses: actions/checkout@v2
+ with:
+ token: ${{ secrets.ACCESS_TOKEN }}
+ fetch-depth: 0
+
+ - name: ⎔ Setup node
+ # sets up the .npmrc file to publish to npm
+ uses: actions/setup-node@v2
+ with:
+ node-version: "14"
+ registry-url: "https://registry.npmjs.org"
+
+ - name: 📥 Download deps
+ uses: bahmutov/npm-install@v1
+ with:
+ useLockFile: false
+
+ - name: Configure git user
+ run: |
+ git config --global user.email ${{ github.actor }}@users.noreply.github.com
+ git config --global user.name ${{ github.actor }}
+ - name: ▶️ Run release
+ run: npm run release
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 48cf8e1f..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - 'lts/*'
-before_install:
- - rm -rf node_modules
-before_script:
- - npm run flow-typed
-script: npm run build
diff --git a/demo/index.htm b/demo/index.htm
deleted file mode 100644
index a1417059..00000000
--- a/demo/index.htm
+++ /dev/null
@@ -1,13 +0,0 @@
-
- MyLibrary Demo
-
-
-
-
-
-
-
diff --git a/package.json b/package.json
index 37ec2bca..358b5282 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "belter",
+ "name": "@krakenjs/belter",
"version": "1.0.190",
"description": "Utilities.",
"main": "index.js",
@@ -93,8 +93,8 @@
"standard-version": "^9.3.2"
},
"dependencies": {
- "cross-domain-safe-weakmap": "^1",
- "cross-domain-utils": "^2",
- "zalgo-promise": "^1"
+ "@krakenjs/cross-domain-safe-weakmap": "^2.0.2",
+ "@krakenjs/cross-domain-utils": "^3.0.2",
+ "@krakenjs/zalgo-promise": "^1"
}
}
diff --git a/publish.sh b/publish.sh
deleted file mode 100755
index b83c3bc0..00000000
--- a/publish.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-set -e;
-
-if ! git diff-files --quiet; then
- echo "Can not publish with unstaged uncommited changes";
- exit 1;
-fi;
-
-if ! git diff-index --quiet --cached HEAD; then
- echo "Can not publish with staged uncommited changes";
- exit 1;
-fi;
-
-rm -rf node_modules
-npm install
-
-rm -r dist/*;
-npm run build;
-
-git add dist;
-git commit -m "Dist" || echo "Nothing to distribute";
-
-npm version patch
-
-git push;
-git push --tags;
-npm publish;
diff --git a/src/dom.js b/src/dom.js
index 231db4db..1a7c94e6 100644
--- a/src/dom.js
+++ b/src/dom.js
@@ -1,9 +1,9 @@
/* @flow */
/* eslint max-lines: off */
-import { ZalgoPromise } from 'zalgo-promise/src';
+import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { linkFrameWindow, isWindowClosed, assertSameDomain,
- type SameDomainWindowType, type CrossDomainWindowType } from 'cross-domain-utils/src';
-import { WeakMap } from 'cross-domain-safe-weakmap/src';
+ type SameDomainWindowType, type CrossDomainWindowType } from '@krakenjs/cross-domain-utils/src';
+import { WeakMap } from '@krakenjs/cross-domain-safe-weakmap/src';
import { isElement, inlineMemoize, memoize, noop, stringify, capitalizeFirstLetter,
once, extend, safeInterval, uniqueID, arrayFrom, ExtendableError, strHashStr } from './util';
diff --git a/src/http.js b/src/http.js
index 04e9e3fc..e08274d9 100644
--- a/src/http.js
+++ b/src/http.js
@@ -1,7 +1,7 @@
/* @flow */
-import { ZalgoPromise } from 'zalgo-promise/src';
-import { type SameDomainWindowType } from 'cross-domain-utils/src';
+import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
+import { type SameDomainWindowType } from '@krakenjs/cross-domain-utils/src';
type RequestOptionsType = {|
url : string,
@@ -74,7 +74,7 @@ export function request({ url, method = 'get', headers = {}, json, data, body, w
if (!this.status) {
return reject(new Error(`Request to ${ method.toLowerCase() } ${ url } failed: no response status code.`));
}
-
+
const contentType = responseHeaders['content-type'];
const isJSON = contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('text/json') === 0);
let responseBody = this.responseText;
diff --git a/src/test.js b/src/test.js
index 52daeaa9..f5d9e37c 100644
--- a/src/test.js
+++ b/src/test.js
@@ -1,6 +1,6 @@
/* @flow */
-import { ZalgoPromise } from 'zalgo-promise/src';
+import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
import { noop, tryCatch, removeFromArray } from './util';
@@ -29,7 +29,7 @@ export function wrapPromise(method : Wrapper, { timeout = 5000 } : {| time
const exp = { name, handler };
// $FlowFixMe
expected.push(exp);
-
+
// $FlowFixMe
return function expectWrapper(...args) : * {
removeFromArray(expected, exp);
diff --git a/src/util.js b/src/util.js
index 112af4c1..30af21b4 100644
--- a/src/util.js
+++ b/src/util.js
@@ -2,8 +2,8 @@
/* @flow */
/* eslint max-lines: 0 */
-import { ZalgoPromise } from 'zalgo-promise/src';
-import { WeakMap } from 'cross-domain-safe-weakmap/src';
+import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
+import { WeakMap } from '@krakenjs/cross-domain-safe-weakmap/src';
import type { CancelableType } from './types';