gatsby-link
Advanced tools
Comparing version 1.0.0-alpha11-alpha.268aa2cc to 1.0.0-alpha11-alpha.2a65312c
23
index.js
@@ -1,10 +0,10 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _Link = require('react-router/lib/Link'); | ||
var _Link = require("react-router/lib/Link"); | ||
@@ -15,3 +15,3 @@ var _Link2 = _interopRequireDefault(_Link); | ||
var linkPrefix = ''; | ||
var linkPrefix = ""; | ||
if (__PREFIX_LINKS__) { | ||
@@ -25,3 +25,3 @@ linkPrefix = __LINK_PREFIX__; | ||
var GatsbyLink = _react2.default.createClass({ | ||
displayName: 'GatsbyLink', | ||
displayName: "GatsbyLink", | ||
@@ -31,3 +31,2 @@ propTypes: { | ||
}, | ||
componentDidMount: function componentDidMount() { | ||
@@ -38,18 +37,18 @@ var _this = this; | ||
// don't support service workers *cough* Safari/IE *cough*. | ||
if (process.env.NODE_ENV === 'production' && !('serviceWorker' in navigator)) { | ||
if (process.env.NODE_ENV === "production" && !("serviceWorker" in navigator)) { | ||
(function () { | ||
var routes = window.gatsbyRootRoute; | ||
var _require = require('history'), | ||
var _require = require("history"), | ||
createMemoryHistory = _require.createMemoryHistory; | ||
var matchRoutes = require('react-router/lib/matchRoutes'); | ||
var getComponents = require('react-router/lib/getComponents'); | ||
var matchRoutes = require("react-router/lib/matchRoutes"); | ||
var getComponents = require("react-router/lib/getComponents"); | ||
var createLocation = createMemoryHistory().createLocation; | ||
if (typeof routes !== 'undefined') { | ||
if (typeof routes !== "undefined") { | ||
matchRoutes([routes], createLocation(_this.props.to), function (error, nextState) { | ||
getComponents(nextState, function () { | ||
return console.log('loaded assets for ' + _this.props.to); | ||
return console.log("loaded assets for " + _this.props.to); | ||
}); | ||
@@ -56,0 +55,0 @@ }); |
{ | ||
"name": "gatsby-link", | ||
"version": "1.0.0-alpha11-alpha.268aa2cc", | ||
"version": "1.0.0-alpha11-alpha.2a65312c", | ||
"description": "An enhanced Link component for Gatsby sites with support for resource prefetching", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4528
5
0
37