html - Git web development workflow, commit links to minified css and js? -


i have read implementing git hooks minify css , js source files post-commit (as minified assets shouldn't committed) best practice when committing actual links these within html pages?

the options can think of are:

git commit html pages links minified source files, without minified source files in repository:

<link href="/assets/css/application.min.css" rel="stylesheet"> <script src="/assets/js/application.min.js"></script> 

git commit html pages links development source files , change minified once deployed:

<link href="/assets/css/application.css" rel="stylesheet"> <script src="/assets/js/application.js"></script> 

i sure there simple , effective workflow achieve unaware of. many in advance!

for prefer put in sample config file , commit instead. during development , deployment sample config file copied proper name , modified necessary fit requirements. way won't have unnecessary modifications tracked file specific deployment environment.

example:

# config.conf.sample main_css = application.min.css main_js = application.min.js 

during development copy config.conf.sample config.conf , modify entries accordingly:

# config.conf main_css = application.css main_js = application.js 

and during deployment since entries matches want simple copy suffices.

this setup works cases don't want commit config files contain database connection passwords repository.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -