[MediaWiki-commits] [Gerrit] marvin[master]: Chore: abbreviate configuration as "config"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380675 ) Change subject: Chore: abbreviate configuration as "config" .. Chore: abbreviate configuration as "config" Change-Id: Ic93de118aaff7ba76d4818c5b78a8d9a4b51204a --- M docs/development.md M src/common/pages/about.tsx M src/common/routers/route.ts R src/server/config.ts M src/server/index.tsx M webpack.config.ts 6 files changed, 26 insertions(+), 30 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/development.md b/docs/development.md index d7e34ef..f5aa109 100644 --- a/docs/development.md +++ b/docs/development.md @@ -129,6 +129,7 @@ Marvin uses the following abbreviations: +- Configuration => config - Parameters => params - Properties => props - Utilities => utils @@ -151,7 +152,7 @@ ## Environment variables -See [configuration](../src/server/configuration.ts). +See [configuration](../src/server/config.ts). ## Continuous integration diff --git a/src/common/pages/about.tsx b/src/common/pages/about.tsx index af73f3f..51efa42 100644 --- a/src/common/pages/about.tsx +++ b/src/common/pages/about.tsx @@ -20,9 +20,9 @@ componentDidMount() { // todo: figure out a common way across entry points for defining // configuration variables that common code could consume. The server has -// server specific vars in configuration.ts and this here for example are -// used only on DOM capable envs (componentDidMount will only fire on DOM -// capable environments). It would be ideal if we had a common place with +// server specific vars in config.ts and this here for example are used only +// on DOM capable envs (componentDidMount will only fire on DOM capable +// environments). It would be ideal if we had a common place with // configuration for common code. We need to also take into account UglifyJS // and the dead code elimination when using DefinePlugin, so that we can // leverage it to remove dev-only code in production builds diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts index fcc0003..c3474c9 100644 --- a/src/common/routers/route.ts +++ b/src/common/routers/route.ts @@ -23,10 +23,7 @@ getInitialProps?: (params: Params) => Promise; } -export interface RouteConfiguration< - Params extends RouteParams = {}, - Props = void -> { +export interface RouteConfig { path: string; importModule: () => Promise>; chunkName: string; @@ -34,7 +31,7 @@ } export interface Route - extends RouteConfiguration { + extends RouteConfig { status: number; /** Generates a URL from parameters. */ @@ -48,7 +45,7 @@ importModule, chunkName, status = 200 -}: RouteConfiguration ): Route => ({ +}: RouteConfig ): Route => ({ path, importModule, chunkName, diff --git a/src/server/configuration.ts b/src/server/config.ts similarity index 100% rename from src/server/configuration.ts rename to src/server/config.ts diff --git a/src/server/index.tsx b/src/server/index.tsx index cebf7ed..cc1551b 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -23,7 +23,7 @@ SERVER_PORT, SERVER_URL, WEBPACK_DEV_SERVER_URL -} from "./configuration"; +} from "./config"; import HTMLPage from "./components/html-page"; // The asset manifest built or the webpack-dev-server URL (which has no diff --git a/webpack.config.ts b/webpack.config.ts index c965af2..8fafd79 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -7,7 +7,7 @@ VERBOSE, WEBPACK_DEV_SERVER_PORT, WEBPACK_DEV_SERVER_URL -} from "./src/server/configuration"; +} from "./src/server/config"; const pkg = require("./package.json"); @@ -37,7 +37,7 @@ const PREACT = PRODUCTION ? "preact" : "preact/debug"; -const configuration: webpack.Configuration = { +const config: webpack.Configuration = { // Bundled outputs and their source inputs. For each entry, the source input // and any dependencies are compiled together into one chunk file output // except where split by the CommonsChunkPlugin. @@ -77,7 +77,7 @@ output: { // The filesystem base destination directory for the client entry point // chunk files given as an absolute path. All outputs specified in -// `configuration.entry` will be generated here. +// `config.entry` will be generated here. path: PATHS.public.output, // The base web request path for chunk files to appear in the asset @@ -87,7 +87,7 @@ // server. publicPath: PRODUCTION ? "/public/" : `${WEBPACK_DEV_SERVER_URL}/public/`, -// `configuration.entry` chunk filenames. e.g.: +// `config.entry` chunk filenames. e.g.: // // { // ... @@ -98,10 +98,9 @@ // ... // } // -// The
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: abbreviate configuration as "config"
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380675 ) Change subject: Chore: abbreviate configuration as "config" .. Chore: abbreviate configuration as "config" Change-Id: Ic93de118aaff7ba76d4818c5b78a8d9a4b51204a --- M docs/development.md M src/common/pages/about.tsx M src/common/routers/route.ts R src/server/config.ts M src/server/index.tsx M webpack.config.ts 6 files changed, 26 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/75/380675/1 diff --git a/docs/development.md b/docs/development.md index d7e34ef..f5aa109 100644 --- a/docs/development.md +++ b/docs/development.md @@ -129,6 +129,7 @@ Marvin uses the following abbreviations: +- Configuration => config - Parameters => params - Properties => props - Utilities => utils @@ -151,7 +152,7 @@ ## Environment variables -See [configuration](../src/server/configuration.ts). +See [configuration](../src/server/config.ts). ## Continuous integration diff --git a/src/common/pages/about.tsx b/src/common/pages/about.tsx index af73f3f..51efa42 100644 --- a/src/common/pages/about.tsx +++ b/src/common/pages/about.tsx @@ -20,9 +20,9 @@ componentDidMount() { // todo: figure out a common way across entry points for defining // configuration variables that common code could consume. The server has -// server specific vars in configuration.ts and this here for example are -// used only on DOM capable envs (componentDidMount will only fire on DOM -// capable environments). It would be ideal if we had a common place with +// server specific vars in config.ts and this here for example are used only +// on DOM capable envs (componentDidMount will only fire on DOM capable +// environments). It would be ideal if we had a common place with // configuration for common code. We need to also take into account UglifyJS // and the dead code elimination when using DefinePlugin, so that we can // leverage it to remove dev-only code in production builds diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts index d05786d..fdfe631 100644 --- a/src/common/routers/route.ts +++ b/src/common/routers/route.ts @@ -23,10 +23,7 @@ requestProps?: (params: Params) => Promise; } -export interface RouteConfiguration< - Params extends RouteParams = {}, - Props = void -> { +export interface RouteConfig { path: string; importModule: () => Promise>; chunkName: string; @@ -34,7 +31,7 @@ } export interface Route - extends RouteConfiguration { + extends RouteConfig { status: number; /** Generates a URL from parameters. */ @@ -48,7 +45,7 @@ importModule, chunkName, status = 200 -}: RouteConfiguration ): Route => ({ +}: RouteConfig ): Route => ({ path, importModule, chunkName, diff --git a/src/server/configuration.ts b/src/server/config.ts similarity index 100% rename from src/server/configuration.ts rename to src/server/config.ts diff --git a/src/server/index.tsx b/src/server/index.tsx index cebf7ed..cc1551b 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -23,7 +23,7 @@ SERVER_PORT, SERVER_URL, WEBPACK_DEV_SERVER_URL -} from "./configuration"; +} from "./config"; import HTMLPage from "./components/html-page"; // The asset manifest built or the webpack-dev-server URL (which has no diff --git a/webpack.config.ts b/webpack.config.ts index c965af2..8fafd79 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -7,7 +7,7 @@ VERBOSE, WEBPACK_DEV_SERVER_PORT, WEBPACK_DEV_SERVER_URL -} from "./src/server/configuration"; +} from "./src/server/config"; const pkg = require("./package.json"); @@ -37,7 +37,7 @@ const PREACT = PRODUCTION ? "preact" : "preact/debug"; -const configuration: webpack.Configuration = { +const config: webpack.Configuration = { // Bundled outputs and their source inputs. For each entry, the source input // and any dependencies are compiled together into one chunk file output // except where split by the CommonsChunkPlugin. @@ -77,7 +77,7 @@ output: { // The filesystem base destination directory for the client entry point // chunk files given as an absolute path. All outputs specified in -// `configuration.entry` will be generated here. +// `config.entry` will be generated here. path: PATHS.public.output, // The base web request path for chunk files to appear in the asset @@ -87,7 +87,7 @@ // server. publicPath: PRODUCTION ? "/public/" : `${WEBPACK_DEV_SERVER_URL}/public/`, -// `configuration.entry` chunk filenames. e.g.: +// `config.entry` chunk filenames. e.g.: // // { // ... @@ -98,10 +98,9 @@ // ... // } // -// The property names