From cdf460bff217fc8c8504df08874877c7b31f7829 Mon Sep 17 00:00:00 2001 From: Gustaf Dalemar Date: Tue, 3 May 2016 19:15:44 +0200 Subject: [PATCH] Version 1.0.0-alpha.5 --- .../docs/Settings.md | 40 +++++++++++++++---- .../package.json | 2 +- .../docs/Settings.md | 32 ++++++++++++--- .../roc-package-web-app-react/package.json | 2 +- 4 files changed, 61 insertions(+), 15 deletions(-) diff --git a/packages/roc-package-web-app-react-dev/docs/Settings.md b/packages/roc-package-web-app-react-dev/docs/Settings.md index 3a283b5..27bb92f 100644 --- a/packages/roc-package-web-app-react-dev/docs/Settings.md +++ b/packages/roc-package-web-app-react-dev/docs/Settings.md @@ -4,7 +4,7 @@ | Name | Description | Path | CLI option | Default | Type | Required | | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| clientLoading | The React component to use on the first client load while fetching data, will only be used if clientBlocking is set to true. | build.clientLoading | --build-clientLoading | `null` | `Filepath` | No | +| clientLoading | The React component to use on the first client load while fetching data, will only be used if some blocking hooks are defined. | build.clientLoading | --build-clientLoading | `null` | `Filepath` | No | | disableProgressbar | Should the progress bar be disabled for builds. | build.disableProgressbar | --build-disableProgressbar | `false` | `Boolean` | No | | koaMiddlewares | The koa middlewares to add to the server instance, will be added after the default middlewares. | build.koaMiddlewares | --build-koaMiddlewares | `"koa-middlewares.js"` | `Filepath` | No | | mode | What mode the application should be built for. Possible values are "dev" and "dist". | build.mode | --build-mode | `"dist"` | `/^dev|dist$/i` | No | @@ -15,6 +15,7 @@ | resources | An array of files to include into the build process. | build.resources | --build-resources | `["roc-package-web-app-react/styles/base.css"]` | `[Filepath]` | No | | routes | The routes to use if no entry file is given, will use default entry files internally. | build.routes | --build-routes | `"routes.js"` | `Filepath` | No | | targets | For what targets the code should be built for. | build.targets | --build-targets | `["web","node"]` | `[/^web|node$/i]` | No | +| templateValues | | build.templateValues | --build-templateValues | `"template-values.js"` | `Unknown` | No | | useDefaultKoaMiddlewares | If Roc should use internally defined koa middlewares, please look at the documentation for what middlewares that are included. | build.useDefaultKoaMiddlewares | --build-useDefaultKoaMiddlewares | `true` | `Boolean` | No | | useDefaultReducers | If Roc should use internally defined reducers, please look at the documentation for what reducers that are included. | build.useDefaultReducers | --build-useDefaultReducers | `true` | `Boolean` | No | | useDefaultReduxMiddlewares | If Roc should use internally defined middlewares, please look at the documentation for what middlewares that are included. | build.useDefaultReduxMiddlewares | --build-useDefaultReduxMiddlewares | `true` | `Boolean` | No | @@ -60,6 +61,7 @@ Settings for style related things. | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | | a11y | If A11Y validation should be active. Currently it´s suggested to not enable reduxDevtools with this. | dev.a11y | --dev-a11y | `false` | `Boolean` | No | | debug | Filter for debug messages that should be shown during development, see https://npmjs.com/package/debug. | dev.debug | --dev-debug | `"roc:*"` | `String` | No | +| host | The host to use during development, will be automatically defined if left empty. | dev.host | --dev-host | `null` | `String` | No | | port | Port for the dev server. | dev.port | --dev-port | `3001` | `Integer` | No | | watch | Files/folders that should trigger a restart of the server. | dev.watch | --dev-watch | `["roc.config.js","config/"]` | `Filepath / [Filepath]` | No | @@ -95,10 +97,10 @@ Settings for Browsersync. | defaultVisible | If the Redux Devtools should be shown by default. | dev.reduxDevtools.defaultVisible | --dev-reduxDevtools-defaultVisible | `false` | `Boolean` | No | | enabled | If Redux Devtools should be enabled. | dev.reduxDevtools.enabled | --dev-reduxDevtools-enabled | `true` | `Boolean` | No | | position | Starting position of the Devtools, can be left, right, top or bottom. | dev.reduxDevtools.position | --dev-reduxDevtools-position | `"right"` | `/^left|right|top|bottom$/` | No | -| positionKey | The key that should change position of the Redux Devtools, will be combine with CTRL. | dev.reduxDevtools.positionKey | --dev-reduxDevtools-positionKey | `"Q"` | `String` | No | +| positionKey | The key that should change position of the Redux Devtools, will be combine with CTRL. | dev.reduxDevtools.positionKey | --dev-reduxDevtools-positionKey | `"ctrl-q"` | `String` | No | | size | Default size of the Devtools, should be a number between 0 and 1. | dev.reduxDevtools.size | --dev-reduxDevtools-size | `0.3` | `Unknown` | No | | theme | The theme to use for the Redux Devtools, see https://github.com/gaearon/redux-devtools-themes. | dev.reduxDevtools.theme | --dev-reduxDevtools-theme | `"ocean"` | `String` | No | -| visibilityKey | The key that should toogle the Redux Devtools, will be combine with CTRL. | dev.reduxDevtools.visibilityKey | --dev-reduxDevtools-visibilityKey | `"H"` | `String` | No | +| visibilityKey | The key that should toogle the Redux Devtools, will be combine with CTRL. | dev.reduxDevtools.visibilityKey | --dev-reduxDevtools-visibilityKey | `"ctrl-h"` | `String` | No | ### ReduxLogger @@ -120,18 +122,20 @@ Settings for Browsersync. | Name | Description | Path | CLI option | Default | Type | Required | | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| applicationName | Application name to use for <title>. | runtime.applicationName | --applicationName | `null` | `String` | Yes | -| clientBlocking | If "prefetch" should block a route transition on the client. | runtime.clientBlocking | --clientBlocking | `false` | `Boolean` | No | +| applicationName | Default application name to use for <title>. | runtime.applicationName | --applicationName | `null` | `String` | Yes | +| applicationNameTemplate | Template to be used for <title>. See https://github.com/nfl/react-helmet. | runtime.applicationNameTemplate | --applicationNameTemplate | `null` | `String` | No | | configWhitelistProperty | A single property to expose to the client from node-config. Make sure that this property does NOT contain any secrets that should not be exposed to the world. | runtime.configWhitelistProperty | --configWhitelistProperty | `"DANGEROUSLY_EXPOSE_TO_CLIENT"` | `String` | No | | favicon | Path to the favicon file, specially handled on the server. | runtime.favicon | --favicon | `null` | `String` | No | -| link | Link tags to be used in <head>, should be formatted as objects, See https://github.com/nfl/react-helmet. | runtime.link | --link | `[{"rel":"icon","href":"favicon.png"}]` | `[{String}]` | No | -| meta | Meta tags to be used in <head>, should be formatted as objects, see https://github.com/nfl/react-helmet. | runtime.meta | --meta | `[{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}]` | `[{String}]` | No | +| htmlAttributes | Attributes that should be added to the <html> tag. | runtime.htmlAttributes | --htmlAttributes | `null` | `{}` | No | +| link | Link tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.link | --link | `[{"rel":"icon","href":"favicon.png"}]` | `[{String}]` | No | +| meta | Meta tags to be used in <head>, should be formatted as objects. see https://github.com/nfl/react-helmet. | runtime.meta | --meta | `[{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}]` | `[{String}]` | No | | port | Port for the server to use. | runtime.port | --port | `3000` | `Integer` | No | -| script | Script tags to be used in <head>, should be formatted as objects, See https://github.com/nfl/react-helmet. | runtime.script | --script | `null` | `[{String}]` | No | +| script | Script tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.script | --script | `null` | `[{String}]` | No | | serve | What folder the server should expose. | runtime.serve | --serve | `["build/client"]` | `Filepath / [Filepath]` | No | | ssr | If server side rendering should be enabled. | runtime.ssr | --ssr | `true` | `Boolean` | No | | startBundle | Relative path to a bundle to start when calling "start". | runtime.startBundle | --startBundle | `"build/server/app.js"` | `Filepath` | No | | stats | Path to client stats file from build. | runtime.stats | --stats | `"build/client/webpack-stats.json"` | `Filepath` | No | +| style | Style tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.style | --style | `null` | `[{String}]` | No | ### Base Base tag to be used in , see https://github.com/nfl/react-helmet. @@ -148,6 +152,20 @@ Base tag to be used in , see https://github.com/nfl/react-helmet. | client | Filter for debug messages that should be shown for the client, see https://npmjs.com/package/debug. | runtime.debug.client | --debug-client | `"roc:*"` | `String` | No | | server | Filter for debug messages that should be shown for the server, see https://npmjs.com/package/debug. | runtime.debug.server | --debug-server | `"roc:*"` | `String` | No | +### Fetch + +| Name | Description | Path | CLI option | Default | Type | Required | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | +| server | What redial hooks that should run on the server and in what order. | runtime.fetch.server | --fetch-server | `["fetch"]` | `[]` | No | + +#### Client + +| Name | Description | Path | CLI option | Default | Type | Required | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | +| blocking | What redial hooks that should run on the client that blocks route transitions and in what order. | runtime.fetch.client.blocking | --fetch-client-blocking | `["fetch"]` | `[]` | No | +| defer | What redial hooks that should run on the client that should not block route transitions and in what order. | runtime.fetch.client.defer | --fetch-client-defer | `["defer"]` | `[]` | No | +| parallel | If defer hooks should be started at the same time as the blocking ones. | runtime.fetch.client.parallel | --fetch-client-parallel | `false` | `Boolean` | No | + ### Https | Name | Description | Path | CLI option | Default | Type | Required | @@ -173,6 +191,12 @@ Settings for how Koa should handle paths. | defer | If this should be performed after looking for a file on disk. | runtime.koa.normalize.defer | --koa-normalize-defer | `false` | `Boolean` | No | | enabled | If paths should be normalized, that is remove extra slashes. | runtime.koa.normalize.enabled | --koa-normalize-enabled | `true` | `Boolean` | No | +#### StaticServe + +| Name | Description | Path | CLI option | Default | Type | Required | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | +| maxage | Browser cache max-age in milliseconds. Production only. | runtime.koa.staticServe.maxage | --koa-staticServe-maxage | `60000` | `Unknown` | No | + #### TrailingSlashes | Name | Description | Path | CLI option | Default | Type | Required | diff --git a/packages/roc-package-web-app-react-dev/package.json b/packages/roc-package-web-app-react-dev/package.json index de7f7f7..54bfac0 100644 --- a/packages/roc-package-web-app-react-dev/package.json +++ b/packages/roc-package-web-app-react-dev/package.json @@ -3,7 +3,7 @@ "description": "Package for building React applications with Roc (Development)", "author": "VG", "license": "MIT", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.5", "main": "lib/index.js", "bin": "bin/index.js", "scripts": { diff --git a/packages/roc-package-web-app-react/docs/Settings.md b/packages/roc-package-web-app-react/docs/Settings.md index 68a6988..d15d1f6 100644 --- a/packages/roc-package-web-app-react/docs/Settings.md +++ b/packages/roc-package-web-app-react/docs/Settings.md @@ -4,18 +4,20 @@ | Name | Description | Path | CLI option | Default | Type | Required | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------- | -------- | -| applicationName | Application name to use for <title>. | runtime.applicationName | --applicationName | `null` | `String` | Yes | -| clientBlocking | If "prefetch" should block a route transition on the client. | runtime.clientBlocking | --clientBlocking | `false` | `Boolean` | No | +| applicationName | Default application name to use for <title>. | runtime.applicationName | --applicationName | `null` | `String` | Yes | +| applicationNameTemplate | Template to be used for <title>. See https://github.com/nfl/react-helmet. | runtime.applicationNameTemplate | --applicationNameTemplate | `null` | `String` | No | | configWhitelistProperty | A single property to expose to the client from node-config. Make sure that this property does NOT contain any secrets that should not be exposed to the world. | runtime.configWhitelistProperty | --configWhitelistProperty | `"DANGEROUSLY_EXPOSE_TO_CLIENT"` | `String` | No | | favicon | Path to the favicon file, specially handled on the server. | runtime.favicon | --favicon | `null` | `String` | No | -| link | Link tags to be used in <head>, should be formatted as objects, See https://github.com/nfl/react-helmet. | runtime.link | --link | `[{"rel":"icon","href":"favicon.png"}]` | `[{String}]` | No | -| meta | Meta tags to be used in <head>, should be formatted as objects, see https://github.com/nfl/react-helmet. | runtime.meta | --meta | `[{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}]` | `[{String}]` | No | +| htmlAttributes | Attributes that should be added to the <html> tag. | runtime.htmlAttributes | --htmlAttributes | `null` | `{}` | No | +| link | Link tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.link | --link | `[{"rel":"icon","href":"favicon.png"}]` | `[{String}]` | No | +| meta | Meta tags to be used in <head>, should be formatted as objects. see https://github.com/nfl/react-helmet. | runtime.meta | --meta | `[{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}]` | `[{String}]` | No | | port | Port for the server to use. | runtime.port | --port | `3000` | `Integer` | No | -| script | Script tags to be used in <head>, should be formatted as objects, See https://github.com/nfl/react-helmet. | runtime.script | --script | `null` | `[{String}]` | No | +| script | Script tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.script | --script | `null` | `[{String}]` | No | | serve | What folder the server should expose. | runtime.serve | --serve | `["build/client"]` | `Filepath / [Filepath]` | No | | ssr | If server side rendering should be enabled. | runtime.ssr | --ssr | `true` | `Boolean` | No | | startBundle | Relative path to a bundle to start when calling "start". | runtime.startBundle | --startBundle | `"build/server/app.js"` | `Filepath` | No | | stats | Path to client stats file from build. | runtime.stats | --stats | `"build/client/webpack-stats.json"` | `Filepath` | No | +| style | Style tags to be used in <head>, should be formatted as objects. See https://github.com/nfl/react-helmet. | runtime.style | --style | `null` | `[{String}]` | No | ### Base Base tag to be used in , see https://github.com/nfl/react-helmet. @@ -32,6 +34,20 @@ Base tag to be used in , see https://github.com/nfl/react-helmet. | client | Filter for debug messages that should be shown for the client, see https://npmjs.com/package/debug. | runtime.debug.client | --debug-client | `"roc:*"` | `String` | No | | server | Filter for debug messages that should be shown for the server, see https://npmjs.com/package/debug. | runtime.debug.server | --debug-server | `"roc:*"` | `String` | No | +### Fetch + +| Name | Description | Path | CLI option | Default | Type | Required | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------- | -------- | +| server | What redial hooks that should run on the server and in what order. | runtime.fetch.server | --fetch-server | `["fetch"]` | `[]` | No | + +#### Client + +| Name | Description | Path | CLI option | Default | Type | Required | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------- | -------- | +| blocking | What redial hooks that should run on the client that blocks route transitions and in what order. | runtime.fetch.client.blocking | --fetch-client-blocking | `["fetch"]` | `[]` | No | +| defer | What redial hooks that should run on the client that should not block route transitions and in what order. | runtime.fetch.client.defer | --fetch-client-defer | `["defer"]` | `[]` | No | +| parallel | If defer hooks should be started at the same time as the blocking ones. | runtime.fetch.client.parallel | --fetch-client-parallel | `false` | `Boolean` | No | + ### Https | Name | Description | Path | CLI option | Default | Type | Required | @@ -57,6 +73,12 @@ Settings for how Koa should handle paths. | defer | If this should be performed after looking for a file on disk. | runtime.koa.normalize.defer | --koa-normalize-defer | `false` | `Boolean` | No | | enabled | If paths should be normalized, that is remove extra slashes. | runtime.koa.normalize.enabled | --koa-normalize-enabled | `true` | `Boolean` | No | +#### StaticServe + +| Name | Description | Path | CLI option | Default | Type | Required | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------- | -------- | +| maxage | Browser cache max-age in milliseconds. Production only. | runtime.koa.staticServe.maxage | --koa-staticServe-maxage | `60000` | `Unknown` | No | + #### TrailingSlashes | Name | Description | Path | CLI option | Default | Type | Required | diff --git a/packages/roc-package-web-app-react/package.json b/packages/roc-package-web-app-react/package.json index 607d927..c249820 100644 --- a/packages/roc-package-web-app-react/package.json +++ b/packages/roc-package-web-app-react/package.json @@ -3,7 +3,7 @@ "description": "Package for building React applications with Roc", "author": "VG", "license": "MIT", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.5", "main": "lib/index.js", "bin": "bin/index.js", "scripts": {