Loading ...
Sorry, an error occurred while loading the content.

Re: JSLint and HTML

Expand Messages
  • falk.werner@rocketmail.com
    ... Is it good practice to only check parts of a product and not the assembled product ( a single output file ) itself?
    Message 1 of 13 , Mar 21, 2013
    • 0 Attachment
      > Good practice is to use separate files during development, and then
      > (automatically) merge them together for deployment.

      Is it good practice to only check parts of a product and not the assembled product ("a single output file") itself?
    • Andrew Todd
      ... You will be better off moving to a build and templating system that pulls in your JavaScript source files and your HTML templates, checks them separately,
      Message 2 of 13 , Mar 22, 2013
      • 0 Attachment
        On Thu, Mar 21, 2013 at 11:37 AM, hemanrobinson <hemanrobinson@...>wrote:

        > **
        > For our project, embedding JavaScript in HTML is not bad practice. In
        > fact, there is no alternative. We are required to produce a single output
        > file.
        >

        You will be better off moving to a build and templating system that pulls
        in your JavaScript source files and your HTML templates, checks them
        separately, does any minifying you want, and then combines them together.
        In this way, you are using tools designed for their tasks.

        I use Maven, the JSLint Maven plugin, and the Freemarker preprocessor Maven
        plugin for this purpose.


        [Non-text portions of this message have been removed]
      • hemanrobinson
        Thanks for all the advice. We have found a workaround. I am sorry to lose the HTML parsing; it was a useful feature.
        Message 3 of 13 , Mar 25, 2013
        • 0 Attachment
          Thanks for all the advice. We have found a workaround.

          I am sorry to lose the HTML parsing; it was a useful feature.


          --- In jslint_com@yahoogroups.com, Andrew Todd <andrew.todd659@...> wrote:
          >
          > On Thu, Mar 21, 2013 at 11:37 AM, hemanrobinson <hemanrobinson@...>wrote:
          >
          > > **
          > > For our project, embedding JavaScript in HTML is not bad practice. In
          > > fact, there is no alternative. We are required to produce a single output
          > > file.
          > >
          >
          > You will be better off moving to a build and templating system that pulls
          > in your JavaScript source files and your HTML templates, checks them
          > separately, does any minifying you want, and then combines them together.
          > In this way, you are using tools designed for their tasks.
          >
          > I use Maven, the JSLint Maven plugin, and the Freemarker preprocessor Maven
          > plugin for this purpose.
          >
          >
          > [Non-text portions of this message have been removed]
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.