mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
fix: move to npm for typings
This commit is contained in:
parent
68e793fb25
commit
c4f75ad16a
16
gulpfile.js
16
gulpfile.js
@ -4,8 +4,8 @@ var gulp = require('gulp'),
|
|||||||
inject = require('gulp-inject-string'),
|
inject = require('gulp-inject-string'),
|
||||||
merge = require('merge-stream'),
|
merge = require('merge-stream'),
|
||||||
tag_version = require('gulp-tag-version'),
|
tag_version = require('gulp-tag-version'),
|
||||||
|
ts = require('gulp-typescript'),
|
||||||
tslint = require('gulp-tslint'),
|
tslint = require('gulp-tslint'),
|
||||||
typings = require('gulp-typings'),
|
|
||||||
filter = require('gulp-filter'),
|
filter = require('gulp-filter'),
|
||||||
shell = require('gulp-shell'),
|
shell = require('gulp-shell'),
|
||||||
exec = require('child_process').exec;
|
exec = require('child_process').exec;
|
||||||
@ -25,13 +25,9 @@ function versionBump(semver) {
|
|||||||
.pipe(tag_version());
|
.pipe(tag_version());
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task('typings', function() {
|
gulp.task('compile', function(){
|
||||||
return gulp.src('./typings.json').pipe(typings());
|
var tsProject = ts.createProject('./tsconfig.json');
|
||||||
});
|
return tsProject.src().pipe(tsProject()).js.pipe(gulp.dest('out'));
|
||||||
|
|
||||||
gulp.task('typings-vscode-definitions', ['typings'], function() {
|
|
||||||
// add vscode definitions
|
|
||||||
return gulp.src('./typings/index.d.ts').pipe(gulp.dest('./typings'));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('tslint', function() {
|
gulp.task('tslint', function() {
|
||||||
@ -76,10 +72,6 @@ function runPrettier(command) {
|
|||||||
|
|
||||||
gulp.task('default', ['prettier', 'tslint', 'compile']);
|
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() {
|
gulp.task('patch', ['default'], function() {
|
||||||
return versionBump('patch');
|
return versionBump('patch');
|
||||||
});
|
});
|
||||||
|
1179
package-lock.json
generated
1179
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -575,20 +575,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"vscode:prepublish": "tsc -p ./",
|
"vscode:prepublish": "gulp compile",
|
||||||
"compile": "tsc -watch -p ./",
|
|
||||||
"test": "node ./node_modules/vscode/bin/test",
|
"test": "node ./node_modules/vscode/bin/test",
|
||||||
"postinstall": "node ./node_modules/vscode/bin/install && gulp init"
|
"postinstall": "node ./node_modules/vscode/bin/install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clipboardy": "^1.2.2",
|
"clipboardy": "^1.2.2",
|
||||||
"diff-match-patch": "^1.0.0",
|
"diff-match-patch": "^1.0.0",
|
||||||
|
"gulp-typescript": "^3.2.4",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"neovim-client": "^2.1.0",
|
"neovim-client": "^2.1.0",
|
||||||
"promised-neovim-client": "^2.0.2",
|
"promised-neovim-client": "^2.0.2",
|
||||||
"untildify": "^3.0.2"
|
"untildify": "^3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"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/mocha": "^2.2.47",
|
||||||
"@types/node": "^9.4.0",
|
"@types/node": "^9.4.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
@ -598,7 +602,6 @@
|
|||||||
"gulp-shell": "^0.6.5",
|
"gulp-shell": "^0.6.5",
|
||||||
"gulp-tag-version": "^1.3.1",
|
"gulp-tag-version": "^1.3.1",
|
||||||
"gulp-tslint": "^8.1.2",
|
"gulp-tslint": "^8.1.2",
|
||||||
"gulp-typings": "^2.0.4",
|
|
||||||
"merge-stream": "^1.0.1",
|
"merge-stream": "^1.0.1",
|
||||||
"mocha": "^5.0.0",
|
"mocha": "^5.0.0",
|
||||||
"prettier": "^1.10.2",
|
"prettier": "^1.10.2",
|
||||||
|
@ -162,7 +162,7 @@ class Remapper implements IRemapper {
|
|||||||
|
|
||||||
private _longestKeySequence(): number {
|
private _longestKeySequence(): number {
|
||||||
if (this._remappings.length > 0) {
|
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 {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ export class HistoryTracker {
|
|||||||
* Retrieves a mark.
|
* Retrieves a mark.
|
||||||
*/
|
*/
|
||||||
getMark(markName: string): IMark {
|
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[] {
|
getMarks(): IMark[] {
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"alwaysStrict": true
|
"alwaysStrict": true,
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
".vscode-test"
|
"!node_modules/@types"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
11
typings.json
11
typings.json
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user