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

sculpture.js

v0.2.0

Published

yet another static website generator

Downloads

4

Readme

Build Status

sculpture.js

yet another static website generator. Transforms ejs based templates to pages

Features

  • Generate full-static websites
  • Parallel processing using ES6 promise/await
  • Templates based on ejs
  • Plugin system to inject custom functions into templates

Install

$ yarn global add sculpture.js

Usage

Just run sculpture update within your current project directory. All ejs file within the pages/ directory will be rendered and written to dist/ directory. Thats it!

The generator should be invoked as final step after any task runners like grunt/gulp have been executed.

Configuration File

Each project needs a json based configuration file within the root directory named sculpture.json

{
    "globals": {
        "title": "Beyond Technology - beyond the visible world"
    },

    "resources": [
        "/bootstrap.min.css",
        "/about.min.css",
        "/util.min.js"
    ],

    "plugins": [
        "resources"
    ]
}

Keys

globals: global ejs variables accessible via globals.<name>

Example:

<title><%= globals.title %></title>

plugins: plugin namespace of registered plugins <%- plugins.<name>.<export> %>

Example:

<%- plugins.resources.enqueue('css'); %>
</head>

Directory Structure

The following structure is currently required

> project
  |-- sculpture.json
  |-- dist
  |    |-- libraryA.js
  |    |-- frameworkB.min.css
  |-- pages
  |    |-- page1.ejs
  |    |-- page2.ejs
  |    |-- pageN.ejs
  |-- templates
  |    |-- header.ejs
  |    |-- footer.ejs

Example

 $ sculpture update
[config]      ~ sculpture configuration loaded 
[sculpture.js]~ generating static pages.. 
[generator]   ~ initializing plugins.. 
[plugins]     ~ loading plugin [ resources ] 
[resources]   ~ generating resource hashes.. 
[plugins]     ~ loading plugin [ moment ] 
[plugins]     ~ loading plugin [ cryptex ] 
[generator]   ~ processing 3 pages.. 
[ejs-renderer]~ rendering page [ contact.ejs ] 
[ejs-renderer]~ rendering page [ imprint.ejs ] 
[ejs-renderer]~ rendering page [ privacy-policy.ejs ] 
[sculpture.js]~ finished in 2 seconds 

License

sculpture.js is OpenSource and licensed under the Terms of Mozilla Public License 2.0 - your're welcome to contribute