Skip to content
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
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"@babel/env",
"@babel/typescript"
],
"plugins": [
"@babel/proposal-class-properties"
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_STORE
node_modules
node_modules/
dist/
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
45 changes: 45 additions & 0 deletions .yarnclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# test directories
__tests__
test
tests
powered-test

# asset directories
docs
doc
website
images
assets

# examples
example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
appveyor.yml
circle.yml
codeship-services.yml
codeship-steps.yml
wercker.yml
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.travis.yml

# misc
*.md
26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"test": "jest",
"semantic-release": "semantic-release",
"postinstall": "rm -f node_modules/web3/index.d.ts node_modules/web3/types.d.ts"
"postinstall": "rm -f node_modules/web3/index.d.ts node_modules/web3/types.d.ts",
"build:dev": "webpack --mode development --display-error-details",
"build:prod": "webpack --mode production"
},
"jest": {
"moduleFileExtensions": [
Expand Down Expand Up @@ -40,6 +42,9 @@
},
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-typescript": "^7.3.3",
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@types/jest": "^23.3.10",
Expand All @@ -50,19 +55,34 @@
"@types/web3": "^1.0.18",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.5",
"husky": "^1.3.1",
"jest": "^24.1.0",
"lint-staged": "^8.1.5",
"prettier": "1.16.4",
"reflect-metadata": "^0.1.12",
"regenerator-runtime": "^0.13.1",
"semantic-release": "^15.13.3",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"tslint": "^5.15.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "3.2.4",
"web3-core-promievent": "^1.0.0-beta.37"
"web3-core-promievent": "^1.0.0-beta.37",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json,css,md}": [
"prettier --write",
"git add"
]
},
"repository": {
"type": "git",
"url": "https://github.com/PolymathNetwork/polymath-sdk.git"
Expand Down
3 changes: 3 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"]
}
20 changes: 20 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

module.exports = {
entry: './src/index.ts',
resolve: {
extensions: ['.tsx', '.ts', '.js'],
plugins: [
new TsconfigPathsPlugin()
]
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
}
};
Loading