Skip to content

Commit

Permalink
upgraded to webpack 5 + wasm as base64
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddayag committed Sep 22, 2022
1 parent 2d92da0 commit e91bba7
Show file tree
Hide file tree
Showing 37 changed files with 392 additions and 5,022 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
}
},
"plugins": [],
"extends": ["eslint:recommended"],
"rules": {
"comma-dangle": 0,
"no-unused-vars": "warn",
"no-unexpected-multiline": "warn",
"prefer-const": "warn"
},
"settings": {},
"env": {
"browser": true,
"node": true,
"jasmine": true,
"jest": true,
"es6": true
}
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://hge.to/thanks
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
timezone: America/Montreal
open-pull-requests-limit: 10
versioning-strategy: increase
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
paths-ignore:
- README.md
- .gitignore
- .github/**

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build, and test
run: |
npm install
npm run test
env:
CI: true
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
push:
branches:
- master
paths-ignore:
- README.md
- .gitignore
- .github/**

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run test -- --coverage --watchAll=false

- name: Setup GIT
run: |
git reset --hard
git config --local --list
git checkout master
git config user.email "$GH_EMAIL"
git config user.name "Francisco Hodge"
env:
GH_EMAIL: ${{secrets.GH_EMAIL}}

- name: Bump version
run: |
git reset --hard
npm version patch
npm run build
git add . || true
git commit -m "Build update" || true
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: npm publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm run trypublish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
24 changes: 24 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build PR (Standard)

on: pull_request

jobs:
build:
runs-on: ${{ matrix.os }}
if: ${{ github.actor != 'dependabot[bot]' }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build, and test
run: |
npm install
npm run test
env:
CI: true
48 changes: 48 additions & 0 deletions .github/workflows/pull_request_dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build PR (Dependabot)

on: pull_request_target

jobs:
build:
runs-on: ${{ matrix.os }}
if: ${{ github.actor == 'dependabot[bot]' }}
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build, and test
run: |
npm install
npm run test
env:
CI: true
- name: Merge PR
if: success()
uses: "actions/github-script@v2"
with:
github-token: "${{ secrets.GH_KEY }}"
script: |
const pullRequest = context.payload.pull_request
const repository = context.repo
await github.pulls.merge({
merge_method: "merge",
owner: repository.owner,
pull_number: pullRequest.number,
repo: repository.repo,
})
- name: Reject PR
if: failure()
uses: peter-evans/close-pull@v1
with:
pull-request-number: ${{github.event.number}}
comment: "Closing PR due to failing tests."
delete-branch: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
.idea
34 changes: 34 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# dependencies
/node_modules

# testing
/tests
/coverage

# docs
/docs

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
/.github
/demo
.esdoc.json

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Development folders and files
public
src
scripts
config
.travis.yml
CHANGELOG.md
README.md
webpack.config.js
babel.config.js
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Francisco Hodge

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.
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: [["@babel/env"]],
plugins: [["@babel/plugin-proposal-class-properties"]],
};
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Ton Sources Verifier Widget DEMO</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="index.js"></script></head><body><div style="height: 500px"><tsv-widget ipfs-provider="https://tonsource.infura-ipfs.io" verified-contract-url="ipfs://Qmc2XaToAq77pcsQLS4qv3qnnkjjSFDPwqBi9kJXJnbiSr" theme="light" id="widget" layout="horizontal"></tsv-widget></div></body></html>
8 changes: 8 additions & 0 deletions build/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/index.js.map

Large diffs are not rendered by default.

File renamed without changes.
6 changes: 3 additions & 3 deletions dist/typings/index.d.ts → build/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export default class TSVWidgetElement extends HTMLElement {
private ch;
private sources;
private selectedFile;
private readonly ipfsProvider;
private ipfsProvider;
private verifiedContractUrl;
private verifiedContract;
private readonly theme;
private readonly layout;
private theme;
private layout;
/**
*
*/
Expand Down
85 changes: 0 additions & 85 deletions dist/code-highlighter.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/code-highlighter.js.map

This file was deleted.

Loading

0 comments on commit e91bba7

Please sign in to comment.