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

textrun-workspace

v0.2.0

Published

Text-Runner actions for the Text-Runner workspace

Downloads

18

Readme

Text-Runner Actions for the Text-Runner workspace

This package provides Text-Runner actions for working with files.

installation

To use these actions, add this package as a development dependency by running

or

cd action

The workspace/working-dir action changes the current working directory into the given directory inside the workspace. As an example, consider the following documentation snippet:

Create a
<code type="workspace/new-directory">foo</code>
directory. Now you can change into it via this Markdown code:
<code type="workspace/working-dir">foo</code>

create-directory

The workspace/new-directory action creates a directory with the given name in the workspace. Here is a usage example:

Create a directory named <b type="workspace/new-directory">utils</b>.

When executing this Markdown snippet, Text-Runner will create a utils directory in the workspace, just as the user would.

create-file

The workspace/new-file action creates a file in the workspace. This action assumes that the documentation writes the filename in emphasized or bold text and the file content as a code block with one or three backticks. As an example, consider the following documentation snippet:

<a type="workspace/new-file">Please create a file _apples.txt_ with the content
`Fuji`.</a>

When executing the documentation, Text-Runner will create a file with name apples.txt and content Fuji. Alternatively, the documentation could also read like this:

<a type="workspace/new-file">

Please create a file with name **more-apples.txt** and the content:

```
Gala
```

</a>

Similarly, Text-Runner will create a file more-apples.txt with content Gala.

directory

The workspace/existing-directory action verifies that the workspace contains a directory with the given name. As an example, consider this documentation snippet:

Please run the command <code type="shell/command">mkdir images</code>. If
everything goes well, your computer will now have a new directory
<i type="workspace/existing-directory">images</i>. You can store images in it.

file-content

The workspace/existing-file action verifies that a file with the given name exists and has the given content. This action assumes that the documentation contains the filename as emphasized or strong text and the file content as a code block with single or triple backticks. As an example, consider the following documentation snippet:

Assuming a file <a type="workspace/new-file">_hello.txt_ with content
`hello world`</a>, we can verify it via this action:

<a type="workspace/existing-file">The file _hello.txt_ now contains
`hello world`.</a>

specifying the directory

By default, actions in this plugin create the files in the workspace. To create them in a different directory, provide a dir attribute at the region marker containing the relative path to the directory to use. As an example, consider the following documentation snippet:

<a type="workspace/new-file" dir="subdir">

Please create a file _apples.txt_ with the content `Boskoop`.

</a>

When executing the documentation, Text-Runner will create a file subdir/apples.txt and content Boskoop

.