1

Is it possible to run javascript at compile time using plovr? (perhaps defining a variable in the config file).

For example, I would like a function that returns the time the script was compiled, something like this:

function compiledAt(){
    return #Date.now(); // #Date.now() to be processed at compile-time
}

So that after compilation, it would look like this:

function compiledAt(){
    return 1374580397271;
}
ColBeseder
  • 3,579
  • 3
  • 28
  • 45

1 Answers1

1

A few months later, I can update that it is not possible to do this using only javascript and Plovr.

Other options include:

  1. A script that makes a replace and then runs plover
  2. A customer compiler pass in Google Closure
ColBeseder
  • 3,579
  • 3
  • 28
  • 45