Skip to content

Commit 83c59f2

Browse files
authored
Update README.md
1 parent d31d0a6 commit 83c59f2

File tree

1 file changed

+72
-13
lines changed

1 file changed

+72
-13
lines changed

README.md

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,86 @@
1-
# agoda-devfeedback
1+
# agoda-devfeedback: Your JavaScript Build's Personal Trainer 🏋️‍♂️
22

3-
This is a JavaScript/TypeScript package to collect metrics that relate to developers' experience.
3+
Welcome to agoda-devfeedback, the JavaScript/TypeScript package that's about to make your builds faster than a caffeinated squirrel on a sugar rush! We're here to collect metrics that relate to developers' experience, because who doesn't love a good statistic about how long they've been waiting for their build to finish?
44

5-
## Installing
5+
## Build Time (Compilation Time): Because Life's Too Short for Slow Builds
66

7-
Install the package:
7+
This package supports collecting the build time (compilation time) of projects using Webpack (4.x or 5.x) or Vite (4.x). It's like a stopwatch for your builds, but cooler.
8+
9+
### Basic Usage: Easy as Pie (Mmm... pie 🥧)
10+
11+
First, let's get this party started. Install the package:
812

913
```bash
1014
npm install --save-dev agoda-devfeedback
1115
```
12-
13-
or
14-
16+
or if you're yarn-clined:
1517
```bash
1618
yarn add --dev agoda-devfeedback
1719
```
1820

19-
Please note that when an error happens, the package will put the error message to `devfeedback.log` file in the current working directory.
20-
You might need to add this file to `.gitignore` to avoid committing it to the repository.
21+
Pro tip: When an error happens, the package will write the error message to `devfeedback.log` in your current working directory. You might want to add this to `.gitignore`, unless you want your repo to know about all your build failures. We won't judge.
22+
23+
#### For Webpack Wizards 🧙‍♂️
24+
25+
If you're using **Webpack**, sprinkle this magic into your `webpack.config.js`:
26+
27+
```javascript
28+
const { WebpackBuildStatsPlugin } = require('agoda-devfeedback');
29+
module.exports = {
30+
// ... your other awesome config stuff ...
31+
plugins: [
32+
// ... your other cool plugins ...
33+
new WebpackBuildStatsPlugin(),
34+
],
35+
};
36+
```
37+
38+
#### For Vite Virtuosos 🎻
39+
40+
If **Vite** is your jam, add this to your `vite.config.js`:
41+
42+
```javascript
43+
import { viteBuildStatsPlugin } from 'agoda-devfeedback';
44+
export default defineConfig({
45+
// ... your brilliant config options ...
46+
plugins: [
47+
// ... your other fantastic plugins ...
48+
viteBuildStatsPlugin(),
49+
],
50+
});
51+
```
52+
53+
### Advanced Usage: For the Overachievers 🏆
54+
55+
Both Webpack and Vite plugins will send not just build data, but also the command you used to run the build (like `yarn dev` or `yarn build`) as the build identifier. It's like a name tag for your builds!
56+
57+
But wait, there's more! If you want to define your own identifier (because you're a rebel like that), you can pass it as a parameter:
58+
59+
```javascript
60+
new WebpackBuildStatsPlugin('production-build-deluxe');
61+
```
62+
or for Vite:
63+
```javascript
64+
viteBuildStatsPlugin('vite-build-extraordinaire');
65+
```
66+
67+
## The F5 Experience: Because Waiting is So Last Year
68+
69+
What is the F5 Experience? have a read [here](https://beerandserversdontmix.com/2024/08/15/an-introduction-to-the-f5-experience/)
70+
71+
Remember, we're all about that F5 Experience here at agoda-devfeedback. Our goal is to make your development process smoother than a JavaScript promise chain. Here's what that means for you:
72+
73+
1. **Setup Should Be a Breeze**: You should be able to install this package and get metrics faster than you can say "npm install".
74+
2. **Fast Feedback Loop**: We want your builds to be so fast, you'll forget what you were working on by the time they finish. (Okay, maybe not that fast, but you get the idea.)
75+
76+
## Contributing
77+
78+
We welcome contributions! Whether you're fixing bugs, improving documentation, or adding support for the next big JavaScript build tool, we appreciate your help in making agoda-devfeedback even better. Check out our [Contributing Guide](CONTRIBUTING.md) for more details on how to get started.
79+
80+
Remember, in the world of agoda-devfeedback, there are no stupid questions, only builds that are taking too long!
2181

22-
## Supported Metrics
82+
## And Finally...
2383

24-
### Build Time (Compilation Time)
84+
Remember, in JavaScript development, there are only two types of projects: those that are measuring their build times, and those that are still waiting for their builds to finish. With agoda-devfeedback, you'll always know exactly how long you're waiting. (Spoiler alert: with our help, it won't be long!)
2585

26-
This package supports collecting the build time (compilation time) of projects that are using Webpack (4.x or 5.x) or Vite (4.x).
27-
Follow this [instruction](BUILD_TIME.md) to get started.
86+
Happy coding, and may your builds be ever faster! 🚀

0 commit comments

Comments
 (0)