Skip to content

{{pkg}} handlebars helper, for retrieving a value from your project's package.json

License

Notifications You must be signed in to change notification settings

helpers/handlebars-helper-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

{{pkg}} NPM version

{{pkg}} handlebars helper, for retrieving a value from your project's package.json.

Quickstart

In the root of your project, run the following in the command line:

npm i handlebars-helper-pkg --save-dev

Assemble config

If you use Assemble config and Grunt, in your Gruntfile simply add handlebars-helper-pkg to the helpers property in the Assemble task or target options:

grunt.initConfig({
  assemble: {
    options: {
      // the 'handlebars-helper-pkg' module must also be listed in devDependencies
      // for assemble to automatically resolve the helper
      helpers: ['handlebars-helper-pkg', 'foo/*.js']
    }
    ...
  }
});

You can now use begin using the helper in your templates:

v{{pkg "version"}}

Returns:

v0.1.0

Author

License and Copyright

Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.

About

{{pkg}} handlebars helper, for retrieving a value from your project's package.json

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages