This project is read-only.

JSLint Task

A good example of using the JSLint task can be found at http://www.sedodream.com/PermaLink,guid,8e4c1e41-393b-402b-8251-10f3f59a54e2.aspx.

<!--
  Sample project file demonstrating the use of the GetAssemblyVersion task.
  When executed this build file will actually fail, which demonstrates
  how the JSLint is verifying the contents of the scripts
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         DefaultTargets="Demo">
  <PropertyGroup>
    <SedodreamInstallLoc Condition="$(SedodreamInstallLoc)==''">$(MSBuildExtensionsPath)\Sedodream\</SedodreamInstallLoc>
  </PropertyGroup>

  <UsingTask AssemblyFile="$(SedodreamInstallLoc)\Sedodream.MSBuild.Tasks.dll" TaskName="JSLint"/>

  <ItemGroup>
    <JSScriptFiles Include="$(MSBuildProjectDirectory)\Javascript\pass01.js" />
    <JSScriptFiles Include="$(MSBuildProjectDirectory)\Javascript\fail01.js" />
    <JSScriptFiles Include="$(MSBuildProjectDirectory)\Javascript\broswer01.js" />

  </ItemGroup>

  <Target Name="Demo">

    <JSLint ScriptFiles="@(JSScriptFiles)" browser="false" UseGoodpartsOptions="true"/>

  </Target> 

</Project>

Last edited Apr 17, 2008 at 6:37 PM by sayed_hashimi, version 1

Comments

No comments yet.