docs: document config/ and some directories in app/.

* Add README files to several directories in app/ giving a brief
  overview of some parts of Danbooru's architecture.
* Add documentation for files in config/.
This commit is contained in:
evazion
2021-06-26 22:47:54 -05:00
parent b9068b8a3e
commit 0563ca3001
28 changed files with 534 additions and 8 deletions

16
config/webpack/README.md Normal file
View File

@@ -0,0 +1,16 @@
# Webpack
This directory contains configuration for Webpack. Webpack is used to bundle Javascript and CSS
assets in production. In Rails, Webpack is wrapped by Webpacker, a layer that tries to provide
sensible defaults for Webpack.
# See also
* [app/javascript](../../app/javascript)
* [config/webpacker.yml](../webpacker.yml)
# External links
* https://guides.rubyonrails.org/webpacker.html
* https://github.com/rails/webpacker#webpack-configuration
* https://webpack.js.org/configuration/

View File

@@ -13,6 +13,7 @@ module.exports = merge(webpackConfig, {
},
module: {
rules: [{
// https://github.com/usabilityhub/rails-erb-loader
test: /.erb$/,
enforce: "pre",
exclude: /node_modules/,

View File

@@ -1,3 +1,5 @@
// @see https://github.com/webpack-contrib/eslint-webpack-plugin
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const { merge } = require('@rails/webpacker')