Set up our packaging for TypeScript
This commit is contained in:
Родитель
a8c9dd2729
Коммит
393a2edc95
15
.jshintrc
15
.jshintrc
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"es5": true,
|
||||
"esnext": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"expr": true,
|
||||
"latedef": true,
|
||||
"onevar": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
"trailing": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"browser": true
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
test-dist/
|
||||
lib/test
|
||||
|
|
49
package.json
49
package.json
|
@ -2,11 +2,13 @@
|
|||
"name": "electron-rebuild",
|
||||
"version": "1.5.7",
|
||||
"description": "Electron supporting package to rebuild native node modules against the currently installed electron",
|
||||
"main": "lib/main.js",
|
||||
"main": "lib/src/main.js",
|
||||
"typings": "lib/src/index.d.ts",
|
||||
"scripts": {
|
||||
"compile": "babel -d lib/ src/ && babel -d test-dist/ test/",
|
||||
"compile": "tsc",
|
||||
"prepublish": "npm run compile",
|
||||
"test": "npm run compile && mocha test-dist/* --timeout 120000"
|
||||
"test": "mocha --compilers ts:ts-node/register ./test/*",
|
||||
"lint": "tslint \"src/**/*.ts\" \"test/**/*.ts\""
|
||||
},
|
||||
"bin": {
|
||||
"electron-rebuild": "lib/cli.js"
|
||||
|
@ -28,9 +30,6 @@
|
|||
"node": ">=6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-register": "^6.16.3",
|
||||
"babel-runtime": "6.18.0",
|
||||
"bluebird": "^3.4.6",
|
||||
"colors": "^1.1.2",
|
||||
"debug": "^2.4.5",
|
||||
"fs-promise": "^1.0.0",
|
||||
|
@ -38,34 +37,26 @@
|
|||
"node-gyp": "^3.4.0",
|
||||
"ora": "^0.3.0",
|
||||
"rimraf": "^2.5.0",
|
||||
"spawn-rx": "^2.0.7",
|
||||
"spawn-rx": "^2.0.10",
|
||||
"yargs": "^3.31.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.5.2",
|
||||
"babel-plugin-syntax-async-functions": "^6.13.0",
|
||||
"babel-plugin-transform-async-to-module-method": "^6.16.0",
|
||||
"babel-plugin-transform-runtime": "^6.15.0",
|
||||
"babel-preset-es2015": "^6.16.0",
|
||||
"@types/chai": "^3.4.35",
|
||||
"@types/chai-as-promised": "0.0.30",
|
||||
"@types/colors": "^1.1.1",
|
||||
"@types/debug": "0.0.29",
|
||||
"@types/es6-promise": "0.0.32",
|
||||
"@types/mocha": "^2.2.40",
|
||||
"@types/node": "^7.0.12",
|
||||
"@types/ora": "^0.3.31",
|
||||
"@types/rimraf": "0.0.28",
|
||||
"@types/yargs": "^6.6.0",
|
||||
"chai": "^3.4.1",
|
||||
"chai-as-promised": "^6.0.0",
|
||||
"electron-prebuilt": "^1.4.12",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-runtime",
|
||||
"syntax-async-functions",
|
||||
[
|
||||
"transform-async-to-module-method",
|
||||
{
|
||||
"module": "bluebird",
|
||||
"method": "coroutine"
|
||||
}
|
||||
]
|
||||
]
|
||||
"mocha": "^3.2.0",
|
||||
"ts-node": "^3.0.2",
|
||||
"tslint": "^4.5.1",
|
||||
"typescript": "^2.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"removeComments": false,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"strictNullChecks": true,
|
||||
"noUnusedLocals": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedParameters": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"pretty": true,
|
||||
"target": "es5",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"formatCodeOptions": {
|
||||
"indentSize": 2,
|
||||
"tabSize": 2
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"lib"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"rules": {
|
||||
"curly": true,
|
||||
"eofline": false,
|
||||
"align": [true, "parameters"],
|
||||
"class-name": true,
|
||||
"indent": [true, "spaces"],
|
||||
"max-line-length": [true, 150],
|
||||
"no-trailing-whitespace": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-var-keyword": true,
|
||||
"no-empty": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": true,
|
||||
"one-line": [true,
|
||||
"check-else",
|
||||
"check-whitespace",
|
||||
"check-open-brace"],
|
||||
"quotemark": [true,
|
||||
"single",
|
||||
"avoid-escape"],
|
||||
"semicolon": [true, "always"],
|
||||
"typedef-whitespace": [true, {
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}],
|
||||
"whitespace": [true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-type"]
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче