diff --git a/TODO.md b/TODO.md index bc3bdb07..eb63ebc9 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,9 @@ This page documents all the TODO items in this project. -- @flecks/dox/src/parser.js:309:6 +- @flecks/dox/src/parser.js:309:6 > @todo Aliased fleck paths are gonna be bad. -- @flecks/governor/src/limiter.js:10:2 +- @flecks/governor/src/limiter.js:10:2 > @todo node-redis@4 -- @flecks/web/src/server/build/web.webpack.config.js:50:4 +- @flecks/web/src/server/build/web.webpack.config.js:50:4 > @todo source maps working? diff --git a/config.md b/config.md index 2cbe24b4..64932907 100644 --- a/config.md +++ b/config.md @@ -2,318 +2,179 @@ This page documents all the configuration in this project. -## `@flecks/core` - -> The ID of your application. - -```javascript -id: 'flecks' -``` - -## `@flecks/core/server` - -> Build targets to exclude from ESLint. - -```javascript -eslint.exclude: [] -``` - -> Build targets to profile with `webpack.debug.ProfilingPlugin`. - -```javascript -profile: [] -``` - -## `@flecks/db/server` - -> The database to connect to. - -```javascript -database: ':memory:' -``` - -> SQL dialect. See: https://sequelize.org/v5/manual/dialects.html - -```javascript -dialect: 'sqlite' -``` - -> Database server host. - -```javascript -host: undefined -``` - -> Database server password. - -```javascript -password: undefined -``` - -> Database server port. - -```javascript -port: undefined -``` - -> Database server username. - -```javascript -username: undefined -``` - -## `@flecks/docker/server` - -> Whether to run docker containers. - -```javascript -enabled: true -``` - -## `@flecks/dox/server` - -> Rewrite the output filenames of source files. `filename.replace(new RegExp([key]), [value]);` - -```javascript -filenameRewriters: {} -``` - -## `@flecks/electron/server` - -> Browser window options. See: https://www.electronjs.org/docs/latest/api/browser-window - -```javascript -browserWindowOptions: {} -``` - -> Install devtools extensions (by default). If `true`, will install some devtools extensions based on which flecks are enabled. You can pass an array of Chrome store IDs to install a list of custom extensions. Extensions will not be installed if `'production' === process.env.NODE_ENV` - -```javascript -installExtensions: true -``` - -> Quit the app when all windows are closed. - -```javascript -quitOnClosed: true -``` - -> The URL to load in electron by default. Defaults to `http://${flecks.get('@flecks/web/server.public')}`. - -```javascript -url: undefined -``` - -## `@flecks/fleck/server` - -> Webpack stats configuration when building fleck target. - -```javascript -stats: { - assetsSort: 'name', - assetsSpace: Infinity, - children: false, - colors: true, - excludeAssets: [/^(?:build|src|test)\//], - groupAssetsByChunk: false, - groupAssetsByEmitStatus: false, - groupAssetsByExtension: false, - groupAssetsByInfo: false, - groupAssetsByPath: false, - modules: false, - } -``` - -## `@flecks/governor/server` - -> All keys used to determine fingerprint. - -```javascript -keys: ['ip'] -``` - -> *No description provided.* - -```javascript -web: { - keys: ['ip'], - points: 60, - duration: 30, - ttl: 30, - } -``` - -> *No description provided.* - -```javascript -socket: { - keys: ['ip'], - points: 60, - duration: 30, - ttl: 30, - } -``` - -## `@flecks/react` - -> Whether to enable server-side rendering. - -```javascript -ssr: true -``` - -## `@flecks/redis/server` - -> Redis server host. - -```javascript -host: 'localhost' -``` - -> Redis server port. - -```javascript -port: 6379 -``` - -## `@flecks/server` - -> Whether HMR is enabled. - -```javascript -hot: false -``` - -> Arguments to pass along to node. See: https://nodejs.org/api/cli.html - -```javascript -nodeArgs: [] -``` - -> Whether to start the server after building. - -```javascript -start: true -``` - -> Webpack stats configuration when building server target. - -```javascript -stats: { - chunks: false, - colors: true, - modules: false, - } -``` - -## `@flecks/user/local/server` - -> Path to redirect to after failed login. - -```javascript -failureRedirect: '/' -``` - -> Path to redirect to after successful login. - -```javascript -successRedirect: '/' -``` - -## `@flecks/user/session/server` - -> Set the cookie secret for session encryption. See: http://expressjs.com/en/resources/middleware/cookie-parser.html - -```javascript -cookieSecret: 'Set the FLECKS_ENV_FLECKS_USER_SESSION_SERVER_cookieSecret environment variable!' -``` - -## `@flecks/web/server` - -> (webpack-dev-server) Disable the host check. See: https://github.com/webpack/webpack-dev-server/issues/887 - -```javascript -devDisableHostCheck: false -``` - -> (webpack-dev-server) Host to bind. - ```javascript -devHost: 'localhost' -``` - -> (webpack-dev-server) Port to bind. - -```javascript -devPort: undefined -``` - -> (webpack-dev-server) Public path to serve. Defaults to `flecks.get('@flecks/web/server.public')`. - -```javascript -devPublic: undefined -``` - -> (webpack-dev-server) Webpack stats output. - -```javascript -devStats: { - assets: false, - chunks: false, - colors: true, - modules: false, - } -``` - -> Modules to externalize using `webpack.DllPlugin`. - -```javascript -dll: [] -``` - -> Force building http target even if there's a fleck target. - -```javascript -forceBuildWithFleck: false -``` - -> Host to bind. - -```javascript -host: '0.0.0.0' -``` - -> Build path. - -```javascript -output: 'web' -``` - -> Port to bind. - -```javascript -port: 32340 -``` - -> Public path to server. - -```javascript -public: 'localhost:32340' -``` - -> Webpack stats configuration when building HTTP target. - -```javascript -stats: { - children: false, - chunks: false, - colors: true, - modules: false, - } -``` - -> Proxies to trust. See: https://www.npmjs.com/package/proxy-addr - -```javascript -trust: false -``` +'@flecks/core': { + // The ID of your application. + id: 'flecks' +} +``` +```javascript +'@flecks/core/server': { + // Build targets to exclude from ESLint. + eslint.exclude: [] + // Build targets to profile with `webpack.debug.ProfilingPlugin`. + profile: [] +} +``` +```javascript +'@flecks/db/server': { + // The database to connect to. + database: ':memory:' + // SQL dialect. See: https://sequelize.org/v5/manual/dialects.html + dialect: 'sqlite' + // Database server host. + host: undefined + // Database server password. + password: undefined + // Database server port. + port: undefined + // Database server username. + username: undefined +} +``` +```javascript +'@flecks/docker/server': { + // Whether to run docker containers. + enabled: true +} +``` +```javascript +'@flecks/dox/server': { + // Rewrite the output filenames of source files. `filename.replace(new RegExp([key]), [value]);` + filenameRewriters: {} +} +``` +```javascript +'@flecks/electron/server': { + // Browser window options. See: https://www.electronjs.org/docs/latest/api/browser-window + browserWindowOptions: {} + // Install devtools extensions (by default). If `true`, will install some devtools extensions based on which flecks are enabled. You can pass an array of Chrome store IDs to install a list of custom extensions. Extensions will not be installed if `'production' === process.env.NODE_ENV` + installExtensions: true + // Quit the app when all windows are closed. + quitOnClosed: true + // The URL to load in electron by default. Defaults to `http://${flecks.get('@flecks/web/server.public')}`. + url: undefined +} +``` +```javascript +'@flecks/fleck/server': { + // Webpack stats configuration when building fleck target. + stats: { + assetsSort: 'name', + assetsSpace: Infinity, + children: false, + colors: true, + excludeAssets: [/^(?:build|src|test)\//], + groupAssetsByChunk: false, + groupAssetsByEmitStatus: false, + groupAssetsByExtension: false, + groupAssetsByInfo: false, + groupAssetsByPath: false, + modules: false, + } +} +``` +```javascript +'@flecks/governor/server': { + // All keys used to determine fingerprint. + keys: ['ip'] + // *No description provided.* + web: { + keys: ['ip'], + points: 60, + duration: 30, + ttl: 30, + } + // *No description provided.* + socket: { + keys: ['ip'], + points: 60, + duration: 30, + ttl: 30, + } +} +``` +```javascript +'@flecks/react': { + // Whether to enable server-side rendering. + ssr: true +} +``` +```javascript +'@flecks/redis/server': { + // Redis server host. + host: 'localhost' + // Redis server port. + port: 6379 +} +``` +```javascript +'@flecks/server': { + // Whether HMR is enabled. + hot: false + // Arguments to pass along to node. See: https://nodejs.org/api/cli.html + nodeArgs: [] + // Whether to start the server after building. + start: true + // Webpack stats configuration when building server target. + stats: { + chunks: false, + colors: true, + modules: false, + } +} +``` +```javascript +'@flecks/user/local/server': { + // Path to redirect to after failed login. + failureRedirect: '/' + // Path to redirect to after successful login. + successRedirect: '/' +} +``` +```javascript +'@flecks/user/session/server': { + // Set the cookie secret for session encryption. See: http://expressjs.com/en/resources/middleware/cookie-parser.html + cookieSecret: 'Set the FLECKS_ENV_FLECKS_USER_SESSION_SERVER_cookieSecret environment variable!' +} +``` +```javascript +'@flecks/web/server': { + // (webpack-dev-server) Disable the host check. See: https://github.com/webpack/webpack-dev-server/issues/887 + devDisableHostCheck: false + // (webpack-dev-server) Host to bind. + devHost: 'localhost' + // (webpack-dev-server) Port to bind. + devPort: undefined + // (webpack-dev-server) Public path to serve. Defaults to `flecks.get('@flecks/web/server.public')`. + devPublic: undefined + // (webpack-dev-server) Webpack stats output. + devStats: { + assets: false, + chunks: false, + colors: true, + modules: false, + } + // Modules to externalize using `webpack.DllPlugin`. + dll: [] + // Force building http target even if there's a fleck target. + forceBuildWithFleck: false + // Host to bind. + host: '0.0.0.0' + // Build path. + output: 'web' + // Port to bind. + port: 32340 + // Public path to server. + public: 'localhost:32340' + // Webpack stats configuration when building HTTP target. + stats: { + children: false, + chunks: false, + colors: true, + modules: false, + } + // Proxies to trust. See: https://www.npmjs.com/package/proxy-addr + trust: false +} +``` \ No newline at end of file diff --git a/hooks.md b/hooks.md index fdf07820..29d9694a 100644 --- a/hooks.md +++ b/hooks.md @@ -24,17 +24,17 @@ This page documents all the hooks in this project.
Implementations
Invocations
@@ -72,15 +72,15 @@ export const hooks = {
Implementations
Invocations
@@ -108,8 +108,8 @@ export const hooks = {
Implementations
@@ -140,18 +140,18 @@ export const hooks = {
Implementations
Invocations
@@ -188,20 +188,20 @@ export const hooks = {
Implementations
@@ -284,16 +284,16 @@ export const hooks = {
Implementations
Invocations
@@ -316,17 +316,17 @@ export const hooks = {
Implementations
Invocations
@@ -351,15 +351,15 @@ export const hooks = {
Implementations
Invocations
@@ -393,14 +393,14 @@ export const hooks = {
Implementations
Invocations
@@ -424,16 +424,16 @@ export const hooks = {
Implementations
Invocations
@@ -475,14 +475,14 @@ export const hooks = {
Implementations
Invocations
@@ -515,14 +515,14 @@ export const hooks = {
Implementations
Invocations
@@ -555,17 +555,17 @@ export const hooks = {
Implementations
Invocations
@@ -603,7 +603,7 @@ export const hooks = {
Invocations
@@ -632,7 +632,7 @@ export const hooks = {
Invocations
@@ -657,7 +657,7 @@ export const hooks = {
Invocations
@@ -685,16 +685,16 @@ export const hooks = {
Implementations
Invocations
@@ -730,15 +730,15 @@ export const hooks = {
Implementations
Invocations
@@ -764,14 +764,14 @@ export const hooks = {
Implementations
Invocations
@@ -798,18 +798,18 @@ export const hooks = {
Implementations
Invocations
@@ -837,15 +837,15 @@ export const hooks = {
Implementations
@@ -870,7 +870,7 @@ export const hooks = {
Implementations
@@ -893,14 +893,14 @@ export const hooks = {
Implementations
Invocations
@@ -937,16 +937,16 @@ export const hooks = {
Implementations
Invocations
@@ -978,15 +978,15 @@ export const hooks = {
Implementations
Invocations
@@ -1009,8 +1009,8 @@ export const hooks = {
Implementations
@@ -1033,9 +1033,9 @@ export const hooks = {
Implementations
@@ -1061,14 +1061,14 @@ export const hooks = {
Implementations
Invocations
@@ -1099,15 +1099,15 @@ export const hooks = {
Implementations
Invocations
@@ -1132,16 +1132,16 @@ export const hooks = {
Implementations
Invocations
@@ -1171,15 +1171,15 @@ export const hooks = {
Implementations
Invocations
@@ -1202,10 +1202,10 @@ export const hooks = {
Implementations
@@ -1229,7 +1229,7 @@ export const hooks = {
Implementations
@@ -1263,15 +1263,15 @@ export const hooks = {
Implementations
Invocations
@@ -1294,14 +1294,14 @@ export const hooks = {
Implementations
Invocations