mklabs / gimme-assets

A little, experimental tool to manage web assets from the CLI.
11 stars 2 forks source link

install: with no args #3

Closed mklabs closed 9 years ago

mklabs commented 12 years ago

when no args, tries to read the gimme entry of your package.json. The format is simply an array of library names (since there's no version management).

mklabs commented 12 years ago

Re-opening. What I basically want to be able to do is something like this:

{
  "author": "me",
  "name": "my-package",
  "description": "my-package description",
  "version": "0.2.1",
  "private": "true",
  "dependencies": {
  },

  "devDependencies": {
  },

  "assets": {

    "h5bp": "h5bp/html5-boilerplate (./)",

    "underscore": {
      "src": "documentcloud/underscore",
      "dest": "js/vendor",
      "files": {
        "underscore.js": "underscore.js"
      }
    },

    "backbone": {
      "src": "documentcloud/backbone@0.9.2",
      "dest": "js/vendor",
      "files": {
        "backbone.js": "backbone.js"
      }
    },

    "bootstrap": {
      "src": "twitter/bootstrap",
      "dest": "./",
      "files": {
        "less/*.less": "css/less",
        "img/*": "css/less/img",
        "js/*.js": "js/vendor/bootstrap"
      }
    }
  }
}

maybe putting these in a gimme or assets subprop.

default location would be assets/vendor.

A syntax like user/repo@version should be supported. Same for specifying a branch.

A syntax like user/repo (./alternate/location) should be supported. Values could be a hash object or a simple string following a given pattern, most likely something like user/repo@(version|branch) (./path).