org.eclipse.wst.jsdt.js.npm.util

## Class NpmUtil

- java.lang.Object
- - org.eclipse.wst.jsdt.js.npm.util.NpmUtil

    public final class NpmUtil
    extends java.lang.Object

### Method Summary

All Methods Static Methods Concrete Methods
`static java.lang.String` `generateJson(PackageJson packageJson)`
`static IPath` `getNpmWorkingDir(IProject project, java.lang.String... ignores)`
`static boolean` `hasPackageJson(IFolder folder)`
`static boolean` `isPackageJson(IResource resource)`
`static boolean` `isPackageJsonExist(IProject project)`
`static PackageJson` `parsePackageJsonFile(IFile packageJsonFile)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isPackageJsonExist

    public static boolean isPackageJsonExist(IProject project)
                                      throws CoreException

Throws:
  `CoreException`

#### hasPackageJson

    public static boolean hasPackageJson(IFolder folder)
                                  throws CoreException

Throws:
  `CoreException`

#### isPackageJson

    public static boolean isPackageJson(IResource resource)

#### generateJson

    public static java.lang.String generateJson(PackageJson packageJson)

#### parsePackageJsonFile

    public static PackageJson parsePackageJsonFile(IFile packageJsonFile)
                                            throws java.io.UnsupportedEncodingException,
                                                   CoreException

Throws:
  `java.io.UnsupportedEncodingException`
  `CoreException`

#### getNpmWorkingDir

    public static IPath getNpmWorkingDir(IProject project,
                                         java.lang.String... ignores)
                                  throws CoreException

Returns:
  path to directory in which native npm call must be performed. Basically, the method scans project for package.json file and returns it's parent, ignoring "node_modules"
Throws:
  `CoreException`