npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@onejs-dev/core

v0.0.26

Published

Core functions for oneJS apps.

Downloads

35

Readme

A functional, JavaScript only, cross platform framework. oneJS is a next generation, open source JavaScript framework for building modern apps for web and mobile from a single codebase. oneJS is not owned by any Tech Giant; it is an independent project developed by contributors from all around the world. oneJS is based on three principles:

  • Functional: Predictable, code efficient and easily testable. Pure functions are the building blocks of oneJS. Fall in love with the functional programming paradigm ❤️.
  • JS Only. Really: You can write your entire app in pure Vanilla JS or Typescript. That's right, not a single line of HTML, CSS or JSX needed. Can you believe it?
  • Cross Platform: Write the same code for web and native apps. Simplicity is our true cross platform weapon; reduce your effort and multiply your reach! Powered by React and React Native's new architecture.

🗂️ Repository: core

This is the main oneJS repository. It contains all the functions to setup the app, customize the look and feel and manage the state. Head to the docs section to discover all the functions you can import.

🚀 Get Started

Open your terminal window and navigate to the folder that will contain your app. Once there type the command below:

npx @onejs-dev/create-app

Follow the instructions in the terminal to setup your app. Once ready, type the start command:

npm start

Visit the Start! section of our website for more in depth content.

🧪 Example

Our best publicity is our own code. The example below is our version of the "Hello World!" staple:

/* Imports: Required modules to setup the app ================================================== */
import { app, read, update } from "@onejs-dev/core";
import { Text, View, Input } from "@onejs-dev/components";

/* State: Variable declaration  ================================================================= */
const state = { name: "World" };

/* App Component: Returns the structure to be rendered ========================================== */
const AppComponent = () => {
    return View({ content: { h: "center", v: "center", direction: "column" } })([
        Text({ style: { fontSize: 22, paddingBlock: 60 } })(`Hello ${read("name")}!`),
        Input({ type: "text", value: read("name"), onChange: update("name") })
    ]);
};

/* App Function: Renders the App Component in the screen ======================================== */
app({component: AppComponent, theme: {preset: "oneJS"}, state: state });

100% JavaScript as promised. You won’t have to write a single line in any other language.

Use the online Playground to put your skills to test.

📖 Documentation

The full oneJS documentation can be found on our website.

You do not require extensive JavaScript knowledge to become an expert in oneJS; the learn section will take you from zero to hero! It is composed of several units, each focusing on a key topic.

⚖️License

oneJS is MIT licensed.