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

noct

v1.0.55

Published

cli for nocturn, https://nocturn.io

Downloads

15

Readme

Nocturn CLI

noct is a tool to build Nocturn projects from the command line.

Getting Started

npm install -g noct

Dependencies

Component Markup Language

Creating a Nocturn project

Create a Nocturn project in the current directory

noct init

Project files and directories

app.json

The app.json file contains configuration data for the project. A basic app.json file will be generated after "noct init" and can be modified directly after.

{
  "name": <project name>,
  "displayName": <display name, shows up in title tag>,
  "start": <main module (first module loaded)>,
  "uiVersion": <version of nocturn-ui.js to use>,
  "cmlVersion": <version of cml-runtime.js to use>,
  "plugins": [{
      "name": <plugin name>,
      "type": <file type, ie javascript, css>,
      "url": <path to plugin, can be a local path or an url>
    },
    ...
  ],
  "modules": [
    <module name>,
    ...
  ]

  // PWA Properties
  "includeRuntime": <true (include runtime files locally), false (use cdn url)>,
  "includeManifest": <true (include manifest.json file), false (default, don't include)>,
  "includeServiceWorker": <true (include serviceworker.js file), false (default, don't include)>,
  "themeColor": <color theme for app>,
  "icons": [
    {
      "src": <icon image>,
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": <icon image>,
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "background_color": <loading screen color>,
  "display": "standalone",
  "cacheList": [
      <url to cache in serviceworker.js>
      ...
  ]
}

Some properties in the app.json file are used to generate manifest and serviceworker files. These files are necessary to make your app a Progressive Web App (PWA).

PWA Properties

index.html

Nocturn projects compiles into a single html file. Code in index.html is generated from modules and information from the app.json. The file index.html will include all other resource used by the single page app.

cml directory

This directory is where the projects cml files are stored. In the project.json file a referenced module name should match a file name in the cml directory.

js directory

This directory is where the compiled js files for the project will be placed.

Building a Nocturn project

Build the Nocturn project in the current directory.

noct build

Check version of cml noct is building using.

noct build -v

or

noct build --version

Editing Modules

Nocturn projects are composed of Modules. You can add or remove modules from the project by editing app.json or by using cli commands.

Creating Modules

create a new module with a template

noct create -t Card.cml exampleCard.cml

Templates

  • Module.cml
  • Card.cml
  • NavBar.cml
  • SideNav.cml
  • Banner.cml
  • Modal.cml
  • Footer.cml
  • FAB.cml

Adding Modules

add all modules in the cml directory

noct add -all

or

noct add -a

add a specific module from the cml directory, in this case "exampleModule"

noct add exampleModule

Removing Modules

remove a specific module from the project, in this case "exampleModule". The module will still be available in the directory, the file will not be deleted.

noct remove exampleModule

remove all modules from the project. All modules in the cml directory will stay available; they will not be deleted.

noct remove -a