From 7a70ba02ee0179465b88b32d73e82d789ebd90d2 Mon Sep 17 00:00:00 2001 From: ezolenko Date: Fri, 10 Feb 2017 22:57:08 -0700 Subject: [PATCH] - switching to selfrolling, fixing ts errors --- dist/rollup-plugin-typescript2.cjs.js | 37 +++++++++++++++++++-------- dist/rollup-plugin-typescript2.es.js | 35 +++++++++++++++++-------- package.json | 4 +-- rollup.config.js | 2 +- src/index.ts | 4 ++- tsconfig.json | 4 +-- 6 files changed, 58 insertions(+), 28 deletions(-) diff --git a/dist/rollup-plugin-typescript2.cjs.js b/dist/rollup-plugin-typescript2.cjs.js index b7e697c..b62fb85 100644 --- a/dist/rollup-plugin-typescript2.cjs.js +++ b/dist/rollup-plugin-typescript2.cjs.js @@ -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()); diff --git a/dist/rollup-plugin-typescript2.es.js b/dist/rollup-plugin-typescript2.es.js index 9d73f06..09c2b3f 100644 --- a/dist/rollup-plugin-typescript2.es.js +++ b/dist/rollup-plugin-typescript2.es.js @@ -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, diff --git a/package.json b/package.json index 9c87003..e823277 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rollup.config.js b/rollup.config.js index 84f1099..64b1ff1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,4 @@ -import ts from '@alexlur/rollup-plugin-typescript'; +import ts from 'rollup-plugin-typescript2'; const pkg = require('./package.json'); diff --git a/src/index.ts b/src/index.ts index e9bfa9c..8ff8425 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 { diff --git a/tsconfig.json b/tsconfig.json index 26ac9c0..0d1de9d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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" ] } \ No newline at end of file