Skip to content

Diospace/can-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Can Framework

A modern, high-performance web framework designed for building reactive applications with Single File Components (.can). Can combines the simplicity of signal-based reactivity with a powerful CLI and a built-in compiler.

🚀 Features

  • Signal-Based Reactivity: Fine-grained updates without a Virtual DOM.
  • Single File Components: Write logic, templates, and scoped styles in .can files.
  • Powerful CLI: Integrated tools for building, serving (HMR), and scaffolding.
  • Static Site Generation (SSG): Pre-render your app for maximum SEO and speed.
  • First-Class Tooling: Custom VS Code extension for syntax highlighting and snippets.
  • Built-in Essentials: Store management, I18n, Animations, and Routing.

📦 Installation

Clone the repository and install dependencies:

npm install
npm run compile # Compiles the framework core and CLI

🛠️ CLI Usage

Once compiled, you can use the can command to manage your projects:

  • Create a new project: can create <my-app>
  • Start dev server (HMR): can dev
  • Production build: can build
  • Generate Static Site: can ssg

🧩 Component Example

component Counter {
    var count = signal(0);
    
    function increment() {
        this.count.value++;
    }

    var template = `
        <div class="box">
            <h1>Count: {{count}}</h1>
            <button @click="increment">Increment</button>
        </div>
    `;
}

<style scoped>
.box { padding: 20px; border-radius: 8px; }
</style>

🛠️ Internal Architecture

  • /src/compiler: The core transpiler for .can files.
  • /src/runtime-core: The base component class and DOM orchestration.
  • /src/reactivity: The signal and effect engine.
  • /ide-extension: Source for the VS Code extension.

👤 Author & Maintainer

The Can Framework and its tooling are developed and maintained by Endurance Ogun, a software engineer dedicated to building high-performance, developer-centric web technologies.

Endurance focuses on compiler-driven architectures and fine-grained reactivity to push the boundaries of modern web performance.

  • GitHub: Diospace
  • Project: Can Framework

1. Stage all your changes

git add .

2. Commit the changes with a descriptive message

git commit -m "feat: add new store module logic"

3. Push to your main branch on GitHub

git push origin main

Increment version (patch, minor, or major)

npm version patch

Push the commit and the new tag to GitHub

git push origin main --tags

Create a tag for the current version (e.g., v1.0.4)

git tag v1.0.4

Push only the specific tag

git push origin v1.0.4

publish to npm

npm login npm run release

1. Stage all changes (tsconfig, create.ts, etc.)

git add .

2. Commit the improvements

git commit -m "feat: improve framework linking, scaffolding, and release process"

3. Update the version (this creates a new commit and tag locally)

npm version patch

4. Run the release script (this handles building, publishing to NPM, and pushing to GitHub)

npm run release

Stage the optimized build logic and package configuration

git add .

Commit with a descriptive message

git commit -m "refactor: improve CLI build logic, support multiple targets, and optimize package distribution"

If you are ready to publish the new version (1.1.1 or 1.1.2)

npm run release

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors