diff --git a/remix-resolve/package.json b/remix-resolve/package.json index 9f79b4e506..1e2a6544b0 100644 --- a/remix-resolve/package.json +++ b/remix-resolve/package.json @@ -7,6 +7,7 @@ "remix-resolve": "./bin/remix-resolve" }, "scripts": { + "build": "tsc", "lint": "standard", "test": "standard && mocha tests/ -t 300000" }, @@ -35,6 +36,8 @@ }, "devDependencies": { "mocha": "^5.1.0", - "standard": "^12.0.1" + "standard": "^12.0.1", + "tslint": "^5.11.0", + "typescript": "^3.1.6" } } diff --git a/remix-resolve/src/index.ts b/remix-resolve/src/index.ts new file mode 100644 index 0000000000..2e7be0c89b --- /dev/null +++ b/remix-resolve/src/index.ts @@ -0,0 +1,8 @@ +/* +const rr = require('remix-resolve') +const fileContent = rr.resolve('https://github.com/ethereum/greeter.sol') +const input = rr.combineSource({ 'greeter.sol': content }) +*/ +export * from './resolve.js' +export * from './combineSource.js' +export * from './getFile.js' diff --git a/remix-resolve/tsconfig.json b/remix-resolve/tsconfig.json new file mode 100644 index 0000000000..b2dfc4b71d --- /dev/null +++ b/remix-resolve/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compileOnSave": false, + "include": ["./src"], + "compileOptions": { + "baseUrl": "./src", + "outDir": "./dist", + "sourceMap": false, + "declaration": false, + "module": "commonjs", + "strict": true, + "noImplicitAny": false, + "strictPropertyInitialization": false, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": ["node_modules/@types"], + "lib": ["dom", "es2018"], + "paths": { + "remix-resolve": ["./"] + } + } +} diff --git a/remix-resolve/tslint.json b/remix-resolve/tslint.json new file mode 100644 index 0000000000..56c85deb96 --- /dev/null +++ b/remix-resolve/tslint.json @@ -0,0 +1,113 @@ +{ + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": false, + "deprecation": { + "severity": "warn" + }, + "forin": false, + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": false, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-redundant-jsdoc": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + false, + "single" + ], + "radix": true, + "semicolon": [ + true, + "never" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } + } +