gatsby-plugin-typescript
Advanced tools
Comparing version 1.0.0-alpha12-alpha.545e4a03 to 1.0.0-alpha12-alpha.d37d5d32
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { | ||
var _stringify = require('babel-runtime/core-js/json/stringify'); | ||
var _stringify = require("babel-runtime/core-js/json/stringify"); | ||
var _stringify2 = _interopRequireDefault(_stringify); | ||
var _assign = require('babel-runtime/core-js/object/assign'); | ||
var _assign = require("babel-runtime/core-js/object/assign"); | ||
@@ -20,3 +20,3 @@ var _assign2 = _interopRequireDefault(_assign); | ||
var _typescript = require('typescript'); | ||
var _typescript = require("typescript"); | ||
@@ -27,9 +27,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var compilerDefaults = { | ||
target: 'esnext', | ||
target: "esnext", | ||
experimentalDecorators: true, | ||
jsx: 'react' | ||
jsx: "react" | ||
}; | ||
function resolvableExtensions(ctx) { | ||
return ['.ts', '.tsx']; | ||
return [".ts", ".tsx"]; | ||
} | ||
@@ -42,3 +42,5 @@ | ||
var copts = (0, _assign2.default)(compilerDefaults, compilerOptions, { module: 'commonjs' }); | ||
var copts = (0, _assign2.default)(compilerDefaults, compilerOptions, { | ||
module: "commonjs" | ||
}); | ||
// React-land is rather undertyped; nontrivial TS projects will most likely | ||
@@ -49,3 +51,6 @@ // error (i.e., not build) at something or other. | ||
// in the project directory. | ||
config.loader('typescript', { test, loader: 'ts-loader?' + (0, _stringify2.default)(opts) }); | ||
config.loader("typescript", { | ||
test, | ||
loader: "ts-loader?" + (0, _stringify2.default)(opts) | ||
}); | ||
} | ||
@@ -60,5 +65,8 @@ | ||
var copts = (0, _assign2.default)(compilerDefaults, compilerOptions, { target: 'esnext', module: 'es6' }); | ||
var copts = (0, _assign2.default)(compilerDefaults, compilerOptions, { | ||
target: "esnext", | ||
module: "es6" | ||
}); | ||
// return the transpiled source if it's TypeScript, otherwise null | ||
return test.test(filename) ? (0, _typescript.transpileModule)(contents, { compilerOptions: copts }).outputText : null; | ||
} |
{ | ||
"name": "gatsby-plugin-typescript", | ||
"version": "1.0.0-alpha12-alpha.545e4a03", | ||
"version": "1.0.0-alpha12-alpha.d37d5d32", | ||
"description": "Adds TypeScript support for Gatsby layouts and pages.", | ||
@@ -5,0 +5,0 @@ "author": "Kyle Mathews <mathews.kyle@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4045
63