Good time of day.The situation is this: I am developing some browser extension simultaneously under chrome and firefox.Much of the code is common, however, naturally, there are also enough differences.The question is: can I somehow get rid of the constant copying of the common code from one project to another? I, in principle, can write a batch file that will do this, but what if there are any ready-made solutions?

5 Answers 5

Try grunt.js
  • Ohoho... needle in an egg, egg in a hare, hare in a duck. It’s probably easier to write a batch file :) But thanks anyway, when I’m working with node.js, I’ll definitely try. – Fine48 Sep 30 '13 at 10:21
ymaps.ready(init);

function init() {
    var myMap=new ymaps.Map("map", {
            center:[55.758635, 37.6338436],
            zoom: 17
        }, {
            searchControlProvider:'yandex #search'
        })

    //Create a geo object with geometry type"Point".
        myGeoObject=new ymaps.GeoObject({
            //Description of geometry.
            })
        myPieChart=new ymaps.Placemark([55.758635, 37.6338436], {
            balloonContent:'color<strong>red</strong>'
        }, {
             preset:'islands',
            iconColor:'#ec312e'
        });

    myMap.geoObjects
        .add(myGeoObject)
        .add(myPieChart)
   myMap.behaviors.disable('scrollZoom')
        
}
I chose the usual .sh script for myself.Plus the fact that the assembly does not need any additional things.
Well, or Makefile can be.
Not really a collector, but it's even cooler: kangoextensions.com/kango.html

The only thing for commercial use is paid.
  • Alas, the application is the most commercial."Contact us" instead of the price tag demotivates, again. – Fine48 Sep 30 '13 at 10:53
I use Closure compiler.In the compilation line, I install the necessary browser defaults and it obfusts minimizes the code, and the main thing is throwing out unused code.
  • Explain, please, how to use the subject so that it stuffs a certain set of files from one folder structure to another. – Fine48 Oct 1 '13 at 00:52
  • No It is not intended for copying.
    It is designed to write a single code from which you can get many different result files.
    For example, I have one code, but several target files (3 under ie, 4 under webkit, etc.).

    I do not know about you, but I have a nervous tic from the phrase “copying a common code from one project to another”. On this and proposed a cardinal solution (the rest are proposed before me)
    – Clever Cheetah Oct 1 '13 at 01:02
  • Well, I will not hide, I do not understand how it works. And a quick reading of the text on the link did not help. I will sort this out. Anyway, thanks. – Fine48 Oct 1 '13 at 01:13