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

[Feature]: Custom export behaviour for Gitlab pages #157

Closed
1 of 2 tasks
YanPes opened this issue Jan 25, 2024 · 6 comments
Closed
1 of 2 tasks

[Feature]: Custom export behaviour for Gitlab pages #157

YanPes opened this issue Jan 25, 2024 · 6 comments
Milestone

Comments

@YanPes
Copy link

YanPes commented Jan 25, 2024

What problem does this feature solve?

As a customer I want to publish the Rsdoctor report on a Gitlab Pages page or a custom hosting solution to be able to access the generated reports from outside. This will help customers monitor the running applications without the need of a local running system.

Acceptance:

  • Create a output behaviour to generate a static dist folder in the project directory
  • The plugin option has a new parameter to toggle the static export behaviour
  • Customers can use the dist export for Gitlab pages or a custom hosting

What does the proposed API look like?

New plugin option:

new RsdoctorRspackPlugin({
      [...],
      staticExport: true
    }),

Generated static files for usage:
// my-repository-path/dist/rsdoctor/index.html
// my-repository-path/dist/rsdoctor/main.css
// my-repository-path/dist/rsdoctor/main.js

Tasks

Preview Give feedback
  1. 💡 feature
@easy1090
Copy link
Contributor

Good idea! I'll include this in the plan.
Perhaps you only need to report assets once. If you need historical assets, you should keep the reports.

@YanPes
Copy link
Author

YanPes commented Jan 30, 2024

Thank you for the fast action on this request. Really appreciate it!

@easy1090 easy1090 added this to the 0.2.0 milestone Feb 3, 2024
@YanPes
Copy link
Author

YanPes commented Apr 23, 2024

@easy1090 any rough idea when this will be implemented?

@easy1090
Copy link
Contributor

easy1090 commented Apr 24, 2024

@YanPes At present, in May, the high-priority requirement of Rsdoctor is to improve the efficiency of build analysis on webpack or rspack, but the ability of custom report will be realized in June or July.

Currently, the data of Rsdoctor is too large, which may cause the page to crash, so a streamlined page export is required for the custom report.

In June, the ability of the Rsdoctor plugin system will be provided. During the construction process, users can obtain and operate the Rsdoctor analysis data by themselves:

// xxx.config.js
 new RsdoctorWebpackPlugin({
      extends: [RsdoctorCustomPlugin]
 })
 
 
 // rsdoctorCustomPlugin.ts
 import { definePlugin } from '@rsdoctor/utils'
 const RsdoctorCustomPlugin = definePlugin(() => ({
  handle(data) {
    // .. do something with the data context, the data includes rsdoctor's all analysis data.
  },
}));

@YanPes
Copy link
Author

YanPes commented May 28, 2024

@easy1090 Thank you for the insights on the current development! I will check out the custom plugin approach. Appreciate your efforts! 🥳

@easy1090 easy1090 modified the milestones: 0.2.0, 1.0.0 Jul 2, 2024
@easy1090
Copy link
Contributor

You can use rsdoctor's brief mode, @rsdoctor/* > 0.4.0, https://rsdoctor.dev/guide/start/cicd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants