Cleanup linting & docs (#1)

* Cleanup linting & docs

* Cleanup build
This commit is contained in:
Jaco Greeff
2020-09-21 15:22:00 +02:00
committed by GitHub
parent 314bf6f252
commit e7f1e3bd57
11 changed files with 68 additions and 11 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ jobs:
pr:
strategy:
matrix:
step: ['lint', 'test', 'build', 'docs']
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
steps:
+1 -2
View File
@@ -8,7 +8,7 @@ jobs:
master:
strategy:
matrix:
step: ['build:release', 'docs:release']
step: ['build:release']
name: ${{ matrix.step }}
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/phishing'"
runs-on: ubuntu-latest
@@ -18,7 +18,6 @@ jobs:
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
GH_PAGES_SRC: docs
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+1
View File
@@ -0,0 +1 @@
Please see https://github.com/polkadot-js/phishing
+13
View File
@@ -0,0 +1,13 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"allowBranch": "master"
}
},
"packages": [
"packages/*"
],
"version": "0.1.0"
}
+4 -5
View File
@@ -2,6 +2,10 @@
"repository": "https://github.com/polkadot-js/phishing",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"private": true,
"workspaces": [
"packages/*"
],
"resolutions": {
"babel-core": "^7.0.0-bridge.0",
"typescript": "^4.0.2"
@@ -9,16 +13,11 @@
"scripts": {
"build": "polkadot-dev-build-ts",
"build:release": "polkadot-ci-ghact-build --skip-beta",
"docs": "echo \"no docs build step\"",
"docs:release": "polkadot-ci-ghact-docs",
"lint": "polkadot-dev-run-lint",
"clean": "polkadot-dev-clean-build",
"postinstall": "polkadot-dev-yarn-only",
"test": "echo \"no tests\""
},
"dependencies": {
"@polkadot/x-fetch": "^0.3.2"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@polkadot/dev": "^0.55.53",
+9
View File
@@ -0,0 +1,9 @@
# @polkadot/phishing
```js
import loadAndCheck from '@polkadot/phishing';
const isOnDeny = await retrieveCheckDeny(window.location.host);
console.log(`isOnDeny=${isOnDeny}`);
```
+28
View File
@@ -0,0 +1,28 @@
{
"name": "@polkadot/phishing",
"version": "0.1.0",
"description": "Simple phishing scripts from a central source",
"main": "index.js",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"repository": {
"type": "git",
"url": "git+https://github.com/polkadot-js/phishing.git"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [
"Jaco Greeff <jacogr@gmail.com>"
],
"contributors": [],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/polkadot-js/phishing/issues"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/x-fetch": "0.3.2"
}
}
@@ -14,7 +14,7 @@ export async function retrieveHostList (): Promise<HostList> {
}
// checks a host to see if it appears in the list
export async function checkHost (items: string[], host: string): Promise<boolean> {
export function checkHost (items: string[], host: string): boolean {
const hostParts = host.split('.').reverse();
return items.some((item): boolean => {
+10 -2
View File
@@ -2847,7 +2847,16 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/x-fetch@npm:^0.3.2":
"@polkadot/phishing@workspace:packages/phishing":
version: 0.0.0-use.local
resolution: "@polkadot/phishing@workspace:packages/phishing"
dependencies:
"@babel/runtime": ^7.11.2
"@polkadot/x-fetch": 0.3.2
languageName: unknown
linkType: soft
"@polkadot/x-fetch@npm:0.3.2":
version: 0.3.2
resolution: "@polkadot/x-fetch@npm:0.3.2"
dependencies:
@@ -15352,7 +15361,6 @@ fsevents@^1.2.7:
dependencies:
"@babel/core": ^7.11.6
"@polkadot/dev": ^0.55.53
"@polkadot/x-fetch": ^0.3.2
"@types/jest": ^26.0.10
languageName: unknown
linkType: soft