WIP - add extractor, generate snippet_data
This commit is contained in:
3
node_modules/gatsby-plugin-page-creator/.babelrc
generated
vendored
Normal file
3
node_modules/gatsby-plugin-page-creator/.babelrc
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": [["babel-preset-gatsby-package", { "browser": true }]]
|
||||
}
|
||||
182
node_modules/gatsby-plugin-page-creator/CHANGELOG.md
generated
vendored
Normal file
182
node_modules/gatsby-plugin-page-creator/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.1.5](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.1.4...gatsby-plugin-page-creator@2.1.5) (2019-07-13)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.1.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.1.3...gatsby-plugin-page-creator@2.1.4) (2019-07-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- correct links in package changelogs ([#15630](https://github.com/gatsbyjs/gatsby/issues/15630)) ([d07b9dd](https://github.com/gatsbyjs/gatsby/commit/d07b9dd))
|
||||
|
||||
## [2.1.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.1.2...gatsby-plugin-page-creator@2.1.3) (2019-07-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.1.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.1.1...gatsby-plugin-page-creator@2.1.2) (2019-07-01)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.1.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.1.0...gatsby-plugin-page-creator@2.1.1) (2019-06-24)
|
||||
|
||||
### Features
|
||||
|
||||
- **gatsby-page-utils:** extract logic for watching a directory from gatsby-page-creator so can reuse for custom page creation ([#14051](https://github.com/gatsbyjs/gatsby/issues/14051)) ([68d9d6f](https://github.com/gatsbyjs/gatsby/commit/68d9d6f))
|
||||
|
||||
# [2.1.0](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.13...gatsby-plugin-page-creator@2.1.0) (2019-06-20)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.0.13](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.12...gatsby-plugin-page-creator@2.0.13) (2019-05-14)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.0.12](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.11...gatsby-plugin-page-creator@2.0.12) (2019-03-26)
|
||||
|
||||
### Features
|
||||
|
||||
- **gatsby-plugin-page-creator:** add ignore support via plugin options, fix test file ignores on Windows ([#11304](https://github.com/gatsbyjs/gatsby/issues/11304)) ([9fdc223](https://github.com/gatsbyjs/gatsby/commit/9fdc223)), closes [/github.com/gatsbyjs/gatsby/blob/026d2a956296cb01936bcf45d2be1066dd844d00/packages/gatsby-plugin-page-creator/src/gatsby-node.js#L51-L66](https://github.com/gatsbyjs/gatsby/issues/L51-L66) [/github.com/gatsbyjs/gatsby/blob/026d2a956296cb01936bcf45d2be1066dd844d00/packages/gatsby-plugin-page-creator/src/validate-path.js#L11](https://github.com/gatsbyjs/gatsby/issues/L11) [#11168](https://github.com/gatsbyjs/gatsby/issues/11168)
|
||||
|
||||
## [2.0.11](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.10...gatsby-plugin-page-creator@2.0.11) (2019-03-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **gatsby-source-filesystem:** pin chokidar@2.1.2 to fix unix issues ([#12759](https://github.com/gatsbyjs/gatsby/issues/12759)) ([0ea1505](https://github.com/gatsbyjs/gatsby/commit/0ea1505))
|
||||
|
||||
## [2.0.10](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.9...gatsby-plugin-page-creator@2.0.10) (2019-03-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.0.9](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.8...gatsby-plugin-page-creator@2.0.9) (2019-03-05)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.0.8](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.7...gatsby-plugin-page-creator@2.0.8) (2019-02-22)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
## [2.0.7](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.6...gatsby-plugin-page-creator@2.0.7) (2019-02-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **gatsby-plugin-page-creator:** Fix regular expression for validate path ([#11862](https://github.com/gatsbyjs/gatsby/issues/11862)) ([898873d](https://github.com/gatsbyjs/gatsby/commit/898873d))
|
||||
|
||||
## [2.0.6](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.5...gatsby-plugin-page-creator@2.0.6) (2019-02-01)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.5"></a>
|
||||
|
||||
## [2.0.5](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.4...gatsby-plugin-page-creator@2.0.5) (2018-11-29)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.4"></a>
|
||||
|
||||
## [2.0.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.3...gatsby-plugin-page-creator@2.0.4) (2018-11-08)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.3"></a>
|
||||
|
||||
## [2.0.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.2...gatsby-plugin-page-creator@2.0.3) (2018-11-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **gatsby-plugin-page-creator:** ensure that **tests** directory is actually ignored ([#9720](https://github.com/gatsbyjs/gatsby/issues/9720)) ([a6d17d8](https://github.com/gatsbyjs/gatsby/commit/a6d17d8)), closes [#9629](https://github.com/gatsbyjs/gatsby/issues/9629)
|
||||
|
||||
<a name="2.0.2"></a>
|
||||
|
||||
## [2.0.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.1...gatsby-plugin-page-creator@2.0.2) (2018-10-29)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.1"></a>
|
||||
|
||||
## [2.0.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.5...gatsby-plugin-page-creator@2.0.1) (2018-10-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- ignore dot files in page creator plugin ([#8573](https://github.com/gatsbyjs/gatsby/issues/8573)) ([482416b](https://github.com/gatsbyjs/gatsby/commit/482416b))
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
|
||||
# [2.0.0](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.5...gatsby-plugin-page-creator@2.0.0) (2018-09-17)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.5"></a>
|
||||
|
||||
# [2.0.0-rc.5](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.4...gatsby-plugin-page-creator@2.0.0-rc.5) (2018-09-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.4"></a>
|
||||
|
||||
# [2.0.0-rc.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.3...gatsby-plugin-page-creator@2.0.0-rc.4) (2018-09-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.3"></a>
|
||||
|
||||
# [2.0.0-rc.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.2...gatsby-plugin-page-creator@2.0.0-rc.3) (2018-09-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.2"></a>
|
||||
|
||||
# [2.0.0-rc.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.1...gatsby-plugin-page-creator@2.0.0-rc.2) (2018-09-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.1"></a>
|
||||
|
||||
# [2.0.0-rc.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-rc.0...gatsby-plugin-page-creator@2.0.0-rc.1) (2018-08-29)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-rc.0"></a>
|
||||
|
||||
# [2.0.0-rc.0](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.5...gatsby-plugin-page-creator@2.0.0-rc.0) (2018-08-21)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.5"></a>
|
||||
|
||||
# [2.0.0-beta.5](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.4...gatsby-plugin-page-creator@2.0.0-beta.5) (2018-07-21)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.4"></a>
|
||||
|
||||
# [2.0.0-beta.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.3...gatsby-plugin-page-creator@2.0.0-beta.4) (2018-07-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.3"></a>
|
||||
|
||||
# [2.0.0-beta.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.2...gatsby-plugin-page-creator@2.0.0-beta.3) (2018-07-11)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.2"></a>
|
||||
|
||||
# [2.0.0-beta.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.1...gatsby-plugin-page-creator@2.0.0-beta.2) (2018-06-20)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.1"></a>
|
||||
|
||||
# [2.0.0-beta.1](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@2.0.0-beta.0...gatsby-plugin-page-creator@2.0.0-beta.1) (2018-06-17)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
|
||||
<a name="2.0.0-beta.0"></a>
|
||||
|
||||
# [2.0.0-beta.0](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-page-creator@1.0.1...gatsby-plugin-page-creator@2.0.0-beta.0) (2018-06-17)
|
||||
|
||||
**Note:** Version bump only for package gatsby-plugin-page-creator
|
||||
22
node_modules/gatsby-plugin-page-creator/LICENSE
generated
vendored
Normal file
22
node_modules/gatsby-plugin-page-creator/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Gatsbyjs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
104
node_modules/gatsby-plugin-page-creator/README.md
generated
vendored
Normal file
104
node_modules/gatsby-plugin-page-creator/README.md
generated
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
# gatsby-plugin-page-creator
|
||||
|
||||
Gatsby plugin that automatically creates pages from React components in specified directories. Gatsby
|
||||
includes this plugin automatically in all sites for creating pages from components in `src/pages`.
|
||||
|
||||
You may include another instance of this plugin if you'd like to create additional "pages" directories.
|
||||
|
||||
With this plugin, _any_ file that lives in the the specified pages folder (e.g. the default `src/pages`) or subfolders will be expected to export a React Component to generate a Page. The following files are automatically excluded:
|
||||
|
||||
- `template-*`
|
||||
- `__tests__/*`
|
||||
- `*.test.jsx?`
|
||||
- `*.spec.jsx?`
|
||||
- `*.d.tsx?`
|
||||
- `*.json`
|
||||
- `*.yaml`
|
||||
- `_*`
|
||||
- `.*`
|
||||
|
||||
To exclude custom patterns, see [Ignoring Specific Files](#ignoring-specific-files)
|
||||
|
||||
## Install
|
||||
|
||||
`npm install --save gatsby-plugin-page-creator`
|
||||
|
||||
## How to use
|
||||
|
||||
```javascript
|
||||
// gatsby-config.js
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
// You can have multiple instances of this plugin
|
||||
// to create pages from React components in different directories.
|
||||
//
|
||||
// The following sets up the pattern of having multiple
|
||||
// "pages" directories in your project
|
||||
{
|
||||
resolve: `gatsby-plugin-page-creator`,
|
||||
options: {
|
||||
path: `${__dirname}/src/account/pages`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-page-creator`,
|
||||
options: {
|
||||
path: `${__dirname}/src/settings/pages`,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### Ignoring Specific Files
|
||||
|
||||
#### Shorthand
|
||||
|
||||
```javascript
|
||||
// The following example will disable the `/blog` index page
|
||||
|
||||
// gatsby-config.js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
resolve: `gatsby-plugin-page-creator`,
|
||||
options: {
|
||||
path: `${__dirname}/src/indexes/pages`,
|
||||
ignore: [`blog.(js|ts)?(x)`],
|
||||
// See pattern syntax recognized by micromatch
|
||||
// https://www.npmjs.com/package/micromatch#matching-features
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
**NOTE**: The above code snippet will only stop the creation of the `/blog` page, which is defined as a React component.
|
||||
This plugin does not affect programmatically generated pages from the [createPagesAPI](https://www.gatsbyjs.org/docs/node-apis/#createPages).
|
||||
|
||||
#### Ignore Options
|
||||
|
||||
```javascript
|
||||
// The following example will ignore pages using case-insensitive matching
|
||||
|
||||
// gatsby-config.js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
resolve: `gatsby-plugin-page-creator`,
|
||||
options: {
|
||||
path: `${__dirname}/src/examples/pages`,
|
||||
ignore: {
|
||||
// Example: Ignore `file.example.js`, `dir/s/file.example.tsx`
|
||||
patterns: [`**/*.example.(js|ts)?(x)`],
|
||||
// Example: Match both `file.example.js` and `file.EXAMPLE.js`
|
||||
options: { nocase: true },
|
||||
// See all available micromatch options
|
||||
// https://www.npmjs.com/package/micromatch#optionsnocase
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
131
node_modules/gatsby-plugin-page-creator/gatsby-node.js
generated
vendored
Normal file
131
node_modules/gatsby-plugin-page-creator/gatsby-node.js
generated
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
||||
|
||||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
||||
|
||||
var globCB = require("glob");
|
||||
|
||||
var Promise = require("bluebird");
|
||||
|
||||
var _ = require("lodash");
|
||||
|
||||
var systemPath = require("path");
|
||||
|
||||
var existsSync = require("fs-exists-cached").sync;
|
||||
|
||||
var glob = Promise.promisify(globCB);
|
||||
|
||||
var _require = require("gatsby-page-utils"),
|
||||
createPath = _require.createPath,
|
||||
validatePath = _require.validatePath,
|
||||
ignorePath = _require.ignorePath,
|
||||
watchDirectory = _require.watchDirectory; // Path creator.
|
||||
// Auto-create pages.
|
||||
// algorithm is glob /pages directory for js/jsx/cjsx files *not*
|
||||
// underscored. Then create url w/ our path algorithm *unless* user
|
||||
// takes control of that page component in gatsby-node.
|
||||
|
||||
|
||||
exports.createPagesStatefully =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var _ref3 = (0, _asyncToGenerator2.default)(
|
||||
/*#__PURE__*/
|
||||
_regenerator.default.mark(function _callee(_ref, _ref2, doneCb) {
|
||||
var store, actions, reporter, pagesPath, _ref2$pathCheck, pathCheck, ignore, createPage, deletePage, program, exts, pagesDirectory, pagesGlob, files;
|
||||
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
store = _ref.store, actions = _ref.actions, reporter = _ref.reporter;
|
||||
pagesPath = _ref2.path, _ref2$pathCheck = _ref2.pathCheck, pathCheck = _ref2$pathCheck === void 0 ? true : _ref2$pathCheck, ignore = _ref2.ignore;
|
||||
createPage = actions.createPage, deletePage = actions.deletePage;
|
||||
program = store.getState().program;
|
||||
exts = program.extensions.map(function (e) {
|
||||
return "" + e.slice(1);
|
||||
}).join(",");
|
||||
|
||||
if (!pagesPath) {
|
||||
reporter.panic("\n \"path\" is a required option for gatsby-plugin-page-creator\n\n See docs here - https://www.gatsbyjs.org/plugins/gatsby-plugin-page-creator/\n ");
|
||||
} // Validate that the path exists.
|
||||
|
||||
|
||||
if (pathCheck && !existsSync(pagesPath)) {
|
||||
reporter.panic("\n The path passed to gatsby-plugin-page-creator does not exist on your file system:\n\n " + pagesPath + "\n\n Please pick a path to an existing directory.\n ");
|
||||
}
|
||||
|
||||
pagesDirectory = systemPath.resolve(process.cwd(), pagesPath);
|
||||
pagesGlob = "**/*.{" + exts + "}"; // Get initial list of files.
|
||||
|
||||
_context.next = 11;
|
||||
return glob(pagesGlob, {
|
||||
cwd: pagesPath
|
||||
});
|
||||
|
||||
case 11:
|
||||
files = _context.sent;
|
||||
files.forEach(function (file) {
|
||||
return _createPage(file, pagesDirectory, createPage, ignore);
|
||||
});
|
||||
watchDirectory(pagesPath, pagesGlob, function (addedPath) {
|
||||
if (!_.includes(files, addedPath)) {
|
||||
_createPage(addedPath, pagesDirectory, createPage, ignore);
|
||||
|
||||
files.push(addedPath);
|
||||
}
|
||||
}, function (removedPath) {
|
||||
// Delete the page for the now deleted component.
|
||||
var componentPath = systemPath.join(pagesDirectory, removedPath);
|
||||
store.getState().pages.forEach(function (page) {
|
||||
if (page.component === componentPath) {
|
||||
deletePage({
|
||||
path: createPath(removedPath),
|
||||
component: componentPath
|
||||
});
|
||||
}
|
||||
});
|
||||
files = files.filter(function (f) {
|
||||
return f !== removedPath;
|
||||
});
|
||||
}).then(function () {
|
||||
return doneCb();
|
||||
});
|
||||
|
||||
case 14:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
return function (_x, _x2, _x3) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
|
||||
var _createPage = function _createPage(filePath, pagesDirectory, createPage, ignore) {
|
||||
// Filter out special components that shouldn't be made into
|
||||
// pages.
|
||||
if (!validatePath(filePath)) {
|
||||
return;
|
||||
} // Filter out anything matching the given ignore patterns and options
|
||||
|
||||
|
||||
if (ignorePath(filePath, ignore)) {
|
||||
return;
|
||||
} // Create page object
|
||||
|
||||
|
||||
var createdPath = createPath(filePath);
|
||||
var page = {
|
||||
path: createdPath,
|
||||
component: systemPath.join(pagesDirectory, filePath) // Add page
|
||||
|
||||
};
|
||||
createPage(page);
|
||||
};
|
||||
1
node_modules/gatsby-plugin-page-creator/index.js
generated
vendored
Normal file
1
node_modules/gatsby-plugin-page-creator/index.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
// noop
|
||||
84
node_modules/gatsby-plugin-page-creator/package.json
generated
vendored
Normal file
84
node_modules/gatsby-plugin-page-creator/package.json
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"_from": "gatsby-plugin-page-creator@^2.1.5",
|
||||
"_id": "gatsby-plugin-page-creator@2.1.5",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-nUcsaJAaMy9UQS66QY0Dys6Xx+2CGG2EVyvDQ4NQ713la62jicOU764Bmi5G7sE2QGgpNoBtUQCW+aE6UMGpLQ==",
|
||||
"_location": "/gatsby-plugin-page-creator",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "gatsby-plugin-page-creator@^2.1.5",
|
||||
"name": "gatsby-plugin-page-creator",
|
||||
"escapedName": "gatsby-plugin-page-creator",
|
||||
"rawSpec": "^2.1.5",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.5"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/",
|
||||
"/gatsby"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-2.1.5.tgz",
|
||||
"_shasum": "723fc0392a67978cab649a402ad88f6f06b74e4c",
|
||||
"_spec": "gatsby-plugin-page-creator@^2.1.5",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code",
|
||||
"author": {
|
||||
"name": "Kyle Mathews",
|
||||
"email": "mathews.kyle@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gatsbyjs/gatsby/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Steven Natera",
|
||||
"email": "tektekpush@gmail.com",
|
||||
"url": "https://twitter.com/stevennatera"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"bluebird": "^3.5.0",
|
||||
"fs-exists-cached": "^1.0.0",
|
||||
"gatsby-page-utils": "^0.0.5",
|
||||
"glob": "^7.1.1",
|
||||
"lodash": "^4.17.14",
|
||||
"micromatch": "^3.1.10"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Gatsby plugin that automatically creates pages from React components in specified directories",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
"babel-preset-gatsby-package": "^0.2.2",
|
||||
"cross-env": "^5.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"gitHead": "930533fccb1e172e01a40f2ce2a8a33d0b8e4d17",
|
||||
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-page-creator#readme",
|
||||
"keywords": [
|
||||
"gatsby",
|
||||
"gatsby-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "gatsby-plugin-page-creator",
|
||||
"peerDependencies": {
|
||||
"gatsby": "^2.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gatsbyjs/gatsby.git",
|
||||
"directory": "packages/gatsby-plugin-page-creator"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel src --out-dir . --ignore **/__tests__",
|
||||
"prepare": "cross-env NODE_ENV=production npm run build",
|
||||
"watch": "babel -w src --out-dir . --ignore **/__tests__"
|
||||
},
|
||||
"version": "2.1.5"
|
||||
}
|
||||
Reference in New Issue
Block a user