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

peak

v0.4.4

Published

Tumblr development framework.

Downloads

39

Readme

peak

NPM version tests

Peak is a node toolkit for developing and deploying Tumblr themes.

  • Write Tumblr themes with your favorite HTML, CSS, and JavaScript preprocessors; include Tumblr tags natively with language-friendly syntax.
  • Preview Tumblr themes in real-time with actual Tumblr content.
  • Deploy to Tumblr with one prompt in your command line.

Installation

via npm:

$ npm install peak -g

Usage

  1. Create a new peak project:
$ peak new mytheme

where mytheme is the path of the folder you'd like to create. Optionally, run peak new with flags to configure your project (see configuration options). 2. Change directory to mytheme and start the watcher:

$ cd mytheme
$ peak watch

Run with --help or -h for options. 3. Write your Tumblr theme!

  • See the syntax docs for Peak's language-friendly syntax for incorporating Tumblr tags/blocks and more.
  • See the languages docs for supported template languages.
  1. Using a browser, navigate to localhost:1111.
  2. To deploy your theme to Tumblr, run peak deploy from your project's root folder.

Syntax

Peak includes language-agnostic syntax for incorporating Tumblr tags and blocks in HTML, CSS, and JavaScript along with Peak-specific tags to further simplify Tumblr development.

Take, for example, this jade theme (see languages):

doctype html
html
  head
    title !(Title)
    // +(src: 'style.styl' media: 'all')
    // +(src: 'main.coffee')
  body
    img(src="@(images/peak.jpg)")
    // #(Posts)
    article
      h1 !(Title)
    // ##

Peak includes custom syntax for:

  • Tumblr tags:

    !(Title)
  • Tumblr blocks:

    // #(Posts)
    // ##

Peak also includes unique syntax for:

  • inlining a theme (HTML, CSS or JavaScript).

    <!-- +(src: 'style.styl' media: 'all') -->
    <!-- +(src: 'main.coffee') -->
  • applying base URLs to external assets specific to watching or deploying.

    <img src="@(images/peak.jpg)" />

When watching the theme, Peak will render Tumblr tags and blocks with the specified blog's context, like so:

<!DOCTYPE html>
<html>
  <head>
    <title>Peak Blog</title>
    <style type="text/css" media="all">
    body {
      background: white;
    }
    </style>
    <script type="text/javascript">
    (function() {
      alert('Hello World');
    }).call(this);
    </script>
  </head>
  <body>
    <img src="http://my-s3-bucket.com/dev/images/peak.jpg" />
    <article>
      <h1>Post 1</h1>
    </article>
    <article>
      <h1>Post 2</h1>
    </article>
    <article>
      <h1>Post 3</h1>
    </article>
  </body>
</html>

However, on deploy, Peak will compile Tumblr tags in their standard syntax:

<!DOCTYPE html>
<html>
  <head>
    <title>{Title}</title>
    <style type="text/css" media="all">
    body {
      background: white;
    }
    </style>
    <script type="text/javascript">
    (function() {
      alert('Hello World');
    }).call(this);
    </script>
  </head>
  <body>
    <img src="http://my-s3-bucket.com/production/images/peak.jpg" />
    {block:Posts}
      <article>
        <h1>{Title}</h1>
      </article>
    {/block:Posts}
  </body>
</html>

For more, check out the Syntax docs.

Documentation

Issues

  • Certain Tumblr tags are incompatible with Peak as they're not part of Tumblr's public customize API.

License & Contributing