1

everyone, I'm working on my project with gulp, browserify, angular,but I run into a stone wall. I have wrote the code

var indexController = require('./controllers/index.js');

when I modify the controller file "index.js", and rebuild the project, the final javascript in browser is just still not refreshed.

So I search the way how to automatically add md5 signature after the require:

var indexController = require('./controllers/index.js?v=324975934795');

just like when working in html:

<script src="./controllers/index.js?v=324975934795"></script>

Also, I want to find a tool to help me automatically finish it.

I should appreciate it if anyone who suggest me a tool or show me how to automatically do the job.

shiki
  • 11
  • 3
  • [Related question](http://stackoverflow.com/questions/8315088/prevent-requirejs-from-caching-required-scripts). I'd check [this answer](http://stackoverflow.com/questions/8315088/prevent-requirejs-from-caching-required-scripts), it seems to be most appropriate for your case. – raina77ow Sep 19 '14 at 08:14
  • Thank you very much.Requirejs is very nice, but I don't like the configuration of requirejs, so I use the browserify. Also, what I need is the solution in browserify.I have just found the tool on github to solve my problem.[node-static-asset](https://github.com/bminer/node-static-asset) – shiki Sep 20 '14 at 09:12

1 Answers1

0

Thank you for anyone who checking.I have found the solution for my problem in node-static-asset
I should be glad if anyone who show me more nicer solution.

shiki
  • 11
  • 3