chore: Essentials for TS coding

This commit is contained in:
OctoD 2017-05-23 18:41:56 +02:00
parent 09b2ed4ff4
commit 6eb7f91b09
8 changed files with 85 additions and 19 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
*.log *.log
*.~lock *.~lock
*.js
dist/ dist/
node_modules/ node_modules/

50
.vscode/tasks.json vendored
View file

@ -7,22 +7,40 @@
// ${cwd}: the current working directory of the spawned process // ${cwd}: the current working directory of the spawned process
// A task runner that calls a custom npm script that compiles the extension. // A task runner that calls a custom npm script that compiles the extension.
{ {
"version": "0.1.0", "version": "2.0.0",
// we want to run npm // tasks list (build, build-theme, semver etc)
"command": "npm", "tasks": [
// the command is a shell script {
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": [ "args": [
"run", "run"
"compile", , "build"
"--loglevel",
"silent"
], ],
// The tsc compiler is started in watching mode "isBuildCommand": true,
"isWatching": true, "command": "npm",
// use the standard tsc in watch mode problem matcher to find compile problems in the output. "dependsOn": "tsc",
"problemMatcher": "$tsc-watch" "echoCommand": true,
"isShellCommand": true,
"taskName": "build"
},
{
"args": [
"run"
, "changelog"
],
"command": "npm",
"echoCommand": true,
"isShellCommand": true,
"taskName": "changelog"
},
{
"args": [
"-p"
, "."
],
"command": "tsc",
"echoCommand": true,
"isShellCommand": true,
"taskName": "tsc"
}
]
} }

View file

@ -77,6 +77,15 @@
} }
], ],
"devDependencies": { "devDependencies": {
"@types/chalk": "^0.4.31",
"@types/gulp": "^4.0.3",
"@types/gulp-if": "0.0.31",
"@types/gulp-util": "^3.0.31",
"@types/mustache": "^0.8.29",
"@types/run-sequence": "0.0.29",
"@types/through2": "^2.0.33",
"@types/yamljs": "^0.2.30",
"@types/yargs": "^6.6.0",
"babel-core": "^6.24.1", "babel-core": "^6.24.1",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babel-root-import": "^4.1.8", "babel-root-import": "^4.1.8",

File diff suppressed because one or more lines are too long

21
tsconfig.json Normal file
View file

@ -0,0 +1,21 @@
{
"compilerOptions": {
"lib": [
"es2015"
],
"module": "commonjs",
"allowUnreachableCode": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true,
"target": "es6"
},
"include": [
"./**/*",
"./.gulp/**/*"
],
"exclude": [
"node_modules",
"out"
]
}

7
typings/gulp-bump/gulp-bump.d.ts vendored Normal file
View file

@ -0,0 +1,7 @@
declare module "gulp-bump" {
function gulpBump (... args: any[]): any;
namespace gulpBump {}
export = gulpBump;
}

View file

@ -0,0 +1,5 @@
declare module "gulp-conventional-changelog" {
function changelog(... args: any[]): any;
namespace changelog {}
export = changelog;
}

5
typings/gulp-stats/gulp-stats.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
declare module "gulp-stats" {
function gulpStats(... args: any[]): any;
namespace gulpStats {}
export = gulpStats;
}