同步操作将从 大漠穷秋/NiceFish 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
简体中文 | English
NiceFish is a series of projects aimed at demonstrating the development and deployment model of front-end and back-end separation. There are three front-end versions: browser environment, mobile environment, and Electron environment; and two back-end versions: SpringBoot version and SpringCloud version.
🚀🚀🚀 Don't hesitate to give your ⭐️ Star ⭐️, the more stars, the more motivation. 🚀🚀🚀
Name | Version | Description |
---|---|---|
Angular | 16.2.0 | Angular Core Library. |
PrimeNG | 16.2.0 | Open-source component library. |
Bootstrap | 5.2.3 | Responsive layout framework. |
ngx-bootstrap | 11.0.2 | Open-source component library based on Bootstrap. |
echarts | 5.4.2 | Graphics library from Baidu. |
ngx-echarts | 15.0.3 | Angular wrapper for echarts library. |
ckeditor5-angular | 5.2.0 | Rich text editor. |
font-awesome | 4.7.0 | Open-source icon library. |
Note: To prevent NodeJS module compatibility issues, this project locks all Node module versions in package.json. If necessary, you can test compatible version numbers yourself (not recommended, as it consumes a lot of time).
Open the terminal and execute the following commands:
git clone https://gitee.com/mumu-osc/NiceFish.git
cd NiceFish
npm i -g @angular/cli
npm i
ng serve
Open your browser and visit http://localhost:4200/
🚀🚀🚀 Chinese developers: Due to network issues, it is recommended to use nrm to manage npm registry.
npm i -g nrm
nrm use taobao
This way, npm will use the registry provided by Taobao for installing node modules.
To facilitate front-end and back-end separation development, this project provides two startup modes:
Configuration related to the startup environment is in environment.* and angular.json files.
Execute the following command to run unit tests:
ng test
Unit tests are run using ChromeHeadless, with test cases executed concurrently based on the number of CPU cores. The configuration in karmar.conf.js was inspired by VMware's Clarity project, see https://github.com/vmware-clarity/ng-clarity.
Code coverage report:
For detailed usage of unit testing and Jasmine syntax, refer to: https://angular.io/guide/testing
Starting from Angular v12, the official Protractor tool for end-to-end testing has been deprecated. This project has switched to using the recommended Cypress tool for end-to-end testing. Execute the following command to start end-to-end testing:
ng e2e
For technical details about Cypress, refer to: https://testing-angular.com/end-to-end-testing/#end-to-end-testing
There are two build modes corresponding to the development state:
If you need the <base href="/NiceFish/"/> tag in the index.html of the build output, add the parameter --base-href /NiceFish/ to the above commands.
Note that NiceFish is the project name; if you changed the project name, replace NiceFish with your own project name.
Execute the following commands one by one (replace my Docker platform ID with your own):
Below is the module composition analysis using webpack-bundle-analyzer:
It appears that CKEditor and ECharts consume a significant amount of space, indicating a need for asynchronous loading.
To use webpack-bundle-analyzer, follow these steps:
Name | Description | Stars |
---|---|---|
NiceFish | This is the front-end interface of the Angular version, based on the latest Angular version and using the PrimeNG component library. | |
NiceFish-React | This is the front-end interface of the React version, based on React 18.0.0, using PrimeReact and a customized version of Bootstrap for development. Pure JSX, without TypeScript. | |
nicefish-ionic | This is a mobile demo based on ionic, and the project supports PWA. | |
NiceBlogElectron | This is a desktop project based on Electron, packaging NiceFish as a desktop application. It was provided by a front-end colleague from ZTE Corporation, and I forked it. Version numbers of certain node modules need to be updated frequently, making it unsuitable for use. |
Name | Description | Stars |
---|---|---|
nicefish-spring-boot | This project demonstrates the interaction between front-end and back-end in a front-end and back-end separation mode. It has a basic version completed. You can further develop it to suit your own business scenario. | |
nicefish-spring-cloud | This project demonstrates the interaction between front-end and distributed back-end services in a front-end and back-end separation mode. |
MIT
(Supplementary statement: You are free to use this project, but I am not responsible for any losses resulting from your use of this project.)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。