Skip to content

Bundle all the project #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["@babel/env"],
"presets": ["@babel/env", "@babel/preset-typescript"],
"plugins": [
[
"babel-plugin-inline-import",
Expand Down
22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],

parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},

rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': 'error',
'prefer-const': 'error',
'max-len': 'error',
},
env: {
es6: true,
mocha: true,
node: true,
},
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist/
.vscode
.idea
/Foo.sol
coverage/
3 changes: 3 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
require: ["source-map-support/register"],
}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/lib/**/*
*.sol
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "10"
- "14"

script:
- npm run lint
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ parser.visit(ast, {

## Usage in the browser

A browser-friendly version is available in `dist/solidity-parser.js` in the published version.
A browser-friendly version is available in `dist/index.iife.js` (along with its sourcemaps file) in the published version.

If you are using webpack, keep in mind that minimizing your bundle will mangle function names, breaking the parser. To fix this you can just set `optimization.minimize` to `false`.

Expand All @@ -98,7 +98,7 @@ This project is dependant on the [@solidity-parser/antlr](https://github.com/sol
git clone --recursive
```

If you have already cloned this repo, you can load the submodule with
If you have already cloned this repo, you can load the submodule with

```
git submodule update --init
Expand Down
Loading