victorb/trymodule

Allow for default session values to be specified

Open

#12 ouverte le 23 mars 2016

Voir sur GitHub
 (1 commentaire) (1 réaction) (0 assignés)JavaScript (31 forks)github user discovery
enhancementhelp wanted

Métriques du dépôt

Stars
 (1 133 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

So I had the same idea for this module a while ago (great job btw!) and one of the things I wanted to do was allow for packages to allow a default session, meaning they could pre-define a few variables in their package.json file or somewhere else and that JSON would also be attached to the global object in the REPL section.

So say you have something like selectn and you want to test it. Instead of having to manually type in dummy data the package manager could add something to their package.json (or something) like:

...
"try": {
  "addresses":  [
  {"first": "blah blah blah"},
  {"second": "blah blah blah" }
 ]
}

And that would be parsed and loaded in just like the module itself.

Guide contributeur