diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36d440897..ea41b9914 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,55 +1,68 @@ +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 with 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. -### Guidelines +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 -1. **Most important** If you are adding a new feature, please discuss it first under [GitHub issues](https://github.com/nuejs/nue/issues). This way you'll avoid doing redundant work because not all features are automatically accepted. Nue JS strives for minimalism, which means that we have to say "no" to most things. +## 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. -2. Features that add lots of new code, complexity, or several new/heavy NPM packages are most likely rejected. Most definitely if the first guideline wasn't applied. +## 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. -3. Please create only one thing per pull request. Easier to validate and merge. And less potential for conflicts. +## 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. -4. Please add a test case for every bug fix. +## Development Philosophy +You're right - let me enhance that section to be more direct about the philosophical contrast: -5. Please write JavaScript. No TypeScript here, because Nue aims to work as close to web standards as possible. +## 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. The core philosophy is "Less is More": every line of code must prove its worth through both functionality and clarity. -### Formatting -Please try to use the original style in the codebase. Do not introduce new rules or patterns. The most notable rules are: +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. -1. No semicolons, because they are redundant +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. -2. Strings with single quotes +This isn't accidental. By working directly with web standards rather than building layers of abstractions, we create systems that are both more powerful and easier to maintain. What looks like "missing engineering rigor" to framework-trained eyes is actually closer to how browser engineers themselves write code. The sophistication comes from deep understanding of web standards rather than framework patterns. -3. Indent with two spaces -4. Prefer `==` over `===`. Strict equality only when truly needed, which is rarely the case +### Code Style +Maintain the existing minimalist aesthetic: -Nue is not using Prettier or ESLint because they will increase the project size to 40MB. The `.prettierrc.yaml` file on the root directory does the job well enough. +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 - ```sh -# if using bun +# Bun (recommended) bun install bun install --no-save esbuild bun test -# if using node +# Node npm install npm install --no-save jest jest-extended esbuild npm test ``` - -### Linking - +### Local Development ```sh -# if using bun +# Bun (recommended) bun install cd packages/nuekit bun link @@ -57,7 +70,7 @@ cd my/nue/project nue nue build --production -# if using node +# Node npm install cd packages/nuekit npm link @@ -66,3 +79,5 @@ npm install --save-dev esbuild node $(which nue) node $(which nue) build --production ``` + +Let's maintain this clear vision of simplicity and standards as we build something extraordinary together. \ No newline at end of file