Socket
Socket
Sign inDemoInstall

gatsby-plugin-typescript

Package Overview
Dependencies
Maintainers
1
Versions
600
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-typescript - npm Package Compare versions

Comparing version 1.0.0-alpha12-alpha.545e4a03 to 1.0.0-alpha12-alpha.81355cc0

28

gatsby-node.js

@@ -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.81355cc0",
"description": "Adds TypeScript support for Gatsby layouts and pages.",

@@ -5,0 +5,0 @@ "author": "Kyle Mathews <mathews.kyle@gmail.com>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc