diff --git a/packages/roc-package-web-app-react-dev/docs/Actions.md b/packages/roc-package-web-app-react-dev/docs/Actions.md index 06bf5bd..36cc6f5 100644 --- a/packages/roc-package-web-app-react-dev/docs/Actions.md +++ b/packages/roc-package-web-app-react-dev/docs/Actions.md @@ -10,35 +10,8 @@ * [react](#react) * [roc-package-web-app-react](#roc-package-web-app-react) * [react](#react) -* [roc-package-base-dev](#roc-package-base-dev) - * [afterClean](#afterClean) - * [beforeClean](#beforeClean) -* [roc-package-webpack-dev](#roc-package-webpack-dev) - * [build](#build) - * [dev](#dev) - * [webpack](#webpack) -* [roc-package-webpack-node-dev](#roc-package-webpack-node-dev) - * [target](#target) - * [watcher](#watcher) - * [webpack](#webpack) -* [roc-package-webpack-web-dev](#roc-package-webpack-web-dev) - * [target](#target) - * [watcher](#watcher) - * [webpack](#webpack) -* [roc-plugin-style-css](#roc-plugin-style-css) - * [css](#css) -* [roc-plugin-browsersync](#roc-plugin-browsersync) - * [browsersync](#browsersync) -* [roc-plugin-assets-images](#roc-plugin-assets-images) - * [images](#images) -* [roc-package-web-app-dev](#roc-package-web-app-dev) - * [devStarted](#devStarted) - * [webpack](#webpack) * [roc-plugin-react-dev](#roc-plugin-react-dev) * [react](#react) -* [roc-package-web-app-react-dev](#roc-package-web-app-react-dev) - * [settings](#settings) - * [webpack](#webpack) ## roc-plugin-start @@ -75,147 +48,9 @@ __Connects to hook:__ `get-resolve-paths` __Connects to extension:__ `roc-plugin-start` __Connects to hook:__ `get-resolve-paths` -## roc-package-base-dev - -### afterClean - -Runs after clean command is executed. Logs that the action has been completed successfully. - -__Connects to extension:__ `roc-package-base-dev` -__Connects to hook:__ `after-clean` - -### beforeClean - -Runs before clean command is executed. Returns an array of strings that should be removed. - -__Connects to extension:__ `roc-package-base-dev` -__Connects to hook:__ `before-clean` - -## roc-package-webpack-dev - -### build - -Build with Webpack. - -__Connects to extension:__ Not specified -__Connects to hook:__ `run-build-command` - -### dev - -Run in development mode using Webpack. - -__Connects to extension:__ Not specified -__Connects to hook:__ `run-dev-command` - -### webpack - -Adds base Webpack configuration. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - -## roc-package-webpack-node-dev - -### target - -Adds __node__ as a valid Webpack target. - -__Connects to extension:__ `roc-package-webpack-dev` -__Connects to hook:__ `get-webpack-targets` - -### watcher - -Adds a watcher for automatic reload on change. - -__Connects to extension:__ `roc-package-webpack-dev` -__Connects to hook:__ `create-watchers` - -### webpack - -Adds configuration needed for building for Node. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - -## roc-package-webpack-web-dev - -### target - -Adds __web__ as a valid Webpack target. - -__Connects to extension:__ `roc-package-webpack-dev` -__Connects to hook:__ `get-webpack-targets` - -### watcher - -Adds a web watcher using Webpack Dev Server. - -__Connects to extension:__ `roc-package-webpack-dev` -__Connects to hook:__ `create-watchers` - -### webpack - -Adds configuration need for web builds for Webpack. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - -## roc-plugin-style-css - -### css - -Adds CSS support. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - -## roc-plugin-browsersync - -### browsersync - -Adds a Browsersync instance. - -__Connects to extension:__ Not specified -__Connects to hook:__ `server-started` - -## roc-plugin-assets-images - -### images - -Adds images support. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - -## roc-package-web-app-dev - -### devStarted - -__Connects to extension:__ Not specified -__Connects to hook:__ `dev-process-created` - -### webpack - -Adds needed configuration to being able to build web applications. - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` - ## roc-plugin-react-dev ### react __Connects to extension:__ Not specified __Connects to hook:__ `build-webpack` - -## roc-package-web-app-react-dev - -### settings - -__Connects to extension:__ `roc` -__Connects to hook:__ `update-settings` - -### webpack - -__Connects to extension:__ Not specified -__Connects to hook:__ `build-webpack` diff --git a/packages/roc-package-web-app-react-dev/docs/Commands.md b/packages/roc-package-web-app-react-dev/docs/Commands.md index 854f9c9..bdd77ee 100644 --- a/packages/roc-package-web-app-react-dev/docs/Commands.md +++ b/packages/roc-package-web-app-react-dev/docs/Commands.md @@ -1,101 +1 @@ -# Commands for `roc-package-web-app-react-dev` - -## General Information -All commands can be called with some additional options as can be seen below. - -### General options - -| Name | Description | Required | -| --------------- | ------------------------------------------------------------------------------------------------------------- | -------- | -| -c, --config | Path to configuration file, will default to roc.config.js in current working directory. | No | -| -d, --directory | Path to working directory, will default to the current working directory. Can be either absolute or relative. | No | -| -h, --help | Output usage information. | No | -| -V, --verbose | Enable verbose mode. | No | -| -v, --version | Output version number. | No | - -## Commands -* [build](#build) -* [clean](#clean) -* [dev](#dev) -* [list-settings](#list-settings) -* [markdown-actions](#markdown-actions) -* [markdown-hooks](#markdown-hooks) -* [markdown-settings](#markdown-settings) -* [start](#start) - -## build -__Build the current project.__ - -``` -roc-package-web-app-react-dev build -``` - -### Settings options -* [build](/packages/roc-package-web-app-react-dev/docs/Settings.md#build) - -## clean -__Cleans the current project.__ - -``` -roc-package-web-app-react-dev clean -``` - -### Settings options -* [build](/packages/roc-package-web-app-react-dev/docs/Settings.md#build) - -## dev -__Starts the current project in development mode.__ - -``` -roc-package-web-app-react-dev dev -``` - -### Settings options -_All groups are available._ -* [build](/packages/roc-package-web-app-react-dev/docs/Settings.md#build) -* [dev](/packages/roc-package-web-app-react-dev/docs/Settings.md#dev) -* [runtime](/packages/roc-package-web-app-react-dev/docs/Settings.md#runtime) - -## list-settings -__Prints all the available settings that can be changed.__ - -``` -roc-package-web-app-react-dev list-settings -``` - -## markdown-actions -__Prints all the registered actions in a markdown format.__ - -``` -roc-package-web-app-react-dev markdown-actions -``` - -## markdown-hooks -__Prints all the registered hooks in a markdown format.__ - -``` -roc-package-web-app-react-dev markdown-hooks -``` - -## markdown-settings -__Prints all the available settings that can be changed in a markdown format.__ - -``` -roc-package-web-app-react-dev markdown-settings -``` - -## start -__Starts the current project.__ - -``` -roc-package-web-app-react-dev start [artifact] -``` - -### Arguments - -| Name | Description | Required | Type | Default | -| -------- | ----------------------------- | -------- | ---------- | ------- | -| artifact | Path to an artifact to start. | No | `Filepath` | | - -### Settings options -* [runtime](/packages/roc-package-web-app-react-dev/docs/Settings.md#runtime) +No commands available. \ No newline at end of file diff --git a/packages/roc-package-web-app-react-dev/docs/Hooks.md b/packages/roc-package-web-app-react-dev/docs/Hooks.md index bb0ed11..9733e09 100644 --- a/packages/roc-package-web-app-react-dev/docs/Hooks.md +++ b/packages/roc-package-web-app-react-dev/docs/Hooks.md @@ -1,132 +1,10 @@ # Hooks for `roc-package-web-app-react-dev` ## Hooks -* [roc-package-base-dev](#roc-package-base-dev) - * [after-clean](#after-clean) - * [before-clean](#before-clean) - * [run-build-command](#run-build-command) - * [run-dev-command](#run-dev-command) -* [roc-package-web-app-dev](#roc-package-web-app-dev) - * [server-started](#server-started) -* [roc-package-webpack-dev](#roc-package-webpack-dev) - * [build-webpack](#build-webpack) - * [create-watchers](#create-watchers) - * [get-webpack-targets](#get-webpack-targets) -* [roc-package-webpack-node-dev](#roc-package-webpack-node-dev) - * [dev-process-created](#dev-process-created) -* [roc-plugin-assets-images](#roc-plugin-assets-images) - * [add-image](#add-image) * [roc-plugin-start](#roc-plugin-start) * [get-potential-target](#get-potential-target) * [get-resolve-paths](#get-resolve-paths) * [register-runtime](#register-runtime) -* [roc-plugin-style-css](#roc-plugin-style-css) - * [add-style](#add-style) - -## roc-package-base-dev - -### after-clean - -Hook point for adding code that runs after the clean command is invoked. - -__Initial value:__ _Nothing_ -__Expected return value:__ _Nothing_ - -### before-clean - -Hook point for adding code that runs before the clean command is invoked. - -__Initial value:__ _Nothing_ -__Expected return value:__ `[String]` - -### run-build-command - -Use to add things that should react to the build command being called. - -__Initial value:__ _Nothing_ -__Expected return value:__ `Function` - -#### Arguments - -| Name | Description | Type | -| ------- | -------------------------------------------------------------------------------------- | ---------- | -| targets | The targets to build for, will be based on settings or a possible argument if defined. | `[String]` | - -### run-dev-command - -Use to add things that should react to the dev command being called. - -__Initial value:__ _Nothing_ -__Expected return value:__ _Nothing_ - -#### Arguments - -| Name | Description | Type | -| ------- | ------------------------------------------------------------------------------------- | ---------- | -| targets | The targets use for dev, will be based on settings or a possible argument if defined. | `[String]` | - -## roc-package-web-app-dev - -### server-started - -__Initial value:__ _Nothing_ -__Expected return value:__ _Nothing_ - -## roc-package-webpack-dev - -### build-webpack - -Used to create the final Webpack configuration object. - -__Initial value:__ `{}` -__Expected return value:__ `{}` - -#### Arguments - -| Name | Description | Type | -| ------ | ------------------------------------------------------------------- | -------- | -| target | The target for which the Webpack configuration should be build for. | `String` | - -### create-watchers - -Used to add watchers that should follow a specific format. - -__Initial value:__ `{}` -__Expected return value:__ `{Function}` - -### get-webpack-targets - -Used to inform which targets that should be considered as Webpack targets. Actions should concat the previousValue to build the complete value. - -__Initial value:__ `[]` -__Expected return value:__ `[String]` - -## roc-package-webpack-node-dev - -### dev-process-created - -Used to react to when the development server has started. - -__Initial value:__ _Nothing_ -__Expected return value:__ _Nothing_ - -#### Arguments - -| Name | Description | Type | -| ------------- | --------------------------- | ---- | -| serverProcess | The created server process. | | - -## roc-plugin-assets-images - -### add-image - -Used for adding additional image loaders. - -Important that the _actions_ return an array with loaders or a single loader - - -__Initial value:__ _Nothing_ -__Expected return value:__ `{} / [{}]` ## roc-plugin-start @@ -150,16 +28,3 @@ Can be used to modify the runtime before an application starts. __Initial value:__ _Nothing_ __Expected return value:__ _Nothing_ - -## roc-plugin-style-css - -### add-style - -Used for adding additional style loaders. - -Important that the _actions_ return an object matching the following: - -`{ extensions: String/[String], loaders: String/[String] }` - -__Initial value:__ _Nothing_ -__Expected return value:__ `{String / [String]}` 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 27bb92f..b84e2f2 100644 --- a/packages/roc-package-web-app-react-dev/docs/Settings.md +++ b/packages/roc-package-web-app-react-dev/docs/Settings.md @@ -1,212 +1,9 @@ # Settings for `roc-package-web-app-react-dev` -## Build - -| 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 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 | -| name | The name of the generated application bundle. | build.name | --build-name | `"app"` | `String / [String]` | No | -| path | The basepath for the application. | build.path | --build-path | `"/"` | `Filepath` | No | -| reducers | The reducers to use if no entry file is given, will use default entry files internally. | build.reducers | --build-reducers | `"reducers.js"` | `Filepath` | No | -| reduxMiddlewares | The middlewares to use if no entry file is given, will use default entry files internally. | build.reduxMiddlewares | --build-reduxMiddlewares | `"redux-middlewares.js"` | `Filepath` | No | -| 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 | -| useDefaultRoutes | If Roc should use an internal wrapper around the routes, please look at the documentation for more details. | build.useDefaultRoutes | --build-useDefaultRoutes | `true` | `Boolean` | No | - -### Assets - -#### Images -Settings for image asset related things. - -##### LoadUrl - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| maxSize | The maximum size (in bytes) for base64 encoding an image. | build.assets.images.loadUrl.maxSize | --build-assets-images-loadUrl-maxSize | `10000` | `Integer` | No | - -### Input - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| node | The server entry point file. | build.input.node | --build-input-node | `null` | `Filepath` | No | -| web | The client entry point file. | build.input.web | --build-input-web | `null` | `Filepath` | No | - -### Output - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| node | The output directory for the server build. | build.output.node | --build-output-node | `"build/server"` | `Filepath` | No | -| web | The output directory for the client build. | build.output.web | --build-output-web | `"build/client"` | `Filepath` | No | - -### Style -Settings for style related things. - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| autoprefixer | Settings for Autoprefixer. | build.style.autoprefixer | --build-style-autoprefixer | `[{"browsers":"last 2 version"}]` | `[{}]` | No | -| modules | If CSS Modules should be enabled. | build.style.modules | --build-style-modules | `true` | `Boolean` | No | -| name | The naming pattern to use for the built style files. | build.style.name | --build-style-name | `"[name].[hash].css"` | `Unknown` | No | - ## Dev -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| 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 | - -### Browsersync -Settings for Browsersync. - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| enabled | If Browsersync should be enabled. | dev.browsersync.enabled | --dev-browsersync-enabled | `true` | `Boolean` | No | -| open | If Browsersync should open when the server is ready. | dev.browsersync.open | --dev-browsersync-open | `true` | `Boolean` | No | -| port | The port that Browsersync should start on, should be a range of at least 2 | dev.browsersync.port | --dev-browsersync-port | `3030` | `Integer` | No | - -### DevMiddleware - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| noInfo | If no info should be sent to the console. | dev.devMiddleware.noInfo | --dev-devMiddleware-noInfo | `true` | `Boolean` | No | -| quiet | If nothing should be sent to the console. | dev.devMiddleware.quiet | --dev-devMiddleware-quiet | `false` | `Boolean` | No | - ### HotMiddleware -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| noInfo | If no info should be sent to the console. | dev.hotMiddleware.noInfo | --dev-hotMiddleware-noInfo | `false` | `Boolean` | No | -| overlay | If a overlay should be shown when an error has occurred. | dev.hotMiddleware.overlay | --dev-hotMiddleware-overlay | `true` | `Boolean` | No | -| quiet | If nothing should be sent to the console. | dev.hotMiddleware.quiet | --dev-hotMiddleware-quiet | `false` | `Boolean` | No | -| reload | If the browser should be reloaded if it fails to hot update the code. | dev.hotMiddleware.reload | --dev-hotMiddleware-reload | `false` | `Boolean` | No | - -### ReduxDevtools - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| 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 | `"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 | `"ctrl-h"` | `String` | No | - -### ReduxLogger - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| collapsed | If the logged actions by Redux Logger should be collapsed by default. | dev.reduxLogger.collapsed | --dev-reduxLogger-collapsed | `true` | `Boolean` | No | -| duration | If Redux Logger should print the duration of each action. | dev.reduxLogger.duration | --dev-reduxLogger-duration | `true` | `Boolean` | No | -| level | The logging level for Redux Logger, can be either warn, error or info. | dev.reduxLogger.level | --dev-reduxLogger-level | `"info"` | `/^warn|error|info$/` | No | -| timestamp | If Redux Logger should print the timestamp with each action. | dev.reduxLogger.timestamp | --dev-reduxLogger-timestamp | `true` | `Boolean` | No | - -### Yellowbox - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| enabled | If YellowBox should be enabled. | dev.yellowbox.enabled | --dev-yellowbox-enabled | `true` | `Boolean` | No | -| ignore | Array of prefix strings that should be ignored by YellowBox. | dev.yellowbox.ignore | --dev-yellowbox-ignore | `["[HMR]","Warning: React attempted to reuse markup in a container"]` | `[String]` | No | - -## Runtime - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| 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 | -| 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 | -| 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. - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| href | The document base address from which relative links are made. | runtime.base.href | --base-href | `"ROC_PATH"` | `String` | No | -| target | The browsing context in which the links should open. | runtime.base.target | --base-target | `null` | `String` | No | - -### Debug - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| 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 | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| cert | The certificate file to use when using HTTPS. If none is provided and if running in dev a file will be provided automatically. | runtime.https.cert | --https-cert | `null` | `Unknown` | No | -| key | The key file to use when using HTTPS. If none is provided and if running in dev a file will be provided automatically. | runtime.https.key | --https-key | `null` | `Unknown` | No | -| port | Port for the server to use for HTTPS. If none is defined it will not launch in HTTPS. | runtime.https.port | --https-port | `null` | `Unknown` | No | - -### Koa -Settings for how Koa should handle paths. - -#### Lowercase - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| defer | If this should be performed after looking for a file on disk. | runtime.koa.lowercase.defer | --koa-lowercase-defer | `true` | `Boolean` | No | -| enabled | If paths should be transformed to lowercase. | runtime.koa.lowercase.enabled | --koa-lowercase-enabled | `true` | `Boolean` | No | - -#### Normalize - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| 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 | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| defer | If this should be performed after looking for a file on disk. | runtime.koa.trailingSlashes.defer | --koa-trailingSlashes-defer | `true` | `Boolean` | No | -| enabled | Set to true to enforce trailing slashes, false to remove them and null for no rule. | runtime.koa.trailingSlashes.enabled | --koa-trailingSlashes-enabled | `true` | `Boolean` | No | - -### Template - -| Name | Description | Path | CLI option | Default | Type | Required | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | -| name | Name of the template file that will be used. Uses Nunjucks, please see documentation for more info. | runtime.template.name | --template-name | `"main.html"` | `String` | No | -| path | A directory where the template for the application can be found. Will default to internal path. | runtime.template.path | --template-path | `null` | `Filepath` | No | +| Name | Description | Path | CLI option | Default | Type | Required | +| ------ | ----------- | ------------------------ | -------------------------- | ------- | --------- | -------- | +| reload | | dev.hotMiddleware.reload | --dev-hotMiddleware-reload | `false` | `Unknown` | No | diff --git a/packages/roc-package-web-app-react-dev/package.json b/packages/roc-package-web-app-react-dev/package.json index a6b194b..3e1d5a1 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.12", + "version": "1.0.0-alpha.13", "main": "lib/index.js", "bin": "bin/index.js", "scripts": { diff --git a/packages/roc-package-web-app-react/package.json b/packages/roc-package-web-app-react/package.json index e1550d9..e16f60d 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.12", + "version": "1.0.0-alpha.13", "main": "lib/index.js", "bin": "bin/index.js", "scripts": {