1

GitHub - Camplejs/Cample.js: Cample.js - functional web framework for creating s...

 1 year ago
source link: https://github.com/Camplejs/Cample.js
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

cample

Cample.js - functional web framework for creating site UI.

About

Cample.js - web framework for creating site UI. This framework is great for creating most of the various sites, due to its extensive functionality.

Installation and Usage

Install via NPM:

npm i -D cample 

JavaScript

import { Cample, Component } from 'cample';

const component = new Component("new-component", 
`<div class="component">
    {{component_text}}
</div>`,{
    script:[(elements)=>{
      console.log(elements.component);
    },
    {
        start:'afterLoad',
        elements:[
            {component:".component"}
        ]
    }],
    attributes:{
        id:"id"
    },
    data:{
        component_text:"Component"
    },
    style:""
});

new Cample("#page").render(`
    <div class="content">
        {{component}}
    </div>
`,{
    component
});
<div id="page"></div>

Feauters

  • Supporting component approach
  • Cycle
  • Some operators like in vanilla js for working with components
  • Animation
  • Route
  • Working with data
  • 100% coverage code
  • No dependencies
  • Typed

Repository

Repository

Changelog

Changelog

License

Licensed under MIT


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK