Simplify the generated rules by putting the list of dependencies in a variable

We are very close to have full generic rules, but well ...
Generate .js files