Search code examples
deploymentgulpgruntjsintegrationtranslation

most light/simple way to deploy static html/css/js (minimize, localisation, upload on server in one command)


From one command line, what is the simplest way to :

  1. minimize static html, css, js, png, jpeg

  2. replace translation to form multiple static pages

  3. upload the minimized files on a server

For the translation part :

index.html with :
 supersite-en_UK.po supersite-de_DE.po supersite-fr_FR.po supersite-es_ES.po 

.. will result as :

index.html , fr/index.html , de/index.html , es/index.html

, with all these sites being static files, minimized.

The tool should be one software or one script usable from (at least) Linux - so the user has just to press a button or run a command to make all the magic work.

As input configuration, it should have what folder it should get the files (html,js,css,images), and where it should get the po files, and the ftp connection details. That's (about) it.

All in all, it is a static website with 1 to 3 pages per language - with no server dynamics (no node, no php, no java, no ruby). So no need to install a jenkins server or alike.

So super-simple!! Super simplest simple.


Solution

  • Use a Makefile. Define rules e.g. minify, translate, publish, etc. to reflect what your project needs and finally define a default that calls these rules following your deployment pipeline. Running make from your project directory is your one command.