GithubHelp home page GithubHelp logo

Comments (5)

rafinskipg avatar rafinskipg commented on June 14, 2024

Hi, @richardthombs , yeah you can write a pull request if you want.

All the default options are specified in /tasks/default.js .

In the /tasks/command.js you can see an example of how this defaults are overriden:

var defaults = require('./defaults');
var _ = require('lodash');
var options = _.defaults({}, defaults);

The lodash _.defaults methods, clones the object and assigns some extra overriden values. (See lodash.com docs)

After having the options object, we assign some new values from the CLI with options.whatever = whatever. Then we send them to the generator:

git_changelog.generate(options)

The generate method is in /tasks/lib/generate. This first of all invokes the .init method, that configures the library with the options in the this.initOptions(params); method. (That is at /tasks/lib/init-options.js).

I see a bit of duplicity here this.options = _.defaults(params, defaults);. But whatever, here are finally setted the options in the library.

Your new options should arrive to this point. Then use them as needed accesing to this.options.myNewOption at any point of the application. As all is a big object containing all the methods.

Sorry for the delay.

Be sure to add tests. 👍 @JohnnyEstilles have worked hard on getting a good coverage

from git-changelog.

richardthombs avatar richardthombs commented on June 14, 2024

Thanks for the info, I'll take a crack at it soon.

from git-changelog.

rafinskipg avatar rafinskipg commented on June 14, 2024

@richardthombs With the new template system you can add your custom salute message and your custom link formatting. 👍

from git-changelog.

richardthombs avatar richardthombs commented on June 14, 2024

What else could I ask for on Christmas day! THANK YOU :)

from git-changelog.

rafinskipg avatar rafinskipg commented on June 14, 2024

Merged and 1.2.0 released! Thank you too! merry xmas

from git-changelog.

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.