Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
-> 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Aug 17, 2016
1 parent 770b224 commit 663a66a
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 80 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typescript-helpers.js
37 changes: 37 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
root: true

env:
es6: true
browser: true
node: true
mocha: true

parserOptions:
ecmaVersion: 6
sourceType: "module"

extends: "eslint:recommended"

rules:
indent: [ 2, "tab", { SwitchCase: 1 } ]
semi: [ 2, "always" ]
keyword-spacing: [ 2, { before: true, after: true } ]
space-before-blocks: [ 2, "always" ]
space-before-function-paren: [ 2, "always" ]
no-mixed-spaces-and-tabs: [ 2, "smart-tabs" ]
no-cond-assign: 0
no-unused-vars: 2
object-shorthand: [ 2, "always" ]
no-const-assign: 2
no-class-assign: 2
no-this-before-super: 2
no-var: 2
no-unreachable: 2
valid-typeof: 2
quote-props: [ 2, "as-needed" ]
one-var: [ 2, "never" ]
prefer-arrow-callback: 2
prefer-const: [ 2, { destructuring: "all" } ]
arrow-spacing: 2
no-irregular-whitespace: 0
no-console: 0
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# rollup-plugin-typescript changelog

## 0.8.1

* Ignore typescript-helpers in source maps ([#61](https://github.com/rollup/rollup-plugin-typescript/issues/61))

## 0.8.0

* Fix the rollup breaking change with paths ([#52](https://github.com/rollup/rollup-plugin-typescript/issues/52))
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "rollup-plugin-typescript",
"version": "0.8.0",
"version": "0.8.1",
"description": "Seamless integration between Rollup and TypeScript.",
"main": "dist/rollup-plugin-typescript.cjs.js",
"module": "dist/rollup-plugin-typescript.es.js",
"jsnext:main": "dist/rollup-plugin-typescript.es.js",
"files": [
"dist",
"src",
"README"
"src"
],
"keywords": [
"rollup-plugin",
Expand All @@ -19,13 +18,13 @@
"homepage": "https://github.com/rollup/rollup-plugin-typescript",
"author": "Oskar Segersvärd",
"scripts": {
"test": "mocha --harmony",
"prepublish": "npm run test",
"prebuild": "rimraf dist/*",
"build": "rollup -c",
"lint": "eslint src test/*.js",
"pretest": "npm run build",
"build:cjs": "rollup -c -f cjs -o dist/rollup-plugin-typescript.cjs.js",
"build:es": "rollup -c -o dist/rollup-plugin-typescript.es.js",
"build": "npm run build:cjs && npm run build:es",
"prebuild": "rimraf dist/*"
"test": "mocha --compilers js:buble/register",
"posttest": "npm run lint",
"prepublish": "npm run test"
},
"dependencies": {
"compare-versions": "2.0.1",
Expand All @@ -35,10 +34,12 @@
"typescript": "^1.8.9"
},
"devDependencies": {
"buble": "^0.13.1",
"eslint": "^2.13.1",
"mocha": "^3.0.0",
"rimraf": "^2.5.4",
"rollup": "^0.34.3",
"rollup-plugin-buble": "^0.12.1"
"rollup-plugin-buble": "^0.13.0"
},
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import buble from 'rollup-plugin-buble';

var pkg = require( './package.json' );

export default {
entry: 'src/index.js',

Expand All @@ -15,5 +17,16 @@ export default {

plugins: [
buble()
],

targets: [
{
format: 'cjs',
dest: pkg.main
},
{
format: 'es',
dest: pkg.module
}
]
};
2 changes: 1 addition & 1 deletion src/fixExportClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function fix ( code, id ) {
}

// To keep source maps intact, append the injected exports last.
code += `\nexport { ${ name } };`
code += `\nexport { ${ name } };`;
}

return code;
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function typescript ( options ) {

if ( !importer ) return null;

var result;
let result;

importer = importer.split('\\').join('/');

Expand All @@ -104,7 +104,7 @@ export default function typescript ( options ) {
return helpersSource;
}
},

transform ( code, id ) {
if ( !filter( id ) ) return null;

Expand All @@ -121,7 +121,7 @@ export default function typescript ( options ) {
let fatalError = false;

diagnostics.forEach( diagnostic => {
var message = typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
const message = typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n');

if ( diagnostic.file ) {
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( diagnostic.start );
Expand Down
8 changes: 4 additions & 4 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
readFileSync
} from 'fs';

export function getDefaultOptions() {
export function getDefaultOptions () {
return {
noEmitHelpers: true,
module: 'es2015',
Expand All @@ -16,7 +16,7 @@ export function getDefaultOptions() {
// Gratefully lifted from 'look-up', due to problems using it directly:
// https://github.com/jonschlinkert/look-up/blob/master/index.js
// MIT Licenced
function findFile( cwd, filename ) {
function findFile ( cwd, filename ) {
let fp = cwd ? ( cwd + '/' + filename ) : filename;

if ( existsSync( fp ) ) {
Expand All @@ -37,7 +37,7 @@ function findFile( cwd, filename ) {
return null;
}

export function compilerOptionsFromTsConfig( typescript ) {
export function compilerOptionsFromTsConfig ( typescript ) {
const cwd = process.cwd();

const tsconfig = typescript.readConfigFile( findFile( cwd, 'tsconfig.json' ), path => readFileSync( path, 'utf8' ) );
Expand All @@ -47,7 +47,7 @@ export function compilerOptionsFromTsConfig( typescript ) {
return tsconfig.config.compilerOptions;
}

export function adjustCompilerOptions( typescript, options ) {
export function adjustCompilerOptions ( typescript, options ) {
// Set `sourceMap` to `inlineSourceMap` if it's a boolean
// under the assumption that both are never specified simultaneously.
if ( typeof options.inlineSourceMap === 'boolean' ) {
Expand Down
Loading

0 comments on commit 663a66a

Please sign in to comment.