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

@apify/actor-templates

v0.1.5

Published

A manifest of Apify actor templates.

Downloads

6,084

Readme

Apify Actor templates

This repository stores boilerplate templates and code examples for Apify Actor. The purpose of these templates is to help devlopers get started with actor development on the Apify platform.

How to use the templates

You can start using the actor templates right away with the Apify CLI:

npx apify-cli create my-crawler

or

npm -g install apify-cli
apify create my-actor

After running the command you will be prompted to select one of the templates from the list displayed in your terminal. The available templates are:

Getting started templates

Basic templates to start developing actors on the Apify platform using Node.js (JavaScript/Typescript), or Python. Just install the CLI and watch your actor run.

You can find more code examples in the Apify SDK documentation.

Project boilerplate

If you're already familiar with Actors, you can use the following templates to bootstrap new projects using an empty project templates or Crawlee templates:

Empty projects

Start a new web scraping project quickly and easily in JavaScript/TypeScript (Node.js) or Python with our empty project template. It provides a basic structure for the Actor with Apify JavaScript SDK or Apify Python SDK and allows you to easily add your own functionality.

Crawlee projects

To run the template:

cd my-actor
apify run

Templates API

The template manifest can be fetched programmatically. Apify CLI uses this to always fetch the most up to date templates.

npm i @apify/actor-templates
const templates = require("@apify/actor-templates");

const manifest = await templates.fetchManifest();

Publish updated/new template

All templates are stores in ./templates directory. For each template needs to create an archive of whole source code into the ./dist/templates directory. The archive is used to create a boilerplate template in apify CLI or other places in the Apify system.

Update and add templates

If you want to change a template, you will have to update the template files and the manifest.json file before pushing the changes to the master branch. After pushing to master, the archive will be automatically built using Github actions.

How to propagate templates into Apify CLI

Templates are propagated to Apify CLI templates. You can then find your newly added template when using the apify create command. The propagation happens after committing a new version of the template into the master branch. After tests succeeded the Github action builds archives of each template and pushes these archives into the repository. The CLI command then uses those archives to bootstrap your project folder. We did it this way because we can update template structure/code without publishing any package to npm. It makes templates changes agile.

Reference

Contributing

If you have any ideas for improvements, either submit an issue or create a pull request. For contribution guidelines and the code of conduct, see CONTRIBUTING.md.