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

@opentech-ux/lom-compiler

v0.2.1

Published

Compiler to generate playable HTML wireframe site from layout description model (LOM)

Downloads

20

Readme

OpenTech UX LOM Compiler

npm version npm license Build Status

Description

JSON schema file compiler for generating an interactive model of website navigation.

This compiler accepts custom files or files generated by the captor script containing the JSON schema format. Consequently, generate a series of HTML files that represent a simulation of the navigation on a web site.

Installation

npm install @opentech-ux/lom-compiler

Importing

// Using Node.js `require()`
const { LomCompiler } = require('@opentech-ux/lom-compiler');

// Using ES6 imports
import { LomCompiler } from '@opentech-ux/lom-compiler';

Uses examples

  • Initial project folder structure

    Project folder/
    ├─ build/
    │  ├─ test-output/
    ├─ data/
    │  ├─ json/
    │  │  ├─ basic-lom/
    │  │  │  ├─ basic.lom.json
    │  │  ├─ multi-lom/
    │  │  │  ├─ basic.lom.json
    │  │  │  ├─ script.lom.json
    │  │  ├─ script-lom/
    │  │  │  ├─ script.lom.json
    ├─ index.js
  • Use examples in a JS file

    // index.js
    const BASE_DIR = 'build/test-output';
    const folderName = 'basic-lom';
    
    // Base directory is the executing file directory
    new LomCompiler()
       // Source file path
       .source('data/json/basic-lom/basic.lom.json')
       // Directory path where to save the result (folder will be created in case of needed)
       .outputDir(`${BASE_DIR}/${folderName}`)
       .compile();
    // index.js
    const BASE_DIR = 'build/test-output';
    const folderName = 'script-lom';
    
    // Base directory defined
    new LomCompiler(BASE_DIR)
       // Source file path relative to base directory
       .source('../../data/json/script-lom/script.lom.json')
       // Folder name used inside the base directory
       .outputDir(folderName)
       .compile();
    // index.js
    const BASE_DIR = 'build/test-output';
    const folderName = 'multi-lom';
    
    // Base directory defined
    new LomCompiler(BASE_DIR)
       // Source files directory path relative to base directory
       .source('../../data/json/multi-lom')
       // Folder name used inside the base directory
       .outputDir(folderName)
       .compile();
  • Project folder structure after executing the examples

    Project folder/
    ├─ build/
    │  ├─ test-output/
    │  │  ├─ basic-lom/
    │  │  │  ├─ otherPage/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ index.html
    │  │  ├─ script-lom/
    │  │  │  ├─ about/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ contact/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ index.html
    │  │  ├─ multi-lom/
    │  │  │  ├─ about/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ contact/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ otherPage/
    │  │  │  │  ├─ index.html
    │  │  │  ├─ index.html
    ├─ data/
    │  ├─ json/
    │  │  ├─ basic-lom/
    │  │  │  ├─ basic.lom.json
    │  │  ├─ multi-lom/
    │  │  │  ├─ basic.lom.json
    │  │  │  ├─ script.lom.json
    │  │  ├─ script-lom/
    │  │  │  ├─ script.lom.json
    ├─ index.js

License

APACHE 2.0