Advertisement
Guest User

Untitled

a guest
May 29th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. grunt.registerTask('buildapp', [
  2. 'clean:app',
  3. 'string-replace:app_version',
  4. 'copy:app_build_index',
  5. 'copy:app_build_config',
  6. 'ngconstant:app80',
  7. 'compress:app80',
  8. 'string-replace:app80',
  9. 'ngconstant:app443',
  10. 'compress:app443',
  11. 'string-replace:app443',
  12. 'ngconstant:app6001',
  13. 'compress:app6001',
  14. 'string-replace:app6001'
  15. ])
  16.  
  17. Peut se réécrire comme ca. C'est plaus maintenable et tu peux mettre ta tache d'obfuscation dedans facilement ;)
  18.  
  19. grunt.registerTask('buildapp', [
  20. 'clean:app',
  21. 'string-replace:app_version',
  22. 'copy:app_build_index',
  23. 'copy:app_build_config',
  24. 'processByPort:80',
  25. 'processByPort:443',
  26. 'processByPort:6001',
  27. ]);
  28. grunt.registerTask('processByPort', 'port specific alias for [ngconstant, compress, string-replace]', function _processByPort(n) {
  29. grunt.task.run('ngconstant:app' + n, 'compress:app' + n, 'string-replace:app' + n);
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement