Coder Social home page Coder Social logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
This looks useful, Vince. Thanks for that! I'll apply your patch and give it a 
try!

Original comment by micmath on 23 Sep 2007 at 7:11

  • Changed state: Accepted
  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
The patch for Util.js seems to be empty? I assume the idea is to make multiple
options with the same name into an array? Which seems like a good idea. I think 
I can
swing that myself.

Original comment by micmath on 23 Sep 2007 at 8:30

  • Changed state: Started

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Committed in revision 244 but with some changes:

in the template, to access a global variable defined on the command line, use 
this
syntax...

Project name: {+JsDoc.DEFINE.project||''+}

Original comment by micmath on 23 Sep 2007 at 9:45

  • Changed state: Fixed

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
That works too, here is my original patches

Original comment by vinces1979 on 23 Sep 2007 at 5:10

Attachments:

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
I've decided to generalise this, rather than treating -D as a special case. You 
can
now display (or otherwise use) any commandline option in your template, by 
refering
to the JsDoc.opt object. So the above would now become:

-D="project:Testing Project"

and

{+JsDoc.opt.D.project+}

But, to het the name of the template, you could similarly use:

{+JsDoc.opt.t+}


Original comment by micmath on 23 Sep 2007 at 7:18

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
So they D still exists and can have multiple vars passed in?

Original comment by [email protected] on 23 Sep 2007 at 7:24

from jsdoc-toolkit.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Ok, -D is a little special because it splits up the values like "name: the 
value",
but otherwise you can actually now treat any commandline option as an array by
calling getOptions() like so:

JsDoc.opt = Util.getOptions(arguments, {'o':'justOnes', 'm[]':'many'});

The new '[]' bit tells the option parser to always force that option into an 
array.
So in the case of many -o options (for example) the last -o overwrites any 
before it,
but in the case of -m (for example) the value will always be an array, and will
contain every -m value.

And yes, -D is in the latest commit, and you can have many -D="keyName1:some 
value"
-D="keyName2:some other value"options and you should read them from within a 
template
like so:

{+JsDoc.opt.D.keyName1+} and {+JsDoc.opt.D.keyName2+}


Original comment by micmath on 23 Sep 2007 at 8:00

from jsdoc-toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.