Skip to content

Commit f031cf3

Browse files
authored
Merge pull request #6 from julyskies/develop
2.0.0
2 parents 6afb408 + d6a34e3 commit f031cf3

File tree

17 files changed

+8187
-3706
lines changed

17 files changed

+8187
-3706
lines changed

.DS_Store

6 KB
Binary file not shown.

.eslintrc.json

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,47 @@
11
{
22
"env": {
3-
"commonjs": true,
43
"es2021": true,
4+
"jest": true,
55
"node": true
66
},
7-
"extends": [
8-
"airbnb-base"
7+
"extends": ["airbnb-base"],
8+
"ignorePatterns": [
9+
"build",
10+
"runtime.js",
11+
"src/tests"
912
],
13+
"parser": "@typescript-eslint/parser",
1014
"parserOptions": {
11-
"ecmaVersion": 12
15+
"ecmaVersion": 13,
16+
"sourceType": "module"
1217
},
13-
"ignorePatterns": [
14-
"tests/*.js",
15-
"runtime.js"
18+
"plugins": [
19+
"@typescript-eslint"
1620
],
1721
"rules": {
22+
"@typescript-eslint/no-unused-vars": ["error"],
23+
"@typescript-eslint/no-use-before-define": ["error"],
24+
"import/extensions": [
25+
"error",
26+
"ignorePackages",
27+
{
28+
"ts": "never"
29+
}
30+
],
1831
"max-len": [
1932
"error",
2033
{
2134
"code": 100
2235
}
23-
]
36+
],
37+
"no-unused-vars": "off",
38+
"no-use-before-define": "off"
39+
},
40+
"settings": {
41+
"import/resolver": {
42+
"node": {
43+
"extensions": [".ts"]
44+
}
45+
}
2446
}
2547
}

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
name: Publish Scryptwrap to NPM
4+
on:
5+
release:
6+
types: [published]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: npm ci
17+
- run: npm publish
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# Build
2+
build/
3+
14
# Dependencies
25
node_modules/
36

47
# NPM
58
.npmrc
69

710
# Misc
8-
runtime.js
11+
.env

.npmignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
# Directories
2+
.github/
3+
build/tests/
4+
src/
5+
6+
# Files
7+
.env
18
.eslintrc.json
2-
.gitignore
39
.travis.yml
410
package-lock.json
5-
runtime.js
6-
/tests
11+
tsconfig.json

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: node_js
22
node_js:
3-
- 14
3+
- 16
44
script: npm run test

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
Copyright 2021, Peter Dyumin
1+
Copyright 2022, Peter Dyumin
32

43
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
54

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npm i scryptwrap
1919
Load the module:
2020

2121
```javascript
22-
const { compare, hash } = require('scryptwrap');
22+
import { compare, hash } from 'scryptwrap';
2323
```
2424

2525
Create a hash:
@@ -39,6 +39,17 @@ if (isValid) {
3939

4040
### Testing
4141

42+
Deploy the project locally:
43+
44+
```shell script
45+
git clone https://github.com/julyskies/scryptwrap
46+
cd ./scryptwrap
47+
nvm use 16
48+
npm i
49+
```
50+
51+
Run tests:
52+
4253
```shell script
4354
npm run test
4455
```
@@ -47,10 +58,14 @@ Tests are done with [Jest](https://jestjs.io)
4758

4859
### Linting
4960

61+
After deploying the project and installing the modules you can do the linting:
62+
5063
```shell script
5164
npm run lint
5265
```
5366

67+
Using [ESLint](https://www.npmjs.com/package/eslint)
68+
5469
### License
5570

56-
[MIT](./LICENSE)
71+
[MIT](./LICENSE.md)

index.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)