Skip to content
On this page

v1.0

CHANGELOG

We are really excited to introduce prext v1.


original

It's been less than a week since prext v1 was released, but I think prext can be officially released now. We still lack a lot, but we will make more after the official release.

Our Goals

  1. stability.
  2. optimization.
  3. speed.
  4. weight.

News

  1. End of create-prext-app

create-prext-app was created early and decided to create a new package instead of an update.

Now use create-prext instead of create-prext-app.

Features

  • req, res

I tried this out with @prext/plugin-kit.We will apply this plugin to prext by default.

You can try these features in advance: @prext/plugin-kit.

js
export function get(req, res) {
  res.status(200).send(`Hello, ${req.query.name}`);
}

  • more options $page

We are aware of the problem of not being able to set the page only by file name.
Thus, we're going to change it so that we can set more page data via $page.

js
export const $page = {
  before(req, res) {
    console.log(`new request: ${req.params.slug}`);
  }
  after(req, res) {
    console.log("Done!");
  }
}

reference


  • typescript supported $page
ts
import { Page } from 'prext';

export const $page: Page = {};

Migration from v0.x

  1. Prext()

Prext() function has been changed to asynchronous.

diff
import { Prext } from "prext";

- const app = Prext();
+ const app = await Prext();

Conclusion

This is all that has been added so far. More features will be added in the future.

If you find a bug, make a pull request.

thank you😊😋😚