Skip to content

Commit

Permalink
refactor: Renamed 'Record Viewer' to 'Visualizer' (#1059)
Browse files Browse the repository at this point in the history
* refactor:  Renamed 'Record Viewer' to 'Visualizer'

* doc: update readme

* chore: change visualizer ver

* chore: update changeset

* chore: update cspell

* refactor: rename as @farmfe/js-plugin-visualizer

* chore: update lock file

* chore: update changeset

* Delete .changeset/popular-rings-train.md

---------

Co-authored-by: ADNY <66500121+ErKeLost@users.noreply.github.com>
Co-authored-by: brightwu <1521488775@qq.com>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent f71b21c commit 423a5ad
Show file tree
Hide file tree
Showing 51 changed files with 181 additions and 135 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-windows-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@farmfe/js-plugin-visualizer': major
---

rename as js-plugin-visualizer
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"shulandmimi",
"concurrentify",
"pageerror",
"rsdoctor",
"deepmerge",
"Mergeable"
],
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-adapter-vue/farm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import UnpluginSvgComponent from 'unplugin-svg-component/vite';

import less from '@farmfe/js-plugin-less';
import postcss from '@farmfe/js-plugin-postcss';
import viewer from '@farmfe/js-plugin-record-viewer';
import viewer from '@farmfe/js-plugin-visualizer';

function configureVitePluginVue() {
// return plugin and its filters
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-adapter-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@farmfe/core": "workspace:*",
"@farmfe/js-plugin-less": "workspace:^",
"@farmfe/js-plugin-postcss": "workspace:^",
"@farmfe/js-plugin-record-viewer": "workspace:^",
"@farmfe/js-plugin-visualizer": "workspace:^",
"@farmfe/js-plugin-sass": "workspace:^",
"@farmfe/js-plugin-vue": "workspace:*",
"@farmfe/plugin-sass": "workspace:^",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@

---

# Record Viewer Plugin for Farm
# Visualizer Plugin for Farm

## Getting Started

To begin, you'll need to install `@farmfe/js-plugin-record-viewer`:
To begin, you'll need to install `@farmfe/visualizer`:

```console
npm install @farmfe/js-plugin-record-viewer --save-dev
npm install @farmfe/visualizer --save-dev
```

or

```console
yarn add -D @farmfe/js-plugin-record-viewer
yarn add -D @farmfe/visualizer
```

or

```console
pnpm add -D @farmfe/js-plugin-record-viewer
pnpm add -D @farmfe/visualizer
```

Configuring the plugin in `farm.config.ts`:

```ts
import { defineFarmConfig } from '@farmfe/core/dist/config';
import record from '@farmfe/js-plugin-record-viewer'; // import the plugin
import visualizer from '@farmfe/visualizer'; // import the plugin

export default defineFarmConfig({
compilation: {
Expand All @@ -44,8 +44,8 @@ export default defineFarmConfig({
}
},
plugins: [
// use the record viewer plugin.
record({
// use the visualizer plugin.
visualizer({
// custom options here
})
]
Expand Down Expand Up @@ -78,5 +78,10 @@ type RecordViewerOptions = {
Default: undefined
## Credits
Thanks to:
- The [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) project created by [Anthony Fu](https://github.com/antfu), inspiring the module analysis feature in Farm's Visualizer.
- The [rsdoctor](https://github.com/web-infra-dev/rsdoctor) project created by [web-infra](https://github.com/web-infra-dev), influencing the design of Farm's Visualizer.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@farmfe/js-plugin-record-viewer",
"version": "2.2.0",
"name": "@farmfe/js-plugin-visualizer",
"version": "1.0.0",
"main": "./build/cjs/index.cjs",
"types": "./build/cjs/index.d.ts",
"type": "module",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function farmRecorderPlugin(
const recordViewerOptions: RecordViewerOptions = options;

return {
name: 'farm-plugin-record-viewer',
name: 'farm-visualizer',
config(config) {
farmConfig = config.compilation || {};
farmConfig.record = true;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 423a5ad

Please sign in to comment.