Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mentions of Babel and other small fixes #59

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions developer/codeOrganization.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ <h2>Metadata</h2>
<p>In the root directory, OED has several metadata files. These are further organized by technology or purpose.</p>
<h3>For Humans</h3>
<ul>
<li><strong>CODE_OF_CONDUCT</strong> describes conduct expectations and how to report any concerns.</li>
<li><strong>CODE_OF_CONDUCT.md</strong> describes conduct expectations and how to report any concerns.</li>
<li> <strong>CONTRIBUTING.md</strong> provides information on contributing to OED. </li>
<li> <strong>License.txt</strong> describes the legal aspect of the project. OED is licensed under the <a
href="https://www.mozilla.org/en-US/MPL/2.0/" rel="nofollow">Mozilla Public License version 2.0</a>.
</li>
<li> <strong>README.md</strong> is an overview of the project, displayed on the GitHub front page for the
project. </li>
<li><strong>Security.md</strong> describes how to report security concerns to OED.</li>
<li><strong>Support.md</strong> describes where to get information on support related to OED.</li>
<li><strong>SECURITY.md</strong> describes how to report security concerns to OED.</li>
<li><strong>SUPPORT.md</strong> describes where to get information on support related to OED.</li>
<li> <strong>USAGE.md</strong> describes how to install, configure, and use the project from a sysadmin's point
of view. </li>
</ul>
Expand All @@ -51,8 +51,7 @@ <h3>For Development Tools</h3>
</ul>
<h3>For Code Transformers</h3>
<ul>
<li> <strong>babel.config.json</strong> configures the Babel JavaScript compiler </li>
<li> <strong>webpack.config.js</strong> configures the WebPack JavaScript uglifier, optimizer, and packer </li>
<li> <strong>webpack.config.js</strong> configures the Webpack JavaScript uglifier, optimizer </li>
</ul>
<h3>For Dependency Management Tools</h3>
<ul>
Expand All @@ -73,15 +72,12 @@ <h2>Frontend Code</h2>
transpiled and minified prior to delivery.</p>
<p>This code is contained in several directories:</p>
<ul>
<li> <strong>actions/</strong> are the messages that components send to reducers to change the application
state. </li>
<li> <strong>components/</strong> are the React.js components which generate HTML that is displayed on the page.
Components can be combined and composed to create the UI that is displayed to the user. </li>
<li> <strong>containers/</strong> connect the React.js components to the application state (managed by Redux)
through props and dispatched actions. </li>
<li> <strong>reducers/</strong> accept messages sent by components and change the global application state
accordingly. </li>
<li> <strong>style/</strong> CSS files for the website. </li>
<li> <strong>redux/</strong> are the logic for handling and changing global application state. </li>
<li> <strong>styles/</strong> CSS files for the website. </li>
<li> <strong>translations/</strong> defines the strings used to make OED multilingual. </li>
<li> <strong>types/</strong> define the datatypes used throughout the frontend. </li>
<li> <strong>utils/</strong> defines functions used across the application and some APIs. </li>
Expand All @@ -106,7 +102,7 @@ <h2>Backend Code</h2>
<li> <strong>sql/</strong> contains the database queries used by models to talk to the PostgreSQL database.
</li>
<li> <strong>test/</strong> contains the test code run for validation of OED. </li>
<li> <strong>utils/</strong> contains utility functions and constants. </li>
<li> <strong>util/</strong> contains utility functions and constants. </li>
</ul>

<h2>Common Code</h2>
Expand All @@ -126,17 +122,17 @@ <h2>Scripts</h2>
<li> <strong>devcheck.sh</strong> runs all the checks (header, typescript, types and lint) in one easy step.
</li>
<li> <strong>devstart.sh</strong> starts both the webserver and Webpack, in dev mode (watches files and shows
interactive). This isn not normally used to start OED for developers. </li>
interactive). This is not normally used to start OED for developers. </li>
<li> <strong>installOED.sh</strong> sets up OED, either for development or production, creating the database
schema and installing dependencies. This is often run using <code>docker compose up</code> or some variant
of this. It should be automatically run inside toe VSC container. </li>
<li> <strong>oed.service</strong> is a sample <a href="https://www.freedesktop.org/wiki/Software/systemd/"
rel="nofollow">systemd</a> unit file which allows Linux system administrators to start OED on startup.
</li>
<li> <strong>refreshHourlyReadingViewsCron.bash</strong> is a script meant to be run at regular intervals (for
instance, with cron) which updates the hourly view table that is needed to graph OED data. </li>
<li> <strong>refreshReadingViewsCron.bash</strong> is a script meant to be run at regular intervals (for
instance, with cron) which updates the daily view table that is needed to graph OED data. </li>
<li> <strong>refreshDailyReadingViewsCron.bash</strong> is a script meant to be run at regular intervals (for
instance, with cron) which updates the hourly view table that is needed to graph OED data. </li>
<li> <strong>sendLogEmailCron.bash</strong> is a script meant to be run at regular intervals (for instance, with
cron) which sends an email with information from OED logging since the last time this ran. </li>
<li> <strong>updateEgaugeMetersOEDCron.bash</strong> is a script meant to be run at regular intervals (for
Expand All @@ -151,8 +147,8 @@ <h2>Other directories</h2>
changed by someone. A few noticeable ones are:
</p>
<ul>
<li><strong>node_modules/</strong> is created during the npm install process and contains information on all
node packages used.</li>
<li><strong>node_modules/</strong> is created during the npm install process and stores the downloaded packges for all
npm packages that are used.</li>
<li><strong>postgres-data/</strong> is created during the PostgreSQL install process and contains the
information about the database and all records stored. It is the one set of files that exist between runs of
the Docker container and are linked from the Docker container to the regular file system. This is done so
Expand Down
1 change: 1 addition & 0 deletions developer/technologies.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ <h2>Frontend Technologies</h2>
<p><img src="./images/OEDFrontEndOverview.jpg"
alt="The flow of OED's source code from source JS, TS, and CSS, through various loaders, into Webpack, out into source maps, back into Webpack, and finally into the final bundle which is served to the client."
data-canonical-src="https://i.imgur.com/YZFC9xZ.jpg"></p>
<p>Note that the diagram is currently out of date. Now, both JavaScript and TypeScript are ran through the standard "TypeScript Loader", while being processed by Webpack. Babel is no longer used.</p>
<p>After this process, our hundreds of source files and dependencies are converted into a single multi-megabyte file
which will be transmitted to our users over HTTP. Plugins within Webpack, such as the
LodashModuleReplacementPlugin, further optimize the size of this bundle.</p>
Expand Down