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

aap.bash

v1.0.21

Published

language-agnostic buildpacks using aap.json: a npm-inspired, highlevel dependecy manager/buildtool using bash+git

Downloads

43

Readme

In the beginning there was bash..and bash had aap.json

Build Status

Getting started

If you're used to npm or composer, you will feel right at home. Lets start a project by adding dependencies to it:

$ git init 
$ aap init
$ aap install ssh+git://[email protected]/username/backend.git            --save
$ aap install ssh+git://[email protected]/username/core-api.git              --save
$ aap install ssh+git://[email protected]/username/landingpage.git        --save
$ aap install ssh+git://[email protected]/username/[email protected]#master  --save
$ aap install ssh+git://[email protected]/username/docker.mysql.git          --save
$ aap install ssh+git://[email protected]/username/docker.mongodb.git        --save
$ aap install npm://[email protected]                                           --save 
$ aap install composer://[email protected]                                --save 
$ mkdir python
$ cd python && ../../aap install pip://mypythonpackage --save 

Nice! Now aap.json will look like this

Now lets push our aap.json buildpack to the repo:

$ git add aap.json && git commit -m "added aap manifest"
$ git push origin master

Congrats! Now with this aap.json, other devs can easily install dependencies like so:

$ aap install

installing 'backend'
    ├─ $ git clone ssh+git://[email protected]/username/backend.git
    ├─ Cloning into 'backend'...
    ├─ 
    ├─  ʕ•x•ʔ
    ├─ +-+-+-+  Your personal nested build & dependency monkey
    ├─ |a|a|p|  [https://github.com/coderofsalvation/aap]
    ├─ +-+-+-+
    ├─ 
    ├─   
    ├─ installing 'backend'
    ├─     ├─ $ git clone https://[email protected]/username/backend-html-templates 
    ├─     ├─ Cloning into 'backend-html-templates'...
    ├─ 
    ...and so on..
    

NOTE recursive installation is supported when aap.json occurs in gitrepo-dependencies as well.

Usecases

The usecases can range from application builds from a repository, till selfcontained installers, till deploying docker clouds:

Scripts, triggers'n' hooks

See here how to trigger scripts using the aap run <cmd>, to build and configure stuff from one central place. Perfect for monkeypatching your app before turning on the engine, compiling sources etc.

Installation

npm install aap.bash

or

wget "https://raw.githubusercontent.com/coderofsalvation/aap/master/aap" -O aap
chmod 755 aap

Why

Now you can easily manage dependencies of gitrepos, npm/composer modules and dockerrepos. All combined in one slim repo.

Basically aap init generates aap.json like this, which allows you to run:

$ aap install

Get any system to build a project from multiple remote sources.

Only requirements: git + bash

Options

 $ aap
 Usage: aap <cmd> [options]
 
 aap.json Buildpacks for the web.
 Easily manage dependencies of gitrepos, npm/composer modules and dockerrepos.
 Combine a composable cloud in one slim repo.

 Commands:

   aap init [name] [options]          ┆ generates aap manifest, options:
                                      ┆ -f = force, overwrites json

   aap install [url] [..] [options]   ┆ no arguments installs all dependencies in aap.json
                                      ┆ -f         = force, overwrites existing dependencies
                                      ┆ --save     = save dependency to "dependencies" in aap.json
                                      ┆ --save-dev = save dependency to "devDependencies"
                                      ┆ --dev      = install from "devDependencies"
                                      ┆
                                      ┆ valid urls are:
                                      ┆   [email protected]:user/repo.git
                                      ┆   ssh+git://[email protected]/user/repo.git
                                      ┆   ssh+git://github.com/username/package.git
                                      ┆   ssh+git://github.com/username/package.git#master
                                      ┆   ssh+git://github.com/username/package.git#master#commit
                                      ┆   ssh+git://github.com/username/package.git#[email protected]
                                      ┆   npm://browserify 
                                      ┆   composer://user/packagename
   aap run <script>                   ┆ runs script defined in aap.json 
 

Other possible goals

  • run/deploy a cloud using multiple Docker cloudservices in one repo using crowdr
  • depency management: wrap several repositories and modules in one repository
  • use in and outside dockers
  • install package managers in environments where they're not installed
  • avoid git submodules (gets laborous pretty easily)
  • readability: deploy and dependency info confined in one jsonfile (aap.json) to minimize shellscriptism

Todo

  • aap update
  • git commits and tags
  • npm versions
  • aap bake aap.json > myinstaller
  • global commands: source ~/.aap*.json