browserify-package-json

WebJar for browserify-package-json

License

License

MIT
Categories

Categories

JSON Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

browserify-package-json
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

browserify-package-json
WebJar for browserify-package-json
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/fanatid/browserify-package-json

Download browserify-package-json

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/browserify-package-json/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>browserify-package-json</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/browserify-package-json/
implementation 'org.webjars.npm:browserify-package-json:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/browserify-package-json/
implementation ("org.webjars.npm:browserify-package-json:1.0.1")
'org.webjars.npm:browserify-package-json:jar:1.0.1'
<dependency org="org.webjars.npm" name="browserify-package-json" rev="1.0.1">
  <artifact name="browserify-package-json" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='browserify-package-json', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "browserify-package-json" % "1.0.1"
[org.webjars.npm/browserify-package-json "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

browserify-package-json

NPM Package Build Status

js-standard-style

Description

Did you know that when browserify includes package.json file in bundle this bundle can contain private information like installed module path?

For example, lets install browserify:

$ pwd
/home/kirill/tmp
$ npm install browserify
...
$ cat ./node_modules/browserify/package.json  | grep _
  "_args": [
  "_from": "browserify@latest",
  "_id": "[email protected]",
  "_inCache": true,
  "_location": "/browserify",
  "_nodeVersion": "6.3.1",
  "_npmOperationalInternal": {
    "tmp": "tmp/browserify-13.1.1.tgz_1477162362598_0.2967709470540285"
  "_npmUser": {
  "_npmVersion": "3.10.5",
  "_phantomChildren": {},
  "_requested": {
  "_requiredBy": [
  "_resolved": "https://registry.npmjs.org/browserify/-/browserify-13.1.1.tgz",
  "_shasum": "72a2310e2f706ed87db929cf0ee73a5e195d9bb0",
  "_shrinkwrap": null,
  "_spec": "browserify",
  "_where": "/home/kirill/tmp",
    "string_decoder": "~0.10.0",

This package remove all values for which keys starts with _.

How I can use this package?

There are two ways,

CLI

browserify -t [ browserify-package-json ] index.js

API

const browserify = require('browserify')
const browserifyPackageJSON = require('browserify-package-json')

browserify()
  .add('index.js')
  .transform(browserifyPackageJSON)
  .bundle((err, result) => {
    if (!err) console.log(result.toString())
  })

License

MIT

Versions

Version
1.0.1