
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@version 0.1.5
@date 2015-02-25
@stability 1 - Experimental
A small pure-JavaScript web framework for building fast single-page applications.
Haml-inspired template engine that uses CSS selectors syntax for describing elements and attributes.
ul
li Item A
li Item B
becomes
<ul>
<li>Item A</li>
<li>Item B</li>
</ul>
Type selector, attribute selectors, ID selectors, and pseudo-classes are supported.
a#123.link.bold[href="#A"][title=go] link
button:disabled
becomes
<a id="123" class="link bold" href="#A" title="go">link</a>
<button disabled="disabled"></button>
Child combinators can be used and you can leave off the tag to get a div.
.my-class
a>i text
becomes
<div class="my-class">
<a><i>text</i></a>
</div>
ul
@template row
li.my-row
a > b Row
row
row
becomes
<ul>
<li class="my-row"><a><b>Row</b></a></li>
<li class="my-row"><a><b>Row</b></a></li>
</ul>
Organize views into a hierarchy with built-in router.
View(name, element, parent, contentSelector)
String
- A name for a view that is also a route to the view.
Accepts Level 1 URI Templates RFC 6570String
or Function
or DOM Node
-
View representation as DOM tree.
String and Function will be transformed to DOM Node on first call.String
- Parent view name.String, optional
- A selector to where a child Node will be attached.// Optional path for views, default = ""
View.base = "/js/views/"
// Define starting point in DOM
View("body", document.body)
// Create first simple view
View("home", ".home", "body")
// Create another view
View("work", ".work", "body")
// Start
View.main = "home"
history.start(View.route)
// call manualy
View("home").show()
Copyright (c) 2013-2015 Lauri Rooden <lauri@rooden.ee>
The MIT License
FAQs
Full-stack web framework in a tiny package
The npm package litejs receives a total of 321 weekly downloads. As such, litejs popularity was classified as not popular.
We found that litejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.