You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing! FEAScript is in early development, with continuous additions of new features and improvements. To ensure a smooth and collaborative development process, please review and follow the guidelines below.
4
4
5
-
## Contribution Guidelines
5
+
## Contents
6
6
7
-
1.**Respect the existing coding style:** Observe the code near your intended changes and aim to preserve that style in your modifications.
-[Running the Node.js Examples](#running-the-nodejs-examples)
8
13
9
-
2.**Recommended tools:**
10
-
We recommend using [Visual Studio Code](https://code.visualstudio.com/) with the [Prettier plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for automatic code formatting. Additionally, use a **110-character line width** to maintain consistent formatting.
14
+
## Development Environment & Coding Style
11
15
12
-
3.**Naming conventions:**
13
-
Use [camelCase](https://en.wikipedia.org/wiki/Camel_case) formatting for variable names throughout the code.
16
+
- Use [Visual Studio Code](https://code.visualstudio.com/) with the [Prettier plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for automatic code formatting
17
+
- Use a **110-character line width** to maintain consistent formatting
18
+
- Observe the code near your intended changes and aim to preserve that style in your modifications
14
19
15
-
4.**Testing changes locally:**
16
-
Before submitting a pull request, test your modifications by running the FEAScript library from a local directory. For example, you can load the library in your HTML file as follows:
FEAScript can be run on a local server. To start a local server, you can use [Python HTTP Server](https://docs.python.org/3/library/http.server.html):
25
+
### Exceptions
23
26
24
-
```bash
25
-
python -m http.server
26
-
```
27
+
- Public entry file: `index.js` (standard entry point convention)
28
+
- Core model file: `FEAScript.js` (matches the library name)
27
29
28
-
where the server will be available at `http://127.0.0.1:8000/`. Static file server npm packages like [serve](https://github.com/vercel/serve#readme) and [Vite](https://vite.dev/) can also be used.
29
-
30
-
## Branching & Workflow
31
-
32
-
To contribute a new feature or fix:
33
-
34
-
- Do not commit directly to `main` or `dev`.
35
-
- Instead, start your work in a feature branch based on the `dev` branch.
36
-
37
-
**If you are not a member of the repository (e.g., an external contributor), you must first [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo).** Make your changes in your fork, then submit a Pull Request from your fork's feature branch into the`dev` branch.
38
-
39
-
## File Structure Guidelines
30
+
## File Structure
40
31
41
32
All files in the FEAScript-core codebase should follow this structure:
42
33
43
-
1.**Banner**: All files start with the FEAScript ASCII art banner
3. Push and open a PR from your fork’s branch into `main`
96
+
97
+
## Local Testing
98
+
99
+
Before submitting a pull request, test your modifications by running the FEAScript library from a local directory. For example, you can load the library in your HTML file as follows:
FEAScript can be run on a local server. You **must** start the server from the workspace root directory (the folder that contains both `FEAScript-core/` and `FEAScript-website/`), not from inside either subfolder. The HTML files use relative paths such as `../feascript-website.css` and `../../FEAScript-core/src/index.js` that only resolve correctly from that root.
106
+
107
+
```bash
108
+
# Navigate to the workspace root first
109
+
cd /path/to/FEAScript-workspace
110
+
111
+
# Then start the server
112
+
python3 -m http.server
113
+
```
114
+
115
+
The server will be available at `http://127.0.0.1:8000/`. Open a tutorial at its full path, e.g.:
Static file server npm packages like [serve](https://github.com/vercel/serve#readme) and [Vite](https://vite.dev/) can also be used.
122
+
123
+
## Running the Node.js Examples
124
+
125
+
All examples under `examples/` can be run directly with Node.js to verify the library works in a non-browser environment. Run them from the `FEAScript-core/` directory (so that the `feascript` package resolves via `node_modules`):
Each script prints its computed solution array to the console. A successful run exits with code 0 and produces numerical output; any import or runtime error indicates a problem.
153
+
154
+
To run all examples in one go and check for failures:
0 commit comments