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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ojet-comp

v1.2.0

Published

A module for creating custom components with Oracle JET

Downloads

92

Readme

Oracle Jet Component Creator

ojet-comp is a library developed for Oracle Jet to easily generate custom components and setup peer dependencies inside your Oracle Jet project.

Index

External Tutorial

I have written a Medium post which includes an overview of this component along with a tutorial of creating a jet project and using the module in your project. Read it here

Installation

To start using ojet-comp simply download and install it using npm (make sure the -g flag is set so that you can use it across multiple projects):

npm install ojet-comp -g

Usage

To use this package, you must be in the root of the project (the top level of the project folder). Simply execute the module by typing the command below into the terminal window whilst at the root of your project

$: ojet-comp <action>

The module will run you through a CLI creation wizard to create your component. Once the wizard is complete, your module will be ready to use.

Actions

The following actions are currently available:

  • page (generates JET pages ready to be used in your project)
  • components (generates custom web components ready to be imported into your project)

Note: For components your custom module must still be required inside the define block of whatever view model you intend to use it in.


Component Setup

For the component action, a little further setup is required.

Adding Your Component To The View Model

You must add the ojs.composites and the loader files to any view model that you wish to use your generated components with. This is discussed in the Oracle Jet Docs however this is also demonstrated below. Where you have your view model, it should look like this:

define(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojcomposite', 'jet-composites/accordion-component/loader'],
    function(oj, ko, $) {
        function AccordionViewModel() {
            var self = this;

        }
        return new AccordionViewModel();
    }
);

Add the 'ojs/composite' and 'jet-composites/component-name' into the define block so that they are required and run when your viewModel is loaded.

Adding Your Component To The Page

To include your component on the page, simple write the component in the HTML file for your view model with the component name in the tags. Note, components will be automatically appended with -component, therefore if you called your component test, you would render it on the page like so: <test-component></test-component>

Enabling Custom Components In JET

Oracle JET requires you to specify the custom components module inside your main.js file, to do so, add the dependency like so:

requirejs.config(
    {
      baseUrl: 'js',
      ...
      paths: {
        ...
        'customElements': 'libs/webcomponents/CustomElements',
        ...
      }
      ...
    }
);

Serving with SASS

To serve your project with sass, you can use the Oracle Jet CLI. With the ojet cli installed, run the following command: ojet serve --sass

Bugs / Feature Requests

All bugs and feature requests can be submitted to the public github issue page located here

Change Log

V1.2.0 Closed two bugs:

V1.0.0 Initial creation of component including the features:

  • Add Page
  • Create component