Support ESM
This commit is contained in:
Родитель
cd0d35b031
Коммит
58e4d47878
|
@ -1,6 +1,6 @@
|
|||
.vscode/
|
||||
lib/test/
|
||||
lib/*.map
|
||||
lib/**/test/
|
||||
lib/**/*.map
|
||||
src/
|
||||
test/
|
||||
.eslintrc
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/vscode-languageserver-node/issues"
|
||||
},
|
||||
"main": "./lib/main.js",
|
||||
"typings": "./lib/main",
|
||||
"main": "./lib/umd/main.js",
|
||||
"typings": "./lib/umd/main",
|
||||
"module": "./lib/esm/main.js",
|
||||
"scripts": {
|
||||
"prepublish": "npm run compile && npm test",
|
||||
"postpublish": "node ../build/npm/post-publish.js",
|
||||
"compile": "node ../build/bin/tsc -p ./tsconfig.json",
|
||||
"compile": "node ../build/bin/tsc -p ./tsconfig.json && node ../build/bin/tsc -p ./tsconfig.esm.json",
|
||||
"watch": "node ../build/bin/tsc -w -p ./tsconfig.json",
|
||||
"test": "node ../node_modules/mocha/bin/_mocha"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import assert = require('assert');
|
||||
import * as assert from 'assert';
|
||||
import { TextDocument, Range, Position } from '../main';
|
||||
|
||||
suite('Text Document Lines Model Validator', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
lib/test
|
||||
lib/umd/test
|
||||
--recursive
|
||||
--ui tdd
|
||||
--useColors true
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es6",
|
||||
"sourceMap": false,
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"lib": [ "es2015" ],
|
||||
"outDir": "lib/esm",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"lib": [ "es2015" ],
|
||||
"outDir": "lib",
|
||||
"outDir": "lib/umd",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": [
|
||||
|
|
Загрузка…
Ссылка в новой задаче