Are there modern standards for building HTML5 applications with a build program?

For example, jQuery Mobile uses Make to assemble its js and css files into a single js and css file.

The idea is to separate the parts of the file that will eventually be embedded in smaller files that are responsible for their own thing.

You can do the same with a webpage. Add the images as Base64 strings, and you can have the entire site as one .htm file, but all the files that make up this embedded file exist independently of each other, as usual. The image below may bring the concept home a little better.

enter image description here

I made my own program for this, which you can read about here if you want. My question is, did someone else catch this idea or if there is a more standard way to do this?

+4
source share
3 answers

There are many things that can be done, for example:

+4
source

We use rake , but experimented with Grunt as a build tool. Your preference should determine which tool you are working with: Grunt - node.js based, rake ('ruby make') is Ruby, and one of the usual python building tools is scons . The build tools are especially useful for compiling SASS, performing css and js minification, and creating sprites. Good luck

+2
source

I would not call anything "standard" (not even defact), but there are some language-specific options. I am using Coldfusion with Railo and an extension called cfstylesheet / cfjavascript . It performs minimization, merging, and / or taxation on the fly (with caching), so you simply customize your page with some additional tags:

<cfset src = ['/cfjs/test/js/A.js','/cfjs/test/js/B.js'] /> <cfjavascript src="#src#" path="/cfjs/test/jscompressed" filename="myJs"/> 

PHP has a similar tool available under the name Minify , which works in a similar way.

A more general tool is the YUI Compressor , which can be integrated into almost any build system as a script package.

+1
source

All Articles