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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sf2s3oc-p

v0.6.6

Published

Sync Folder To S3 On Change

Readme

Install

$ npm install sf2s3oc-p -S

To Start

first create a file with the script below e.g. watch.js

Usage (Function)

const sf2s3oc = require('sf2s3oc-p')();

sf2s3oc.start(
    'folder/path/',  // with ending slash else aws will create a nested folder named ___
    {
        accessKeyId: 'aws accessKeyId',
        secretAccessKey: 'aws secretAccessKey'
    },
    { bucket: 's3 bucket' }
);

// Change Default options Example
// pass 4th param
sf2s3oc.start(
    'folder/path/',  // with ending slash else aws will create a nested folder named ___
    {
        accessKeyId: 'aws accessKeyId',
        secretAccessKey: 'aws secretAccessKey'
    },
    { bucket: 's3 bucket' },
    {
        logPath: {
            add: 'path to log',
            modified: 'path to log',
            remove: 'path to log',
        },
        ignore: {
            folders: {
                GNUPG: '^.gnupg.*',
                HELLO: '^.hello.*'
            },
            files: {
                GOUTPUTSTREAM: '^.goutputstream.*',
                HELLO: '^.hello.*',
            }
        }
    }
);

Usage (Class) RECOMMENDED

const sf2s3oc = require('sf2s3oc-p')('class');
const nw = new sf2s3oc(
    'folder/path/',  // with ending slash else aws will create a nested folder named ___
    {
        accessKeyId: 'aws accessKeyId',
        secretAccessKey: 'aws secretAccessKey'
    },
    { bucket: 's3 bucket' }
);
nw.start();

// example with setters and extra params for options
const anw = new s();

anw.watchPath = 'folder/path/';  // with ending slash else aws will create a nested folder named ___
anw.awsConfig = {
    accessKeyId: 'aws accessKeyId',
    secretAccessKey: 'aws secretAccessKey'
};
anw.s3Config = { bucket: 's3 bucket' };
anw.options = {
    logPath: {
        add: './log/add.txt',  // this is the default
        modified: './logs/modified.txt',  // this is the default
        remove: './log/remove.txt',  // this is the default
    },
    ignore: {
        folders: {
            GNUPG: '^.gnupg.*',  // default
            HELLO: '^.hello.*'  // default for testing
        },
        files: {
            GOUTPUTSTREAM: '^.goutputstream.*',  // default
            HELLO: '^.hello.*',  // default for testing
        }
    }
};
anw.start();

Run

run using node/nodemon/pm2 path e.g node index or pm2 index