Beispiel #1
0
func (a *Analyzer) GuessPackages() *common.Lister {
	packages := common.NewLister()

	if runsExpress, _ := common.GetDependencyVersion(a.PackageJSON, "express"); runsExpress {
		common.PrintlnL2("Found Express")
	}
	if hasScript, script := common.GetScriptsStart(a.PackageJSON); hasScript {
		common.PrintlnL2("Found Script: %s", script)
	}

	return packages
}
Beispiel #2
0
func (a *Analyzer) HasPackage(pack string) bool {
	hasFound, _ := common.GetDependencyVersion(a.PackageJSON, pack)
	return hasFound
}