title: Set node environment variable to dynamic value in npm script
body: <p>I would like to set an environment variable dynamically in an npm script. </p>
  
  <p>I'm using <code>cross-env</code> as I'm developing on Windows and the server is Unix-based. I want to initialize an environment variable with the current date (<code>new Date()</code>) so I can access and render it in my <code>create-react-app</code>:</p>
  
  <p>This works (hard-coded string):</p>
  
  <pre><code>"scripts": {
    "start": "cross-env-shell REACT_APP_BUILD_DATE=\"currentDate\" react-scripts-ts start",
  }
  </code></pre>
  
  <p>Obviously, <code>currentDate</code> shouldn't be a string but the result of following expression: <code>new Date()</code>.</p>
  
  <p>How can I achieve that? In other words: How can evaluate some regular JavaScript and use its result an npm script? Or is this not possible?</p>