brainrotscript
Version:
🧠A brainrot programming language that compiles to JavaScript - because why write normal code when you can write code that's absolutely sending you? 💀
91 lines (68 loc) • 1.72 kB
Markdown
# 📦 Publishing BrainrotScript to npm
## Pre-publishing Checklist
1. **Test everything locally**:
```bash
npm test
node bin/brs-cli.js keywords
node bin/brs-cli.js examples/hello.brainrot
node bin/brs-cli.js examples/advanced.brainrot
```
2. **Test compilation**:
```bash
node bin/brs-cli.js compile index.brainrot -o test.js
node test.js
```
3. **Update version** (if needed):
```bash
npm version patch # for bug fixes
npm version minor # for new features
npm version major # for breaking changes
```
## Testing Package Locally
Before publishing, test the package locally:
```bash
# Pack the package (creates a .tgz file)
npm pack
# Install globally from the pack file for testing
npm install -g brainrotscript-1.0.0.tgz
# Test the global installation
brainrot --help
brainrot keywords
brainrot index.brainrot
# Uninstall when done testing
npm uninstall -g brainrotscript
```
## Publishing Steps
1. **Login to npm** (one time setup):
```bash
npm login
```
2. **Publish to npm**:
```bash
npm publish
```
3. **Verify publication**:
```bash
npm info brainrotscript
```
## Post-Publishing
Users can now install and use BrainrotScript:
```bash
# Install globally
npm install -g brainrotscript
# Use it
brainrot myfile.brainrot
brainrot compile myfile.brainrot
brainrot keywords
```
## Publishing Updates
For future updates:
1. Make your changes
2. Test thoroughly
3. Update version: `npm version patch/minor/major`
4. Publish: `npm publish`
## Package Info
- **Package name**: `brainrotscript`
- **Binary command**: `brainrot`
- **File extension**: `.brainrot`
- **Main entry**: `src/compiler.js`