Skip to content

Commit 53c6cbc

Browse files
authored
Merge pull request #174 from oanelson/164
editorial cleanup #164
2 parents 70f617f + b5252c2 commit 53c6cbc

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

docs/developer-documentation/concepts/offline-first.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ With offline-first, your application:
1212
- **Synchronizes data automatically.** When internet connectivity returns, the app synchronizes any pending changes with remote servers.
1313
- **Provides a seamless experience.** Whether they're online or offline, users enjoy an uninterrupted experience.
1414

15-
##Service Workers: The Key to Offline-First
15+
## Service Workers: The Key to Offline-First
1616

1717
To achieve offline-first functionality, developers use Service Workers. Service Workers are scripts that run in the background of web applications. They allow network requests and data caching without requiring user interaction. Service Workers help build web applications that function even with internet connectivity issues.

docs/developer-documentation/examples-and-templates/examples-and-templates.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ sidebar_position: 3
44

55
# Examples and Templates
66

7+
Examples are small projects designed to demonstrate RADFish ecosystem. Templates are meant to be a clean starting point for a new RADFish project.
8+
79
## Examples
810

9-
Examples are small, scoped projects that are meant to demonstrate how to implement core pieces of functionality within the RADFish ecosystem. Each example includes a detailed `README.md` file about the purpose of each example, and the reasoning behind the design pattern, and the best practices utilized in each.
11+
Each exammple is scoped to teach developers how to implement core pieces of functionality. Examples include a detailed `README.md` file that explains its purpose, design pattern, and best practices.
1012

11-
These examples are meant to be a reference for any RADFish project. While these examples can certainly be used as a starting point to build out a new RADFish application, we still suggest starting with a fresh `react-javascript` template (see below).
13+
These examples are meant to be a reference for any RADFish project. These examples can serve as a starting point to build out a new RADFish application. However, we recommend starting with a fresh `react-javascript` template.
1214

13-
You can visualize the source code for each example at the open source repository for the overall RADFish [boilerplate](https://github.com/NMFS-RADFish/boilerplate/tree/main/examples). Each of these examples can be cloned and run separately as you are working with each from the RADFish CLI. To learn more about how to run these scripts, please reference the [running examples](./building-your-application/available-scripts/running-example) section of this documentation
15+
The source code for each example is in the open source repo for RADFish [boilerplate](https://github.com/NMFS-RADFish/boilerplate/tree/main/examples). Each example can be cloned and run separately as you are working with each from the RADFish CLI. To learn how to run these scripts, refer to the [running examples](./building-your-application/available-scripts/running-example) section.
1416

15-
Below are a list of pre-built examples that you can use as a starting point for your application. These examples are scoped to one core feature.
17+
### List of Examples
18+
Here's a list of pre-built examples that you can use as a starting point for your application. These examples are scoped to one core feature.
1619

1720
1. [Computed Form Fields](https://github.com/NMFS-RADFish/boilerplate/blob/main/examples/computed-form-fields/README.md)
1821
1. [Conditional Form Fields](https://github.com/NMFS-RADFish/boilerplate/blob/main/examples/conditional-form-fields/README.md)
@@ -28,19 +31,21 @@ Below are a list of pre-built examples that you can use as a starting point for
2831

2932
## Templates
3033

31-
Templates are meant to be a clean starting point for a new RADFish project. These templates are framework specific. Note that at the time of this writing, only the `react-javascript` template is supported, though new frameworks/languages are planned to be supported in the future!
34+
These templates are framework-specific. At the time of this writing, only the `react-javascript` template is supported. New templates for other frameworks and other languages are planned for the future!
35+
36+
Templates come pre-configured with everything to start coding your new project right away. This includes RADFish core modules, service-worker configuration, application routing, and offline storage.
3237

33-
The template will come pre-configured with everything you need to get up and running to start coding your new project as quickly as possible. This will include the core modules of RADFish, including service-worker configuration, application routing, and offline storage.
38+
Creating a new project based on a template is similar to running an example. If you want to create a new project from the `react-javascript` library, execute this RADFish CLI command:
3439

35-
If you want to create a new project based from the `react-javascript` library, you can execute the following RADFish CLI command, similar to how you run examples: `npx @nmfs-radfish/create-radfish-app my-app --template react-javascript`
40+
`npx @nmfs-radfish/create-radfish-app my-app --template react-javascript`
3641

3742
This will create a new RADFish project named `my-app` in your current working directory. Happy hacking!
3843

39-
Note: The `react-javascript` template is the default, so running `npx @nmfs-radfish/create-radfish-app my-app` will create the same project without needing to specify the template.
44+
**Note:** The `react-javascript` template is the default. Running `npx @nmfs-radfish/create-radfish-app my-app` will create the same project without needing to specify the template.
4045

4146
### Template Directory Structure
4247

43-
Once you scaffold a new template radfish app, you will be given the following file structure:
48+
Once you scaffold a new template radfish app, you'll be given the following file structure:
4449

4550
```bash
4651
my-app
@@ -72,45 +77,45 @@ my-app
7277

7378
#### Root Level
7479

75-
- **`babel.config.js`** Configuration file for Babel, a JavaScript compiler. It specifies how Babel should transpile your code, enabling the use of modern JavaScript features while maintaining compatibility with older browsers.
80+
- **`babel.config.js`** Configuration file for Babel, a JavaScript compiler. It specifies how Babel should transpile your code. This enables modern JavaScript features while maintaining compatibility with older browsers.
7681

7782
- **`index.html`** The main HTML file that serves as the entry point of your application. It includes references to your compiled JavaScript and CSS files generated by the build process.
7883

7984
- **`node_modules/`** This directory contains all the project's dependencies installed via npm. It's automatically generated when you run `npm install`. You should not manually modify this folder, as it's managed by npm.
8085

81-
- **`package-lock.json`** Automatically generated file that records the exact version of each installed package. It ensures consistent installs across different environments by locking the dependencies to specific versions.
86+
- **`package-lock.json`** Automatically generated file that records the exact version of each installed package. It locks dependencies to specific versions. This ensures consistent installs across different environments.
8287

8388
- **`package.json`** A manifest file for your Node.js project. It includes metadata about the project, such as the name, version, scripts, dependencies, and more. This file is essential for managing project configurations and dependencies.
8489

8590
- **`vite.config.js`** Configuration file for Vite, a fast build tool and development server. It customizes the behavior of the Vite server and build process, including plugins, aliases, and other settings.
8691

8792
#### mocks/
8893

89-
Contains files related to mocking API requests for development and testing purposes.
94+
This folder contains files related to mocking API requests for development and testing purposes.
9095

9196
- **`mocks/browser.js`** Sets up and configures the mock service worker for the browser environment. It intercepts network requests during development to simulate API responses without needing a real backend.
9297

9398
- **`mocks/handlers.js`** Defines request handlers for the mock service worker. Each handler specifies how to respond to certain API requests, allowing you to test different scenarios and data flows.
9499

95100
#### public/
96101

97-
Contains static assets that will be served directly to the browser. These files are not processed by Webpack.
102+
This folder ontains static assets that will be served directly to the browser. These files are not processed by Webpack.
98103

99-
- **`public/icons`**: Directory containing icon images of various sizes, typically used for favicons and PWA (Progressive Web App) requirements.
100-
- **`manifest.json`**: Provides metadata about the web application, useful for Progressive Web Apps (PWAs).
101-
- **`mockServiceWorker.js`**: The script for the mock service worker. It's automatically generated and used by the msw library to intercept network requests in the browser.
102-
- **`noaafavicon.png`**: The favicon image for your application, which appears in the browser tab and bookmarks.
104+
- **`public/icons`**: Directory containing icon images of various sizes. Typically used for favicons and Progressive Web App (PWA) requirements.
105+
- **`manifest.json`**: Provides metadata about the web application. Useful for PWAs.
106+
- **`mockServiceWorker.js`**: The automatically generated script for the mock service worker. It's used by the msw library to intercept network requests in the browser.
107+
- **`noaafavicon.png`**: The favicon image for your application. This appears in the browser tab and bookmarks.
103108
- **`robots.txt`**: A file that provides directives to web crawlers and bots about which pages or sections of your site should not be processed or scanned.
104109

105110
#### src/
106111

107-
Source code for your React application resides. This is where you will spend most of your development time.
112+
This folder contains source code for your React application. This is where you will spend most of your development time.
108113

109114
- **`App.js`**: The root React component of your application. It serves as the main container for your app's components and routes.
110115
- **`index.jsx`**: The entry point for your React application. It renders the App component into the DOM and may include global providers like routers or state management tools.
111-
- **`index.css`**: Provides general styling rules that apply to the entire app, including resets, normalizations, and default HTML element styling.
116+
- **`index.css`**: Provides general styling rules that apply to the entire app. It includes resets, normalizations, and default HTML element styling.
112117
- **`pages/`**: Directory containing React components that represent different pages or routes in your application. Each file typically corresponds to a route managed by your router.
113-
- **`pages/Home.jsx`**: Represents the main landing page of your application. It defines the content and layout for the homepage, often containing key UI components such as headers, footers, navigation, and other elements relevant to the first impression of your app.
114-
- **`service-worker.js`**:Custom service worker script for handling offline support, caching, and other background tasks. It enables your app to function as a PWA with offline capabilities.
118+
- **`pages/Home.jsx`**: The main landing page of your application. It defines the content and layout for the homepage. It often contains key UI components such as headers, footers, navigation, and other elements relevant to the first impression of your app.
119+
- **`service-worker.js`**: Custom service worker script for handling offline support, caching, and other background tasks. It enables your app to function as a PWA with offline capabilities.
115120
- **`styles/`**: Directory for organizing additional CSS or styling files, such as variables, mixins, or component-specific stylesheets.
116-
- **`styles/theme.css`**: Contains global theme variables and styles for consistency in design (like colors, fonts, and spacing).
121+
- **`styles/theme.css`**: Contains global theme variables and styles for consistency in design like colors, fonts, and spacing.

0 commit comments

Comments
 (0)