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

gstame

v0.0.2

Published

Node library and command-line tool to help developers maintain [Google Apps Script](https://developers.google.com/apps-script) projects.

Downloads

3

Readme

GSTame

Node library and command-line tool to help developers maintain Google Apps Script projects.

Install with npm:

$ npm install -g gstame

Command-line

Start authenticating to grab a token to your Google Drive:

$ gstame auth

You can then create a new Apps Script project in your Drive account:

$ gstame create

Then list projects in your account:

$ gstame list
Project1
Project2

To save a project to the current folder like:

$ gstame pull Project1
Wrote Dialog.html
Wrote DialogJavaScript.html
Wrote Sidebar.html
Wrote Stylesheet.html
Wrote SidebarJavaScript.html
Wrote Code.gs

Modify it locally, and push back!

$ gstame push Project1
Updated Stylesheet.html
Updated Code.gs
Updated Dialog.html
Updated DialogJavaScript.html
Updated Sidebar.html
Updated SidebarJavaScript.html

Open projects in Script Editor to rename, publish, etc:

$ gstame open Project1

Future

More than offering a command line tool, I'd like to enable real local development of Google Apps Script using Node.js stubs.

For instance, take this typical Code.gs file:

function onInstall(e) {
  DocumentApp.getUi().createAddonMenu()
    .addItem('Export', 'showExportMarkdown')
    .addItem('Import', 'showImportMarkdown')
    .addToUi();
}

With the right stubs immitating Google elements and ui, you could test your gs with your favorite Node testing tools:

var assert = require('chai').assert;
var myProject = require('Code.gs');
var DocumentApp = require('gstame').stub(myProject);

describe('Installation', function() {
  it ('Adds two new items to the Add-ons menu', function() {
    assert.equal(2, DocumentApp.getUi().getAddonMenu().items.length);
  });
});

Talking about node packages, it should be possible to allow developers to define Node dependencies for their gs code using npm, and have these bundled/compiled to something that Google can execute on push.

Please let me know if you have any feedback on these!

Meta

Created by Pedro Belo, published under the MIT license.