Include files across projects

Jun 1, 2012 at 9:31 AM

I have a file with a JS object:

 

 

function Monitor() {

	var self = this;
	...

 

And I have a file that creates an instance of this and uses it.

 

self.monitor = new Monitor();

 

The files are included in a cshtml file in order:

<script type="text/javascript" src="@Url.Content("~/Scripts/Shared/Monitor.js")"> </script>    <script type="text/javascript" src="@Url.Content("~/Scripts/Views/NewMonitor_Index.js")"></script>

The problem is I get this error:

Warning 1 JS Hint: 'Monitor' is not defined.

How do I configure it so that it finds the monitor object?