0

I do not have any specific code to share as I believe the Grunt configuration of tasks is fairly straightforward.

What I would like to ask is for recommendations on replacing JavaScript variables (contained within a JavaScript /src folder) with new values based on the chosen Grunt task.

Specifically, I have a Shared.js (AngularJS Factory) that contains information critical to the application working (ex. locations of Web Services, Whether authentication is enabled, etc.).

Would it make more sense to "build" a new Shared.js depending on the task (i.e. swap in dev-Shared.js if the task is "dev") or should I use Grunt's "string-replace" to crawl through each JavasSript file and replace these values?

I would appreciate your recommendations and comments and any code snippets that you have time to provide. :)

CroMagnon
  • 1,218
  • 7
  • 20
  • 32
Chris
  • 21
  • 4

0 Answers0