https://github.com/Camplejs/Cample.js Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Camplejs / Cample.js Public * Notifications * Fork 0 * Star 48 Cample.js - typed javascript web framework for creating site UI. Reactivity without Virtual DOM! Cample - combination of words component and example. camplejs.github.io License MIT license 48 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights Camplejs/Cample.js This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 17 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/C] Use Git or checkout with SVN using the web URL. [gh repo clone Cample] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @antonmak1 antonmak1 Update package.json ... 9a6a6bb Feb 10, 2023 Update package.json 9a6a6bb Git stats * 75 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github dist src test .babelrc .editorconfig .eslintrc.json .gitignore .mocharc.json .prettierrc.json CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md package-lock.json package.json tsconfig.json View code [ ] Cample.js - typed javascript web framework for creating site UI. Reactivity without Virtual DOM! About Important Features Installation Getting started JavaScript HTML Example code JavaScript HTML Repository Changelog Contribution License README.md cample Cample.js - typed javascript web framework for creating site UI. Reactivity without Virtual DOM! npm-version downloads stars types license repo-size minified size coverage Links: Documentation * Example * Example source * Website This version of the framework is in beta! About Cample.js - typed javascript web framework for creating site UI. Cample.js is great for creating most of the various sites, due to its extensive functionality. This framework supports component approach and reactivity without Virtual DOM. Also, for the convenience of working with components, Cample.js supports vanilla js operators, such as addition for example. Versions since 1.0.x are stable. Important As of version 2.0.0-beta.4, a new default component render method is introduced. This method is a work with the template tag, which is used to work with tables, style tags, etc. About Features Cample.js provides the following features: * Reactivity without Virtual DOM * Supporting component approach * Cycle * Some operators like in vanilla js for working with components * Animation * Working with data * 50+% coverage code * No dependencies * Typed Installation Install via NPM: npm i -D cample Installing via npm is currently the default. The framework can work with most modern bundlers. Getting started An instance of the Cample class is created, which is the main handler of all technological entities (components, etc.). JavaScript const newComponent = component("new-component", "component") const newCample = cample("#page"); newCample.render(`
class="content"> {{newComponent}}
`,{ newComponent }); HTML
Link article: Getting started. See Cample.js docs for more details. Example code JavaScript const newCample = cample("#page"); const newComponent = component("new-component", `
{{component_text}} {{dynamicData}}
`, { script:[(elements, functions)=>{ console.log(elements.component); const updateFunction = (e) =>{ functions?.updateText (data=>{ return {...data,value:"Text"} }); } document .addEventListener("onload", updateFunction); }, { start:'afterLoad', elements:[ {component:".component"} ] }], attributes:{ id:"id" }, data:{ component_text:"Text", component_array_texts:{ value:["Text1", "Text2"], defaultValue:"Text" }, dynamicData:{ value:"defaultText", function:"updateText" } }, style:` .component{ width:100px; height:100px; } ` }); newCample.render("{{newComponent}}", {newComponent}); HTML
Repository Repository Changelog Changelog Contribution If you would like to contribute to this framework, please see Contributing Guide. Thank you! License Licensed under MIT About Cample.js - typed javascript web framework for creating site UI. Reactivity without Virtual DOM! Cample - combination of words component and example. camplejs.github.io Topics javascript html components npm framework reactive ui web component reactivity cample camplejs without-vdom without-virtual-dom Resources Readme License MIT license Code of conduct Code of conduct Stars 48 stars Watchers 1 watching Forks 0 forks Releases 14 Version 2.0.0-beta.4 Latest Feb 10, 2023 + 13 releases Packages 0 No packages published Contributors 2 * @antonmak1 antonmak1 Anton Maklakov * @dependabot[bot] dependabot[bot] Languages * TypeScript 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.