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

scadr

v0.1.0

Published

Render multi-part OpenSCAD files to STL

Downloads

7

Readme

scadr

Render multi-part OpenSCAD files from a single command

Installation

Prerequisites

node.js

Installing

Run

npm install -g scadr

Usage & Setup

Syntax

scadr [options] path

Example

scadr my-file.scad

Renders the top-level modules of my-file.scad to individual .stl files.

For example, if my-file.scad contained

module ball() {
    sphere(r = 3);
}
module box() {
    cube([5, 5, 5]);
}

then the files my-file-ball.stl and my-file-box.stl would be produced.

Options

Usage: scadr [options] <path>

Arguments:
  path                     .scad file to render

Options:
  -d, --define <value>     variable definitions (default: [])
  -m, --module <name>      specific module to render (default: [])
  -c, --convention <kind>  top-level naming convention (choices: "auto", "pascal", "all", "underscore", default: "auto")
  -l, --list               list modules without rendering
  --dry                    dry run (show what would happen)
  -h, --help               display help for command

--define n=v

scadr my-file.scad --define $fn=180 --define qual="high"

Defines a variable. Multiple definitions can be provided.

--module name

Defines a module that should be rendered. Multiple modules can be provided

scadr demo.scad --module Alpha --module Beta

If no modules are provided, the list of modules to render is determined by convention (see below).

--convention

You can automatically filter which top-level modules are rendered by using a naming convention.

Supported conventions are:

  • all: Render every top-level module
  • pascal: Render Alpha, but not alpha
  • underscore: Render _part1, but not part1
  • auto: Infer the naming convention of the file

auto chooses pascal if some (but not all) modules are Pascal-cased, otherwise chooses underscore if some (but not all) modules are named with an initial _, otherwise renders everything (all)

--list

Prints out which modules in this file would be rendered (as determined by convention).

--dry

Prints out what would happen, but doesn't actually do it

Changelog

0.1.0

First release