dsdev
dsdev

Reputation: 1124

Gulp Equivalent of grunt.package

Is there a gulp equivalent of grunt.package?

I would like to get some of the meta data as a variable from my package.json file.

Upvotes: 1

Views: 126

Answers (1)

OverZealous
OverZealous

Reputation: 39570

Just add this to your gulpfile:

var pkg = require('./package.json');

That's it! That's one of the great things about gulp, no need to use some specialized API for simple things.

You can also require bower.json the same way, if you want.

I've also been using an external file to store all the specific build information, so it's more flexible to reuse my gulpfile later.

Upvotes: 4

Related Questions