Skip to content

Latest commit

 

History

History
103 lines (72 loc) · 4.51 KB

CONTRIBUTING.md

File metadata and controls

103 lines (72 loc) · 4.51 KB

The draft looks good and covers the key aspects, but let's enhance it to better reflect Nue's vision and standards-first philosophy. Here's my refined version:

Contributing to Nue

First and foremost: Thank you for helping make web development simpler and more standards-focused! ❤️❤️

Writing and Sharing

The most valuable contribution right now is spreading awareness about standards-first development. Write blog posts, create demos, or share examples that showcase the power of modern web standards. Show how native browser capabilities can replace complex framework abstractions.

Focus especially on:

  • How modern CSS enables sophisticated design systems
  • The untapped power of semantic HTML
  • Progressive enhancement through vanilla JavaScript
  • Real-world examples of framework complexity vs web standards simplicity

Community Support

Help fellow developers discover the elegant simplicity of standards-first development. While I (Tero Piirainen, product lead) focus intensely on the core engineering, the community's guidance is essential. Answer questions, suggest solutions, and share your experiences.

Bug Fixes

When fixing bugs, always include a test case that demonstrates both the issue and the solution. This helps maintain the codebase's minimalist nature while ensuring reliability.

Feature Proposals

Nue has a clear vision: take modern web standards to their absolute peak. Before implementing any new feature, no matter how small, let's discuss how it aligns with this goal. The framework's power comes from ruthless simplicity - every addition must justify its existence.

Development Philosophy

Nue's development style might surprise those coming from traditional JavaScript projects. For engineers steeped in TypeScript, dependency injection, and "enterprise patterns", the codebase might even look stupid or feel like a toy project at first glance. This reaction reveals a fundamental divide in how we think about web development.

While most codebases optimize for type safety, abstraction layers, and "proper engineering practices", Nue pursues radical minimalism. We strive to make each line of code meaningful through its functionality and clarity. The goal is to figure out what's truly needed (and only that) and find out the cleanest way to implement it.

This creates stark contrasts with framework implementations. Consider hot reloading: Nue's implementation is 150 lines of vanilla JavaScript in a single file. At first glance it might look naive - where are the TypeScript interfaces? The dependency injection containers? The state management patterns? But this "naive" implementation consistently outperforms Next.js's equivalent, which spans thousands of lines buried somewhere inside their 2.7MB development bundle.

Or take view transitions: Nue's entire implementation fits in about 250 lines of focused code. A TypeScript purist might cringe at the lack of strict typing and interface definitions. Yet this "simplistic" approach delivers smoother animations and better performance than framework implementations that spread the same functionality across hundreds of files and multiple abstraction layers.

By working directly with web standards rather than building layers of abstractions, we strive to create systems that are both more powerful and easier to maintain.

Code Style

Maintain the existing minimalist aesthetic:

  1. No semicolons - they add visual noise without value
  2. Single quotes for strings
  3. Two-space indentation
  4. == over === - strict equality is rarely necessary

Nue avoids Prettier/ESLint as they would add 40MB of complexity. The .prettierrc.yaml provides sufficient consistency.

Testing

# Bun (recommended)
bun install
bun install --no-save esbuild
bun test

# Node
npm install
npm install --no-save jest jest-extended esbuild
npm test

Local Development

Using Bun (recommended)

# Clone the Nue repository
cd your-projects-dir
git clone [email protected]:nuejs/nue.git
cd nue
# Install dependencies
bun install
# Link the nuekit package
cd packages/nuekit
bun link
# Link the nuekit package in your project
cd your-projects-dir/your-nue-project-dir
bun link nuekit
# Serve the project using the local nuekit package
nue

Using Node

cd your-projects-dir
git clone [email protected]:nuejs/nue.git
cd nue
npm install
cd packages/nuekit
npm link
cd your-projects-dir/your-nue-project-dir
npm link nuekit
npm install --save-dev esbuild
node $(which nue)

Let's maintain this clear vision of simplicity and standards as we build something extraordinary together.