-
Notifications
You must be signed in to change notification settings - Fork 1
Handler JavaScript
Valentin Chatelain edited this page May 18, 2017
·
2 revisions
className: GoM.Core.FSAnalyzer.JsProjectHandler
This class inherits from BaseProjectFolderHandler
, its goal is to analyze a folder containing a Javascript project and create a new Project
with the project's dependencies.
A Javascript package stores its dependencies in a packages.json
file, it's a regular json and the dependencies are defined in two properties:
- dependencies: Packages required for the application to run
- devDependencies: Packages required for application development
Sniff: This method analyze the root folder given in the constructor and determine the project's type, the Sniff method can call another Handler to dispatch the work.
Read: The Read method parses dependencies of the project and return a new Project
object containing the discovered dependencies.