;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/i80-loadable-nested/src/PhotoLoadable.js:
--------------------------------------------------------------------------------
1 | import loadable from "@gourmet/react-loadable";
2 |
3 | export default loadable({
4 | loader: () => import("./PhotoPanel")
5 | });
6 |
--------------------------------------------------------------------------------
/tests/loadable/src/LoadableB.jsx:
--------------------------------------------------------------------------------
1 | import loadable from "@gourmet/react-loadable";
2 |
3 | export default loadable({
4 | loader() {
5 | return import("./PanelB");
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/utils/is-stream/gmsrc/isStream.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function isStream(obj) {
4 | return obj && typeof obj === "object" && typeof obj.pipe === "function";
5 | };
6 |
--------------------------------------------------------------------------------
/utils/variables/test/fixture/config.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = userCtx => {
4 | return Promise.resolve({
5 | minify: userCtx.stage === "prod"
6 | });
7 | };
8 |
--------------------------------------------------------------------------------
/docs/reference.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: reference
3 | title: Reference
4 | ---
5 |
6 | ## Title level 2
7 |
8 | ### Title level 3
9 |
10 | ## Title level 2
11 |
12 | ### Title level 3
13 |
--------------------------------------------------------------------------------
/tests/global-css/src/hello.css:
--------------------------------------------------------------------------------
1 | .hello {
2 | font-size: 150%;
3 | font-weight: bold;
4 | border: 10px solid #eee;
5 | padding: 1em;
6 | margin: 5em;
7 | max-width: 20em;
8 | }
9 |
--------------------------------------------------------------------------------
/tests/loadable/src/LoadableA.jsx:
--------------------------------------------------------------------------------
1 | import loadable from "@gourmet/react-loadable";
2 |
3 | export default loadable({
4 | loader: () => {
5 | return import("./PanelA");
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/utils/error/HandledError.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // Include the real source file from `gmsrc` directory to enable the transpilation.
4 | module.exports = require("./gmsrc/HandledError");
5 |
--------------------------------------------------------------------------------
/utils/variables/gmsrc/VarNode.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // Base class for determining a variable node by a single `instanceof`.
4 | class VarNode {
5 | }
6 |
7 | module.exports = VarNode;
8 |
--------------------------------------------------------------------------------
/tests/todo-apollo/src/TodoLoadable.js:
--------------------------------------------------------------------------------
1 | import loadable from "@gourmet/react-loadable";
2 |
3 | export default loadable({
4 | loader() {
5 | return import("./TodoMain");
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/utils/error/NOT_IMPLEMENTED.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const NOT_IMPLEMENTED = {
4 | message: "Not implemented",
5 | code: "NOT_IMPLEMENTED"
6 | };
7 |
8 | module.exports = NOT_IMPLEMENTED;
9 |
--------------------------------------------------------------------------------
/utils/prefix-lines/gmsrc/prefixLines.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function prefixLines(prefix, text) {
4 | return text.split("\n").map(line => prefix + line).join("\n");
5 | };
6 |
--------------------------------------------------------------------------------
/utils/promise-tape/gmsrc/promiseTape.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function promiseTape(fn) {
4 | return function(t) {
5 | fn(t).then(() => t.end(), t.end);
6 | };
7 | };
8 |
--------------------------------------------------------------------------------
/utils/get-exported/gmsrc/getExported.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function getExported(obj, name) {
4 | return name ? obj[name] : (obj && obj.__esModule ? obj.default : obj);
5 | };
6 |
--------------------------------------------------------------------------------
/tests/react-hello/lib/http.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const gourmet = require("@gourmet/client-http");
4 | const run = require("./app");
5 |
6 | run({
7 | serverUrl: "http://localhost:3939/"
8 | }, gourmet);
9 |
--------------------------------------------------------------------------------
/utils/error/NOT_FOUND.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const NOT_FOUND = {
4 | message: "Not found: ${path}",
5 | code: "NOT_FOUND",
6 | statusCode: 404
7 | };
8 |
9 | module.exports = NOT_FOUND;
10 |
--------------------------------------------------------------------------------
/tests/news-view/gmsrc/NewsDataClient.js:
--------------------------------------------------------------------------------
1 | import NewsData from "./NewsData";
2 |
3 | export default class NewsDataClient extends NewsData {
4 | getCached() {
5 | return this.gmctx.data.newsData;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/utils/error/TIMEOUT_ERROR.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const TIMEOUT_ERROR = {
4 | message: "Operation timed out",
5 | code: "ETIMEDOUT",
6 | statusCode: 408
7 | };
8 |
9 | module.exports = TIMEOUT_ERROR;
10 |
--------------------------------------------------------------------------------
/utils/variables/gmsrc/sources/Self.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | class Self {
4 | resolve(vars, info, options) {
5 | return vars.getNode(info.path, options);
6 | }
7 | }
8 |
9 | module.exports = Self;
10 |
--------------------------------------------------------------------------------
/cli/gourmet-cli/bin/gourmet-cli.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | "use strict";
3 |
4 | const GourmetCli = require("@gourmet/gourmet-cli-impl");
5 | const cli = new GourmetCli();
6 | cli.main(cli.parseArgs(process.argv.slice(2)));
7 |
--------------------------------------------------------------------------------
/examples/redux/README.md:
--------------------------------------------------------------------------------
1 | # Using Redux with Gourmet SSR
2 |
3 | This example shows you how to use Redux in a Gourmet SSR project.
4 |
5 | See the [documentation](https://ssr.gourmetjs.org/docs/guides/using-redux) for more details.
6 |
--------------------------------------------------------------------------------
/presets/core/lib/GourmetPresetCore.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | class PresetCore {
4 | }
5 |
6 | PresetCore.meta = {
7 | subplugins: [
8 | "@gourmet/group-core"
9 | ]
10 | };
11 |
12 | module.exports = PresetCore;
13 |
--------------------------------------------------------------------------------
/runtime/middleware/lib/watch.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const GourmetWatchMiddleware = require("@gourmet/watch-middleware");
4 |
5 | module.exports = function(gourmet) {
6 | return GourmetWatchMiddleware.middleware(gourmet);
7 | };
8 |
--------------------------------------------------------------------------------
/tests/builder-src/test/fixture/module-a/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/test-builder-src-module-a",
3 | "description": "A simple module containing ES6 class syntax for testing of Gourmet SSR",
4 | "version": "0.1.0"
5 | }
6 |
--------------------------------------------------------------------------------
/utils/base-x/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/base-x
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/colors/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/colors
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/examples/redux-i80/README.md:
--------------------------------------------------------------------------------
1 | # Using Redux with React I80
2 |
3 | This example shows you how to use Redux with the React I80 router.
4 |
5 | See the [documentation](https://ssr.gourmetjs.org/docs/guides/using-redux) for more details.
6 |
--------------------------------------------------------------------------------
/runtime/cli-args/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/cli-args
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/error/INVALID_METHOD.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const INVALID_METHOD = {
4 | message: "Method not allowed: ${method}",
5 | code: "INVALID_METHOD",
6 | statusCode: 405
7 | };
8 |
9 | module.exports = INVALID_METHOD;
10 |
--------------------------------------------------------------------------------
/utils/is-promise/gmsrc/isPromise.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // Returns true if the object is a promise.
4 | module.exports = function isPromise(obj) {
5 | return obj && typeof obj === "object" && typeof obj.then === "function";
6 | };
7 |
--------------------------------------------------------------------------------
/utils/is-stream/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/is-stream
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/web-proxy/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/web-proxy
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/client-http/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/client-http
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/client-lib/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/client-lib
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/middleware/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/middleware
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/server-args/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/server-args
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/news-view/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/test-news-view
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/error/INVALID_PARAM.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const INVALID_PARAM = {
4 | message: "Invalid '${param}' parameter: ${value}",
5 | code: "INVALID_PARAM",
6 | statusCode: 400
7 | };
8 |
9 | module.exports = INVALID_PARAM;
10 |
--------------------------------------------------------------------------------
/utils/get-exported/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/get-exported
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/hash-names/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/hash-names
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/http-headers/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/http-headers
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/module-dir/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/module-dir
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/parse-href/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/parse-href
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/send-content/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/send-content
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/examples/redux/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import {combineReducers} from "redux";
2 | import todos from "./todos";
3 | import visibilityFilter from "./visibilityFilter";
4 |
5 | export default combineReducers({
6 | todos,
7 | visibilityFilter
8 | });
9 |
--------------------------------------------------------------------------------
/runtime/client-lambda/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/client-lambda
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/get-req-args/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/get-req-args
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/html-renderer/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/html-renderer
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/inspect-error/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/inspect-error
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/is-stream/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/is-stream",
3 | "version": "0.3.3",
4 | "main": "gmsrc/isStream.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/is-stream"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/promise-queue/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-queue
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/proxy-headers/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/proxy-headers
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/unprefix-path/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/unprefix-path
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/emotion-renderer/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/emotion-renderer
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/plugin-react-i80/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-react-i80
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/react-renderer/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/react-renderer
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/examples/apollo/README.md:
--------------------------------------------------------------------------------
1 | # Using Apollo GraphQL with Gourmet SSR
2 |
3 | This example shows you how to use Apollo GraphQL in a Gourmet SSR project.
4 |
5 | See the [documentation](https://ssr.gourmetjs.org/docs/guides/using-apollo) for more details.
6 |
--------------------------------------------------------------------------------
/examples/redux-i80/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import {combineReducers} from "redux";
2 | import todos from "./todos";
3 | import visibilityFilter from "./visibilityFilter";
4 |
5 | export default combineReducers({
6 | todos,
7 | visibilityFilter
8 | });
9 |
--------------------------------------------------------------------------------
/examples/redux-init/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import {combineReducers} from "redux";
2 | import todos from "./todos";
3 | import visibilityFilter from "./visibilityFilter";
4 |
5 | export default combineReducers({
6 | todos,
7 | visibilityFilter
8 | });
9 |
--------------------------------------------------------------------------------
/runtime/renderer-sandbox/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/renderer-sandbox
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/watch-middleware/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/watch-middleware
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/todo-redux/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import {combineReducers} from "redux";
2 | import todos from "./todos";
3 | import visibilityFilter from "./visibilityFilter";
4 |
5 | export default combineReducers({
6 | todos,
7 | visibilityFilter
8 | });
9 |
--------------------------------------------------------------------------------
/utils/error-to-string/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/error-to-string
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/is-plain-object/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/is-plain-object
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-read-file/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-read-file
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/resolve-template/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/resolve-template
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/serialize-error/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/serialize-error
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/stream-to-string/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/stream-to-string
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/react-i80/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/react-i80
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org/docs/ref/react-i80) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/loadable-registrar/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/loadable-registrar
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/cli-test-plugin/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/test-cli-test-plugin
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/error/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/error
2 | Simple error object creator.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/plugin-sort/gmsrc/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const PluginSorter = require("./PluginSorter");
4 |
5 | module.exports = function sortPlugins(items, options) {
6 | const sorter = new PluginSorter(options);
7 | return sorter.run(items);
8 | };
9 |
--------------------------------------------------------------------------------
/utils/promise-write-file/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-write-file
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/serialize-request-error/README-SRC.md:
--------------------------------------------------------------------------------
1 | # {{pkg.name}}
2 |
3 | {{desc}}
4 |
5 | ## Introduction
6 |
7 | Serializes an error into a JSON object with the request information in the `req` property
8 | to show details of the request that caused the error.
9 |
--------------------------------------------------------------------------------
/contrib/plugin-react-apollo/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-react-apollo
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/plugin-react-emotion/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-react-emotion
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/plugin-react-loadable/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-react-loadable
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/react-apollo-renderer/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/react-apollo-renderer
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/get-exported/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/get-exported",
3 | "version": "0.4.3",
4 | "main": "gmsrc/getExported.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/get-exported"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/handle-request-error/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/handle-request-error
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/http-headers/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/http-headers",
3 | "version": "0.3.3",
4 | "main": "gmsrc/HttpHeaders.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/http-headers"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/apollo/lib/schema.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const {gql} = require("apollo-server-express");
4 |
5 | module.exports = gql`
6 | type Query {
7 | todos: [String]!
8 | }
9 |
10 | type Mutation {
11 | addTodo(text: String!): String!
12 | }
13 | `;
14 |
--------------------------------------------------------------------------------
/presets/react/lib/GourmetPresetReact.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | class PresetReact {
4 | }
5 |
6 | PresetReact.meta = {
7 | subplugins: [
8 | "@gourmet/group-core",
9 | "@gourmet/group-react"
10 | ]
11 | };
12 |
13 | module.exports = PresetReact;
14 |
--------------------------------------------------------------------------------
/utils/promise-protect/README-SRC.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-protect
2 |
3 | Protects a function from exceptions and wraps the return value with a promise
4 |
5 | # Why?
6 |
7 | This is syntactically explicit and slightly more efficient than `Promise.resolve().then(...)`.
8 |
--------------------------------------------------------------------------------
/utils/promise-protect/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-protect
2 |
3 | Protects a function from exceptions and wraps the return value with a promise
4 |
5 | # Why?
6 |
7 | This is syntactically explicit and slightly more efficient than `Promise.resolve().then(...)`.
8 |
--------------------------------------------------------------------------------
/cli/gourmet-cli/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/gourmet-cli
2 | Gourmet command line interface.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/react-loadable/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/react-loadable
2 |
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org/docs/ref/react-loadable) for more information.
6 |
--------------------------------------------------------------------------------
/examples/apollo-manual/lib/schema.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const {gql} = require("apollo-server-express");
4 |
5 | module.exports = gql`
6 | type Query {
7 | todos: [String]!
8 | }
9 |
10 | type Mutation {
11 | addTodo(text: String!): String!
12 | }
13 | `;
14 |
--------------------------------------------------------------------------------
/scripts/update-package/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/test-update-package",
3 | "version": "0.1.5",
4 | "private": true,
5 | "devDependencies": {
6 | "@gourmet/relative-path": "^0.4.3",
7 | "@gourmet/resolve-template": "^0.3.3"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/builder-src/test/fixture/module-b/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/test-builder-src-module-b",
3 | "description": "A simple module containing ES6 class syntax for testing of Gourmet SSR",
4 | "version": "0.1.1",
5 | "module": "gourmet-source/main.js"
6 | }
7 |
--------------------------------------------------------------------------------
/utils/error-to-string/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/error-to-string",
3 | "version": "0.3.3",
4 | "main": "gmsrc/errorToString.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/error-to-string"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/is-plain-object/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/is-plain-object",
3 | "version": "0.3.5",
4 | "main": "gmsrc/isPlainObject.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/is-plain-object"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/promise-wrap/gmsrc/promiseWrap.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const isPromise = require("@gourmet/is-promise");
4 |
5 | module.exports = function promiseWrap(value) {
6 | if (isPromise(value))
7 | return value;
8 | return Promise.resolve(value);
9 | };
10 |
--------------------------------------------------------------------------------
/utils/serialize-error/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/serialize-error",
3 | "version": "0.3.3",
4 | "main": "gmsrc/serializeError.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/serialize-error"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/storage-s3/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/storage-s3
2 | File storage interface for AWS S3.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/variables/gmsrc/sources/Opt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | class Opt {
4 | constructor(options) {
5 | this._options = options;
6 | }
7 |
8 | resolve(vars, info) {
9 | return this._options[info.path];
10 | }
11 | }
12 |
13 | module.exports = Opt;
14 |
--------------------------------------------------------------------------------
/utils/deep-clone/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/deep-clone
2 | Recursively clones a JavaScript value.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-read-file/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/promise-read-file",
3 | "version": "0.3.3",
4 | "main": "gmsrc/promiseReadFile.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/promise-read-file"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/variables/gmsrc/sources/Env.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | class Env {
4 | constructor(env) {
5 | this._env = env;
6 | }
7 |
8 | resolve(vars, info) {
9 | return (this._env || process.env)[info.path];
10 | }
11 | }
12 |
13 | module.exports = Env;
14 |
--------------------------------------------------------------------------------
/examples/apollo-manual/README.md:
--------------------------------------------------------------------------------
1 | # Using Apollo GraphQL with Gourmet SSR
2 |
3 | This example shows you how to use Apollo GraphQL manually without `@gourmet/group-react-apollo`.
4 |
5 | See the [documentation](https://ssr.gourmetjs.org/docs/guides/using-apollo) for more details.
6 |
--------------------------------------------------------------------------------
/runtime/loadable-registrar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/loadable-registrar",
3 | "version": "0.3.4",
4 | "main": "gmsrc/registrar.js",
5 | "license": "MIT",
6 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/runtime/loadable-registrar"
7 | }
8 |
--------------------------------------------------------------------------------
/utils/is-promise/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/is-promise
2 | Returns true if the object is a promise.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/web-proxy/gmsrc/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const WebProxy = require("./WebProxy");
4 |
5 | module.exports = function webProxy(req, res, target, options) {
6 | const proxy = new WebProxy(options);
7 | proxy.handle(req, res, target);
8 | return proxy;
9 | };
10 |
--------------------------------------------------------------------------------
/tests/fake-github/src/components/Container.jsx:
--------------------------------------------------------------------------------
1 | import styled from "react-emotion";
2 |
3 | const Container = styled.div`
4 | box-sizing: border-box;
5 | width: ${props => props.width}px;
6 | padding: 0 10px;
7 | margin: 0 auto;
8 | `;
9 |
10 | export default Container;
11 |
--------------------------------------------------------------------------------
/examples/redux-init/README.md:
--------------------------------------------------------------------------------
1 | # Supplying the initial state from Node server
2 |
3 | This example shows you how to provide the Redux initial state from your server via `res.serve()` function.
4 |
5 | See the [documentation](https://ssr.gourmetjs.org/docs/guides/using-redux) for more details.
6 |
--------------------------------------------------------------------------------
/utils/prefix-lines/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/prefix-lines
2 | Inserts a prefix at each line of a text string.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/resolve-dirs/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/resolve-dirs
2 | Resolves runtime directories from options object.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/storage-fs/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/storage-fs
2 | File storage interface for 'fs' compatible filesystem.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/cli/gourmet-cli-impl/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/gourmet-cli-impl
2 | Gourmet command line interface implementation.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/console/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/console
2 | A console abstraction for generating text output and debug logs.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/error-to-string/gmsrc/errorToString.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function errorToString(err) {
4 | if (!err)
5 | return "No error";
6 |
7 | if (typeof err === "string")
8 | return err;
9 |
10 | return err.stack || err.message || err.toString();
11 | };
12 |
--------------------------------------------------------------------------------
/utils/escape-script/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/escape-script
2 | Escape JavaScript content to be embedded in HTML.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/merge/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/merge
2 | Merges objects with special handling of arrays and non-plain objects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/todo-apollo/lib/schema.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const {gql} = require("apollo-server-express");
4 |
5 | const schema = gql`
6 | type Query {
7 | todos: [String]!
8 | }
9 |
10 | type Mutation {
11 | addTodo(text: String!): String!
12 | }
13 | `;
14 |
15 | module.exports = schema;
16 |
--------------------------------------------------------------------------------
/utils/plugin-sort/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-sort
2 | A general purpose library for human friendly plugin ordering.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-protect/gmsrc/promiseProtect.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function promiseProtect(handler) {
4 | return new Promise(function(resolve, reject) {
5 | try {
6 | resolve(handler());
7 | } catch (err) {
8 | reject(err);
9 | }
10 | });
11 | };
12 |
--------------------------------------------------------------------------------
/utils/promise-sync/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-sync
2 | Synchronously runs a handler if the value is not a promise.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/groups/core/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/group-core
2 | A group of core packages for building and running Gourmet SSR projects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/groups/react/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/group-react
2 | A group of sub-packages for the React support in Gourmet SSR projects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/presets/react/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/preset-react
2 | Gourmet Preset containing a whole set of packages for React projects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/fake-github/src/components/FormHeader.jsx:
--------------------------------------------------------------------------------
1 | import styled from "react-emotion";
2 |
3 | const FormHeader = styled.div`
4 | font-size: 1.5rem;
5 | font-weight: bold;
6 | padding: 8px 0;
7 | margin: 1em 0;
8 | border-bottom: 1px solid #ccc;
9 | `;
10 |
11 | export default FormHeader;
12 |
--------------------------------------------------------------------------------
/utils/escape-script/gmsrc/escapeScript.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function escapeScript(content, isInline=false) {
4 | if (isInline)
5 | return content.replace("&", "\\u0026").replace("\"", "\\u0022");
6 | else
7 | return content.replace("", "\\u003c/script>");
8 | };
9 |
--------------------------------------------------------------------------------
/utils/plain-merge/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plain-merge
2 | Merges plain objects. Kind of deep version of `Object.assign()`.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-deep-prop/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-deep-prop
2 | Gets a deep property value while resolving promises.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/serialize-request-error/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/serialize-request-error
2 |
3 | Serializes an error into a JSON object.
4 |
5 | ## Introduction
6 |
7 | Serializes an error into a JSON object with the request information in the `req` property
8 | to show details of the request that caused the error.
9 |
--------------------------------------------------------------------------------
/runtime/http-server/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/http-server
2 | Gourmet rendering service implemented as a standalone HTTP server.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/runtime/self-url/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/self-url
2 | Converts a relative URL to absolute URL only when `gmctx.isServer` is true.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/base-x/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/base-x",
3 | "version": "0.3.3",
4 | "main": "gmsrc/getBaseX.js",
5 | "dependencies": {
6 | "base-x": "^3.0.4"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/base-x"
10 | }
11 |
--------------------------------------------------------------------------------
/utils/get-aws-service/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/get-aws-service
2 | Provides a standard way of acquiring AWS SDK's service objects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/cli/cli-base/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/cli-base
2 | Base class for the command line interface apps with flexible plugin architecture.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/i80-loadable-nested/src/ProfilePanel.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import PhotoLoadable from "./PhotoLoadable";
3 |
4 | export default function ProfilePanel(props) {
5 | return (
6 |
7 |
{props.label} Profile
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/utils/colors/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/colors",
3 | "version": "1.1.3",
4 | "main": "gmsrc/colors.js",
5 | "scripts": {
6 | "demo": "node example/demo.js"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/colors"
10 | }
11 |
--------------------------------------------------------------------------------
/utils/http-module/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/http-module
2 | Selects between 'http' and 'https' module based on value of protocol string.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/is-promise/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/is-promise",
3 | "version": "0.3.3",
4 | "description": "Returns true if the object is a promise",
5 | "main": "gmsrc/isPromise.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/is-promise"
8 | }
9 |
--------------------------------------------------------------------------------
/utils/omit/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/omit
2 | Creates a copy of a plain object with own properties excluding the specified properties.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-deep-clone/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-deep-clone
2 | Recursively clones a JavaScript value while resolving promises.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/promise-sync/gmsrc/promiseSync.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const isPromise = require("@gourmet/is-promise");
4 |
5 | module.exports = function promiseSync(value, handler) {
6 | if (isPromise(value))
7 | return value.then(value => handler(value));
8 | else
9 | return handler(value);
10 | };
11 |
--------------------------------------------------------------------------------
/utils/promise-wrap/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-wrap
2 | Conditionally wraps a value with a promise only if it is not a promise.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/presets/core/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/preset-core
2 | Gourmet Preset containing core packages for building and running a Gourmet SSR project.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/render-error/src/ServerError.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class ServerError extends React.Component {
4 | render() {
5 | if (SERVER)
6 | throw Error("server error");
7 | return (
8 |
9 | Hello, world!
10 |
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/utils/module-dir/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/module-dir",
3 | "version": "0.3.3",
4 | "main": "gmsrc/moduleDir.js",
5 | "dependencies": {
6 | "resolve": "^1.6.0"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/module-dir"
10 | }
11 |
--------------------------------------------------------------------------------
/contrib/plugin-react/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/plugin-react
2 | Gourmet Webpack Builder plugin for adding `@babel/preset-react` to build JSX files.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/examples/redux-i80/src/components/Settings.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Footer from "./Footer";
3 |
4 | const Settings = () => (
5 |
12 | );
13 |
14 | export default Settings;
15 |
--------------------------------------------------------------------------------
/utils/parse-href/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/parse-href",
3 | "version": "1.1.3",
4 | "main": "gmsrc/parseHref.js",
5 | "scripts": {
6 | "test": "tape test/*_test.js"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/parse-href"
10 | }
11 |
--------------------------------------------------------------------------------
/utils/promise-tape/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/promise-tape
2 | A simple wrapper converting a promise returning function to test handler for 'tape'.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/variables/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/variables
2 | Flexible variable resolution engine that can be extended by pluggable variable sources.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/docs/ref/group-react-apollo/index.md:
--------------------------------------------------------------------------------
1 | # @gourmet/group-react-apollo
2 |
3 | A group of sub-packages enabling the Apollo GraphQL support in Gourmet SSR React projects.
4 |
5 | ## About
6 |
7 | This is a member package of the Gourmet SSR Open Source Project. See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
8 |
--------------------------------------------------------------------------------
/runtime/lambda-adapter/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/lambda-adapter
2 | Creates a tiny adapter that converts Lambda invocations to Gourmet Renderer calls.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/tests/builder-babel/plugin-hi.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function babelPlugin({types: t}) {
4 | return {
5 | visitor: {
6 | Literal(path) {
7 | if (path.node.value === "Hello, world!")
8 | path.replaceWith(t.stringLiteral("Hi, world!"));
9 | }
10 | }
11 | };
12 | };
13 |
--------------------------------------------------------------------------------
/tests/render-error/src/ClientError.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class ClientError extends React.Component {
4 | render() {
5 | if (CLIENT)
6 | throw Error("render client error");
7 | return (
8 |
9 | Hello, world!
10 |
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/utils/prefix-lines/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/prefix-lines",
3 | "version": "0.3.3",
4 | "description": "Inserts a prefix at each line of a text string",
5 | "main": "gmsrc/prefixLines.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/prefix-lines"
8 | }
9 |
--------------------------------------------------------------------------------
/utils/promise-main/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/promise-main",
3 | "version": "0.3.3",
4 | "description": "Handles the top main promise of a console app",
5 | "main": "gmsrc/promiseMain.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/promise-main"
8 | }
9 |
--------------------------------------------------------------------------------
/utils/resolve-dirs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/resolve-dirs",
3 | "version": "1.1.3",
4 | "description": "Resolves runtime directories from options object",
5 | "main": "gmsrc/resolveDirs.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/resolve-dirs"
8 | }
9 |
--------------------------------------------------------------------------------
/tests/builder-babel/plugin-hey.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function babelPlugin({types: t}) {
4 | return {
5 | visitor: {
6 | Literal(path) {
7 | if (path.node.value === "Hello, world!")
8 | path.replaceWith(t.stringLiteral("Hey, world!"));
9 | }
10 | }
11 | };
12 | };
13 |
--------------------------------------------------------------------------------
/utils/escape-script/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/escape-script",
3 | "version": "0.3.3",
4 | "description": "Escape JavaScript content to be embedded in HTML",
5 | "main": "gmsrc/escapeScript.js",
6 | "license": "MIT",
7 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/escape-script"
8 | }
9 |
--------------------------------------------------------------------------------
/utils/get-req-opts/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/get-req-opts
2 | Gets an `options` object that you can give to `http.request` from a string or a plain object.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/contrib/emotion-renderer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/emotion-renderer",
3 | "version": "1.0.3",
4 | "dependencies": {
5 | "emotion-server": "^9.2.12",
6 | "pump": "^3.0.0"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/contrib/emotion-renderer"
10 | }
11 |
--------------------------------------------------------------------------------
/contrib/react-context-gmctx/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/react-context-gmctx
2 | Simple module to share a React 16.x context object to provide and consume `gmctx`.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/multi-stream/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/multi-stream
2 | Modified version of `https://github.com/feross/multistream` that uses Node built-in modules only.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/relative-path/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/relative-path
2 | Converts a platform filesystem path to a portable path relative to a specified base directory.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/utils/unprefix-path/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/unprefix-path",
3 | "version": "0.3.3",
4 | "main": "gmsrc/unprefixPath.js",
5 | "scripts": {
6 | "test": "tape test/*_test.js"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/utils/unprefix-path"
10 | }
11 |
--------------------------------------------------------------------------------
/groups/react-emotion/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/group-react-emotion
2 | A group of sub-packages enabling the CSS-in-JS support using Emotion in Gourmet SSR projects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/groups/react-i80/README.md:
--------------------------------------------------------------------------------
1 | # @gourmet/group-react-i80
2 | A group of sub-packages enabling the isomorphic routing support using React I80 in Gourmet SSR projects.
3 | ## About
4 | This is a member package of Gourmet SSR, an open source project for server-side rendering.
5 | See [Gourmet SSR website](https://ssr.gourmetjs.org) for more information.
6 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "lerna": "3.4.0",
3 | "npmClient": "npm",
4 | "packages": [
5 | "utils/*",
6 | "cli/*",
7 | "builder/*",
8 | "runtime/*",
9 | "contrib/*",
10 | "groups/*",
11 | "presets/*",
12 | "tests/*",
13 | "scripts/*"
14 | ],
15 | "hoist": true,
16 | "version": "independent"
17 | }
18 |
--------------------------------------------------------------------------------
/runtime/get-req-args/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/get-req-args",
3 | "version": "0.4.3",
4 | "main": "lib/getReqArgs.js",
5 | "dependencies": {
6 | "@gourmet/proxy-headers": "^0.3.3"
7 | },
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/runtime/get-req-args"
10 | }
11 |
--------------------------------------------------------------------------------
/tests/cli-test-plugin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@gourmet/test-cli-test-plugin",
3 | "version": "0.3.4",
4 | "keywords": [
5 | "gourmet-plugin"
6 | ],
7 | "main": "lib/GourmetPluginCliTest.js",
8 | "license": "MIT",
9 | "repository": "https://github.com/gourmetjs/gourmet-ssr/tree/master/tests/cli-test-plugin"
10 | }
11 |
--------------------------------------------------------------------------------
/tests/todo-redux/gourmet_config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | pages: {
3 | main: "./src/containers/Root.js"
4 | },
5 |
6 | builder: {
7 | stageTypes: {
8 | "production": ["prod", "ltc"]
9 | },
10 | outputDir: "../../.gourmet/todo-redux",
11 | contentHash: context => context.stage === "ltc"
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/utils/handle-request-error/gmsrc/errorTemplate.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports =
4 | `
5 |
6 |
7 | Error ({{statusCode}}): {{message}}
8 | {{head}}
9 |
10 |
11 |