- switching to selfrolling, fixing ts errors

This commit is contained in:
ezolenko 2017-02-10 22:57:08 -07:00
parent 0a13321fc6
commit 7a70ba02ee
6 changed files with 58 additions and 28 deletions

View File

@ -6,20 +6,33 @@ var ts = require('typescript');
var _ = require('lodash');
var graph = require('graphlib');
var hash = require('object-hash');
var rollupPluginutils = require('rollup-pluginutils');
var path = require('path');
var colors = require('colors/safe');
const __assign = Object.assign || function (target) {
for (var source, i = 1; i < arguments.length; i++) {
source = arguments[i];
for (var prop in source) {
if (Object.prototype.hasOwnProperty.call(source, prop)) {
target[prop] = source[prop];
}
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var __assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return target;
return t;
};
var VerbosityLevel;
@ -288,6 +301,8 @@ var Cache = (function () {
return Cache;
}());
// tslint:disable-next-line:no-var-requires
var createFilter = require("rollup-pluginutils").createFilter;
function getOptionsOverrides() {
return {
module: ts.ModuleKind.ES2015,
@ -354,7 +369,7 @@ function typescript(options) {
include: ["*.ts+(|x)", "**/*.ts+(|x)"],
exclude: ["*.d.ts", "**/*.d.ts"],
});
var filter$$1 = rollupPluginutils.createFilter(options.include, options.exclude);
var filter$$1 = createFilter(options.include, options.exclude);
var parsedConfig = parseTsConfig();
var servicesHost = new LanguageServiceHost(parsedConfig);
var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry());

View File

@ -9,22 +9,35 @@ import { Graph, alg } from 'graphlib';
import * as graph from 'graphlib';
import { sha1 } from 'object-hash';
import * as hash from 'object-hash';
import { createFilter } from 'rollup-pluginutils';
import { dirname, sep } from 'path';
import * as path from 'path';
import { red, yellow } from 'colors/safe';
import * as colors from 'colors/safe';
const __assign = Object.assign || function (target) {
for (var source, i = 1; i < arguments.length; i++) {
source = arguments[i];
for (var prop in source) {
if (Object.prototype.hasOwnProperty.call(source, prop)) {
target[prop] = source[prop];
}
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var __assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return target;
return t;
};
var VerbosityLevel;
@ -293,6 +306,8 @@ var Cache = (function () {
return Cache;
}());
// tslint:disable-next-line:no-var-requires
var createFilter = require("rollup-pluginutils").createFilter;
function getOptionsOverrides() {
return {
module: ModuleKind.ES2015,

View File

@ -1,6 +1,6 @@
{
"name": "rollup-plugin-typescript2",
"version": "0.0.1",
"version": "0.1.0",
"description": "Seamless integration between Rollup and TypeScript. Now with errors.",
"main": "dist/rollup-plugin-typescript2.cjs.js",
"module": "dist/rollup-plugin-typescript2.es.js",
@ -36,7 +36,7 @@
"tslib": "^1.5.0"
},
"devDependencies": {
"@alexlur/rollup-plugin-typescript": "^0.8.1",
"rollup-plugin-typescript2": "^0.0.1",
"@types/colors": "^1.1.1",
"@types/fs-extra": "0.0.37",
"@types/graphlib": "^2.1.3",

View File

@ -1,4 +1,4 @@
import ts from '@alexlur/rollup-plugin-typescript';
import ts from 'rollup-plugin-typescript2';
const pkg = require('./package.json');

View File

@ -2,12 +2,14 @@ import { IContext, ConsoleContext, IRollupContext, VerbosityLevel } from "./cont
import { LanguageServiceHost } from "./host";
import { Cache, ICode, IDiagnostics } from "./cache";
import * as ts from "typescript";
import { createFilter } from "rollup-pluginutils";
import * as fs from "fs-extra";
import * as path from "path";
import * as _ from "lodash";
import * as colors from "colors/safe";
// tslint:disable-next-line:no-var-requires
const createFilter = require("rollup-pluginutils").createFilter;
function getOptionsOverrides(): ts.CompilerOptions
{
return {

View File

@ -3,10 +3,9 @@
"module": "es6",
"target": "es5",
"noImplicitAny": true,
"sourceMap": false,
"sourceMap": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"allowJs": true,
"noImplicitThis": true,
"diagnostics": true,
"listFiles": true,
@ -16,7 +15,6 @@
"strictNullChecks": true
},
"include": [
"typings/**/*.d.ts",
"src/**/*.ts"
]
}