Skip to content

Commit

Permalink
added optional radius to avoiding repeat numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
AspieSoft committed Nov 11, 2020
1 parent 8ca052c commit aed0de4
Show file tree
Hide file tree
Showing 11 changed files with 593 additions and 554 deletions.
128 changes: 62 additions & 66 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,62 @@
name: Publish

on:
release:
types: [published]
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: node test.js

publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
scope: aspiesoft
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: aspiesoft
- run: npm publish
env:
AUTHOR_EMAIL: [email protected]
AUTHOR_NAME: aspiesoft
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

publish-npm-noscope:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: remove scope from package name
run: |
sed -i 's/"name":\s"@aspiesoft\//"name":"/g' package.json
sed -i 's/"name":\s"@aspiesoft\//"name":"/g' package-lock.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
name: Publish

on:
workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: node test.js

publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
scope: aspiesoft
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: aspiesoft
- run: npm publish
env:
AUTHOR_EMAIL: [email protected]
AUTHOR_NAME: aspiesoft
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

publish-npm-noscope:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: remove scope from package name
run: |
sed -i 's/"name":\s"@aspiesoft\//"name":"/g' package.json
sed -i 's/"name":\s"@aspiesoft\//"name":"/g' package-lock.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
12 changes: 6 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.npmignore
.github/
test.js
test.html
build.js
script.js
.npmignore
.github/
test.js
test.html
build.js
script.js
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License

Copyright (c) 2020 [email protected]

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License
Copyright (c) 2020 [email protected]
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
62 changes: 31 additions & 31 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
const miniforge = require('@aspiesoft/miniforge-js');

miniforge.rootDir(__dirname);

miniforge.build('./script.js', {
standAlone: true,
avoidDependencies: true,
compress: false,
encrypt: false,
outputNameMin: true,
minify: {
ecma: 6,
parse: {ecma: 6},
compress: {
ecma: 6,
keep_infinity: false,
module: false,
passes: 5,
top_retain: ['random'],
typeofs: false,
},
mangle: {
keep_classnames: true,
module: true,
reserved: ['random'],
},
module: false,
keep_classnames: true,
ie8: true,
}
});
const miniforge = require('@aspiesoft/miniforge-js');

miniforge.rootDir(__dirname);

miniforge.build('./script.js', {
standAlone: true,
avoidDependencies: true,
compress: false,
encrypt: false,
outputNameMin: true,
minify: {
ecma: 6,
parse: {ecma: 6},
compress: {
ecma: 6,
keep_infinity: false,
module: false,
passes: 5,
top_retain: ['random'],
typeofs: false,
},
mangle: {
keep_classnames: true,
module: true,
reserved: ['random'],
},
module: false,
keep_classnames: true,
ie8: true,
}
});
Loading

0 comments on commit aed0de4

Please sign in to comment.