Module: PackageJson

Methods

(static) addBabelPresetSync(preset, pathName)

This functions adds a babel preset on a package.json file in a sync way.
Parameters:
Name Type Description
preset string
pathName string
Source:

(static) addDescriptionSync(description, pathName)

This functions adds a description on a package.json file in a sync way.
Parameters:
Name Type Description
description string
pathName string
Source:

(static) addEngineSync(engineName, engineValue, pathName)

This function adds a engine information on a package.json file in a sync way.
Parameters:
Name Type Description
engineName string
engineValue string
pathName string
Source:

(static) addLicenseSync(license, pathName)

This functions adds a license on a package.json file in a sync way.
Parameters:
Name Type Description
license string
pathName string
Source:

(static) addMainSync(main, pathName)

This functions adds a main on a package.json file in a sync way.
Parameters:
Name Type Description
main string
pathName string
Source:

(static) addRepositoryFieldsSync(type, url, pathName)

This functions adds repository fields on a package.json file in a sync way.
Parameters:
Name Type Description
type string
url string
pathName string
Source:

(static) addScriptSync(scriptName, scriptContent, pathName)

This function adds a script on a package.json file from a specific path in a sync way.
Parameters:
Name Type Description
scriptName string
scriptContent string
pathName string
Source:

(static) readSync(pathName)

This function reads and returns as a JSON object the package.json from a specific path in a sync way.
Parameters:
Name Type Description
pathName string
Source:

(static) writeSync(packageContent, pathName)

This function writes a package.json inside a specific path in a sync way.
Parameters:
Name Type Description
packageContent object
pathName string
Source: