SuperInvestor is a Blazor application for managing and analyzing investment filings.
- .NET 7.0 SDK or later
- Node.js and npm
- Clone the repository
- Navigate to the project root directory
- Enter the secrets for appsettings.json
- Ensure you have Node.js and npm installed on your system.
- In the project root directory, run:
npm install
This will install all the JavaScript dependencies defined in the package.json
file.
- To automatically rebuild the bundle on each change, run:
npm run watch
This command will watch for changes in your JavaScript files and automatically rebuild the bundle.js file.
- To add a new JavaScript library, use the following command:
npm install <library-name> --save
For example, to add the lodash
library:
npm install lodash --save
- After installing, you can import and use the library in your JavaScript files:
import _ from 'lodash';
- In your JavaScript files (e.g., in the
wwwroot/javascript
directory), you can import and use the installed libraries:
import _ from 'lodash';
import Mark from 'mark.js/dist/mark.es6.min.js';
// Use the libraries in your code
- After modifying your JavaScript files, run the build script to bundle your JavaScript:
npm run build
- The bundled JavaScript file (
bundle.js
) is already included in yourApp.razor
file:
<script src="dist/bundle.js"></script>
- To run the application, use the following command in the project root directory:
dotnet run
- Open a web browser and navigate to
https://localhost:7083
(or the port specified in the console output).
wwwroot/javascript
: Contains all JavaScript files for the projectComponents
: Contains Blazor componentsServices
: Contains C# service classeswwwroot/dist
: Contains the bundled JavaScript file
For more detailed information about specific components or services, please refer to the comments in the respective files.