TopGit theo dõi insin/nwb trên GitHub trong nhóm Frontend, đã đạt 5.5k sao. A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
nwb was created at a time when JavaScript tooling was in flux, when the capabilities of ES6 were less widely-supported by browsers than they are today, and when versions of Webpack, Babel and other common build tools were out of date almost as soon as you added them to your package.json, and there wasn't even a create-react-app yet!
People who were adopting these tools ended up having to independently manage the same sets of dependencies and configure them to work together to create a great local development experience, a solid testing setup and optimised production builds.
The goal of nwb was to take the weight of managing these off the shoulders of developers, and instead provide a configuration file exposing a smaller surface area for the configuration needed to tweak the things which were specific to your project.
At this point in time, years later than we should have formally announced nwb's deprecation, Vite is one of the best implementations of that goal there is.
It's massively popular, widely-used, and it's likely that every plugin you need for your use case has already likely written, and if not, there's an API for that, which is so good that high-quality frameworks now build on top of Vite, such as Astro for static site generation (and on-demand server rendering) and React Router for client and/or server rendered React apps.
Web Application frameworks like Hono also provide official plugins to integrate with Vite's development server if you just need to create a server which serves up a client app and provide authentication and API endpoints, while retaining Vite's fantastic developer experience.
Vite also comes with a fantastic testing framework in Vitest which integrates directly with Vite, rather than the hodge-podge of different configs we used to have to deal with to get the likes of Karma sucessfully using the same build tooling as the rest of our development process (IYKYK).
In summary:
Starting a new React/Preact etc. project today? Possibly even your first project?
Use Vite. There will be a plugin and a project template for whatever you want to use.
Have an old project which used something like nwb or create-react-app?
Migrate to Vite. It's not going to be painless, but it's going to be better. I've done it. You can do it.
Starting a new project which needs client rendering? Server rendering?
Use Vite. There's a plugin or maybe even a framework built on Vite for that. Don't take on more complexity than you need. Don't fight with a framework intended for server rendering if that's not what you need.
Thanks for using nwb!
-- Jonny
nwb
nwb is a toolkit for:
Quick Development with React, Inferno, Preact or vanilla JavaScript
Developing:
React Apps
Preact Apps
Inferno Apps
Vanilla JavaScript Apps
React Components and Libraries
npm Modules for the Web
A zero-config development setup is provided, but nwb also supports configuration and plugin modules which add extra functionality (e.g. Sass support), should you need them
Install
Installing globally provides an nwb command for quick development and working with projects.
npm install -g nwb
Note: if you're using npm 5 and getting an EACCES: permission denied error from nwb's PhantomJS dependency while installing globally, try passing an --unsafe-perm flag:
npm install -g --unsafe-perm nwb
To use nwb's tooling in a project, install it as a devDependency and use nwb commands in package.json"scripts":
For quick development with React, Inferno, Preact or vanilla JavaScript, use the nwb react, nwb inferno, nwb preact or nwb webcommands.
import React, {Component} from 'react'
export default class App extends Component {
render() {
return <h1>Hello world!</h1>
}
}
$ nwb react run app.js
✔ Installing react and react-dom
Starting Webpack compilation...
Compiled successfully in 5033 ms.
The app is running at http://localhost:3000/
$ nwb react build app.js
✔ Building React app
File size after gzip:
dist\app.cff417a3.js 46.72 KB
See Quick Development with nwb for a more detailed guide.
React Apps
Use nwb new react-app to create a React app skeleton, preconfigured with npm scripts which use nwb for development:
nwb new react-app my-app
cd my-app/
npm start
Open localhost:3000, start editing the code and changes will be hot-reloaded into the running app.
npm test will run the app's tests and npm run build will create a production build.
See Developing React Apps with nwb for a more detailed guide.
Preact Apps
Use nwb new preact-app to create a Preact app skeleton:
nwb new preact-app my-app
Inferno Apps
Use nwb new inferno-app to create an Inferno app skeleton:
nwb new inferno-app my-app
Vanilla JavaScript Apps
Use nwb new web-app to create a vanilla JavaScript app skeleton:
nwb new web-app my-app
React Components and Libraries
nwb new react-component my-component
cd my-component/
npm start will run a demo app you can use to develop your component or library against.
npm test will run the project's tests and npm run build will create ES5, ES modules and UMD builds for publishing to npm.
See Developing React Components and Libraries with nwb for a more detailed guide.
npm Modules for the Web
nwb new web-module my-module
cd my-module/
npm test will run the project's tests and npm run build will create ES5, ES modules and UMD builds for publishing to npm.
Guides
Quick Development with nwb
Developing React Apps with nwb
Developing React Components and Libraries with nwb
Documentation
Features
Commands
nwb
nwb react, nwb inferno, nwb preact and nwb web
Configuration
Configuration File
Configuration Object
Babel Configuration
Webpack Configuration
Karma Configuration
npm Build Configuration
Testing
Plugins
Middleware
Examples
Frequently Asked Questions
Versioning
Why use nwb?
Get started quickly. Start developing from a single .js file or generate a project skeleton.
Covers the whole development cycle. Development tools, testing and production builds for projects work out of the box, no configuration required.
Flexible. While everything works out of the box, you can also use an optional configuration file to tweak things to your liking.
Manages key development dependencies and configuration for you. Check out an example of the effect using nwb had on the amount of devDependencies and configuration to be managed in a real project it was dropped into.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/insin/nwb là nguồn chính thức.
insin/nwb có những chủ đề gì?
GitHub topics của insin/nwb: "babel", "inferno", "javascript", "karma", "npm-module", "preact", "react", "react-component", "toolkit", "webpack". TopGit xếp repo vào nhóm Frontend.
insin/nwb có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho insin/nwb. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
insin/nwb có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho insin/nwb. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
insin/nwb còn đang phát triển không?
Commit gần nhất trên insin/nwb là 1.8 năm trước (theo timestamp GitHub). Repo có 320 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
nwb có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về nwb.