fix: move to npm for typings

This commit is contained in:
Jason Poon 2018-01-31 18:09:51 -08:00 committed by Jason Poon
parent 68e793fb25
commit c4f75ad16a
8 changed files with 302 additions and 923 deletions

View File

@ -4,8 +4,8 @@ var gulp = require('gulp'),
inject = require('gulp-inject-string'),
merge = require('merge-stream'),
tag_version = require('gulp-tag-version'),
ts = require('gulp-typescript'),
tslint = require('gulp-tslint'),
typings = require('gulp-typings'),
filter = require('gulp-filter'),
shell = require('gulp-shell'),
exec = require('child_process').exec;
@ -25,13 +25,9 @@ function versionBump(semver) {
.pipe(tag_version());
}
gulp.task('typings', function() {
return gulp.src('./typings.json').pipe(typings());
});
gulp.task('typings-vscode-definitions', ['typings'], function() {
// add vscode definitions
return gulp.src('./typings/index.d.ts').pipe(gulp.dest('./typings'));
gulp.task('compile', function(){
var tsProject = ts.createProject('./tsconfig.json');
return tsProject.src().pipe(tsProject()).js.pipe(gulp.dest('out'));
});
gulp.task('tslint', function() {
@ -76,10 +72,6 @@ function runPrettier(command) {
gulp.task('default', ['prettier', 'tslint', 'compile']);
gulp.task('compile', shell.task(['npm run vscode:prepublish']));
gulp.task('watch', shell.task(['npm run compile']));
gulp.task('init', ['typings', 'typings-vscode-definitions']);
gulp.task('patch', ['default'], function() {
return versionBump('patch');
});

1179
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -575,20 +575,24 @@
}
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
"vscode:prepublish": "gulp compile",
"test": "node ./node_modules/vscode/bin/test",
"postinstall": "node ./node_modules/vscode/bin/install && gulp init"
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"clipboardy": "^1.2.2",
"diff-match-patch": "^1.0.0",
"gulp-typescript": "^3.2.4",
"lodash": "^4.17.4",
"neovim-client": "^2.1.0",
"promised-neovim-client": "^2.0.2",
"untildify": "^3.0.2"
},
"devDependencies": {
"@types/copy-paste": "^1.1.30",
"@types/diff": "^3.2.2",
"@types/diff-match-patch": "^1.0.32",
"@types/lodash": "^4.14.99",
"@types/mocha": "^2.2.47",
"@types/node": "^9.4.0",
"gulp": "^3.9.1",
@ -598,7 +602,6 @@
"gulp-shell": "^0.6.5",
"gulp-tag-version": "^1.3.1",
"gulp-tslint": "^8.1.2",
"gulp-typings": "^2.0.4",
"merge-stream": "^1.0.1",
"mocha": "^5.0.0",
"prettier": "^1.10.2",

View File

@ -162,7 +162,7 @@ class Remapper implements IRemapper {
private _longestKeySequence(): number {
if (this._remappings.length > 0) {
return _.maxBy(this._remappings, map => map.before.length).before.length;
return _.maxBy(this._remappings, map => map.before.length)!.before.length;
} else {
return 1;
}

View File

@ -365,7 +365,7 @@ export class HistoryTracker {
* Retrieves a mark.
*/
getMark(markName: string): IMark {
return _.find(this.currentHistoryStep.marks, mark => mark.name === markName);
return <IMark>_.find(this.currentHistoryStep.marks, mark => mark.name === markName);
}
getMarks(): IMark[] {

View File

@ -13,10 +13,10 @@
"sourceMap": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"alwaysStrict": true
"alwaysStrict": true,
},
"exclude": [
"node_modules",
".vscode-test"
"!node_modules/@types"
]
}

View File

@ -1,11 +0,0 @@
{
"name": "vim",
"dependencies": {
"diff": "registry:npm/diff#2.0.0+20160211003958",
"lodash": "registry:npm/lodash#4.0.0+20160416211519"
},
"globalDependencies": {
"copy-paste": "registry:dt/copy-paste#1.1.3+20160117130525",
"diff-match-patch": "registry:dt/diff-match-patch#1.0.0+20160821140300"
}
}