Skip to content

Commit

Permalink
Move gatsby-link into gatsby (#3864)
Browse files Browse the repository at this point in the history
* move Link component from gatsby-link to gatsby package

This change is mostly copying the files from `gatsby-link` package to `gatsby` package. Have added a missing dependency (prop-types) and changed the `main` file to `dist/index.js` in gatsby's package.json.

* add TypeScript definition for Link component

Just copying over index.d.ts from `gatsby-link` package to `gatsby` and removing default export as we don't export `Link` component as the default one.

* delete babelrc from gatsby package

existing babel setup should already handle this!

* revert moving gatsby-link source to gatsby

* browser.js to export link components
  • Loading branch information
tsriram authored and KyleAMathews committed Feb 7, 2018
1 parent 2f489ad commit 4763bbd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
3 changes: 2 additions & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
],
"license": "MIT",
"main": "index.js",
"browser": "dist/browser.js",
"repository": {
"type": "git",
"url": "git+https://github.com/gatsbyjs/gatsby.git"
Expand All @@ -160,4 +161,4 @@
"test-coverage": "node_modules/.bin/nyc --reporter=lcov --reporter=text npm test",
"watch": "rimraf dist && mkdir dist && npm run build:internal-plugins && npm run build:rawfiles && npm run build:src -- --watch"
}
}
}
3 changes: 3 additions & 0 deletions packages/gatsby/src/browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Link, { withPrefix, navigateTo } from 'gatsby-link'

export { Link, withPrefix, navigateTo }
18 changes: 1 addition & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5298,22 +5298,6 @@ gatsby-remark-smartypants@canary:
retext-smartypants "^2.0.0"
unist-util-visit "^1.1.1"

gatsby-source-filesystem@^1.5.15:
version "1.5.15"
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.15.tgz#26278e00101f03c279f4f0bdd285420ff561e8b2"
dependencies:
babel-cli "^6.26.0"
babel-runtime "^6.26.0"
bluebird "^3.5.0"
chokidar "^1.7.0"
fs-extra "^4.0.1"
got "^7.1.0"
md5-file "^3.1.1"
mime "^1.3.6"
pretty-bytes "^4.0.2"
slash "^1.0.0"
valid-url "^1.0.9"

gatsby-source-filesystem@canary:
version "2.0.0-alpha.3f307d61"
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-2.0.0-alpha.3f307d61.tgz#3b57ce8e634cba2e2b997be1917bce28b951d235"
Expand Down Expand Up @@ -8733,7 +8717,7 @@ mime@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"

mime@^1.2.11, mime@^1.3.4, mime@^1.3.6, mime@^1.4.1, mime@^1.5.0:
mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"

Expand Down

0 comments on commit 4763bbd

Please sign in to comment.