Skip to content

Commit dd41848

Browse files
authored
Merge pull request #34 from solidity-parser/bundle-parser
Bundle all the project
2 parents f0da67e + f9bba29 commit dd41848

30 files changed

+17132
-17601
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"presets": ["@babel/env"],
2+
"presets": ["@babel/env", "@babel/preset-typescript"],
33
"plugins": [
44
[
55
"babel-plugin-inline-import",

.eslintrc

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

.eslintrc.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint/eslint-plugin'],
5+
extends: [
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/recommended',
8+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
9+
],
10+
11+
parserOptions: {
12+
tsconfigRootDir: __dirname,
13+
project: ['./tsconfig.json'],
14+
},
15+
16+
rules: {
17+
'@typescript-eslint/no-explicit-any': 'off',
18+
'@typescript-eslint/strict-boolean-expressions': 'off',
19+
'@typescript-eslint/no-unsafe-call': 'off',
20+
'@typescript-eslint/no-unsafe-member-access': 'off',
21+
'@typescript-eslint/no-unsafe-assignment': 'off',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-unsafe-return': 'off',
24+
'@typescript-eslint/no-empty-interface': 'off',
25+
'no-var': 'error',
26+
'object-curly-spacing': ['error', 'always'],
27+
'object-shorthand': 'error',
28+
'prefer-const': 'error',
29+
'max-len': 'error',
30+
},
31+
env: {
32+
es6: true,
33+
mocha: true,
34+
node: true,
35+
},
36+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dist/
44
.vscode
55
.idea
66
/Foo.sol
7+
coverage/

.mocharc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
require: ["source-map-support/register"],
3+
}

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/lib/**/*
2+
*.sol

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "10"
3+
- "14"
44

55
script:
66
- npm run lint

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ parser.visit(ast, {
8686

8787
## Usage in the browser
8888

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

9191
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`.
9292

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

101-
If you have already cloned this repo, you can load the submodule with
101+
If you have already cloned this repo, you can load the submodule with
102102

103103
```
104104
git submodule update --init

0 commit comments

Comments
 (0)