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

lava-md

v0.0.5

Published

A Markdown Generation language built for Obsidian note taking.

Downloads

4

Readme

LAVA MARKUP GENRATION TOOL

Lava is a markup generation tool built for obsidian Version: 0.0.5 creator: Joshua Davis

STILL IN VERY EARLY DEVELOPMENT NOT RECOMMENDED FOR PERSONAL USE

open lava-about in obisidian for developer information on the development of LAVA

npm i lava-md -g

Inline Lava

all inline lava starts with %%| and ends with |%%.

form: %%| params call -> lifecycle |%%

params

a inline json object to be passed into to call function

ex: {
    "hello": "world"
}

call

a call is a name of a template that will be injected under the inline lava

lifecycle

the lifecycle of a inline lava tells the parser weather to ignore, delete, or update the data.

implemented now are...

pre-render (will be rendered once and turn into a rendered tag. same as if left blank) rendered (will never be updated. Data already rendered) auto (data will be updated whenever the file is saved and lava run is called again)

ex: %%| {"hello", "world"} make_title -> auto |%%

Lava Templates

templates use the extension .lava templates will be copied under inline lava tags and end with a %%| end |%% tag.

lava template data use a different starting and ending tags for injecting data of "%%!" and "!%%"

Basic parameters

to inject paramaters into inline lava use the params json object

// passed into inline call

{
    "cool": {
        "hello": "world"
    },
    "apples": ["Red", "Green", "Fuji"],
    "people": ["Josh", "John", "Alice"]

}

// inside a .lava template ex: %%! params.cool.hello !%%

Objects

Inline calls allow you to concatenate objects to your input objects

// passed into inline call

{
    ...(apples.json), 
    "people": ["Josh", "John", "Alice"],
    "name": "John"
}

concatinating objects happens at runtime and updates everytime the object is run. This allows persistent data to be used in mutiple template calls.

Looping

// loop over arrays

%%!FOR apple in params.apples {
    I like %%! apple !%% apples!
}!%%

output: I like Red apples! I like Green apples! I like Fuji apples!

//nested for loops

%%!FOR apple in params.apples {
    %%!FOR person in params.people {
        %%! person !%% like's %%! apple !%% apples!
    }!%%
}!%%

Conditionals

Currently the only conditionals supported in templates are simple IF statements

%%!IF apple == "Red" {
    APPLE IS RED!
}!%%

Scripts

Not Implemented Yet Scripts ONLY run when run by lava script or in lava-watch interface. They do NOT run when the template is called.

%%# o/apples.json
    PUSH apples.types "round" 
    ADD job "Apple picker"
    ADD favorite %%!apple!%%
    RUN create-apple-tree 
#%%
%%# n/cs170/%%!apple!%%
    RUN create-apple-tree apples.json
#%%

Comments

%%@ hello this is a comment in a .lava file @%%

Executing Commands

run:

lava run # after init
lava run -n [notes-directory] -t [templates-directory]
lava run -n [notes-directory] -t [templates-directory] -o [objects-directory]
  • runs lava on notes directory with templates

watch:

lava watch # after init
lava watch -n [notes-directory] -t [templates-directory]
lava watch -n [notes-directory] -t [templates-directory] -o [objects-directory]
  • runs lava run periodically (on changes)
  • shows terminal that allows you to run lava scripts

init:

lava init # prompts user to input directories
lava init -n [notes-directory] -t [templates-directory] -o [objects-directory]
  • run in encapsulating directory and sets up paths to directories

Not Implemented yet

script:

lava script [script-name] [args...]  # runs a template script