Featured post
javascript - Jsmin on folder with subfolders -
i running jsmin compress javascript files of asp.net web application postbuild event in csproj file this:
"jsmin.exe" "$(projectdir)script" "$(projectdir)script\minified.js"
this working fine when kept js files in root of script folder. starting become alot of files in folder, decided divide files subfolders. seems jsmin fetches js files in root folder, , cannot see has option include files in sub-folders. have solution situation this? seem me should pretty common thing do, why bit surprised not parameter jsmin.exe enabling sub-folders.
you should able use dos' for
command that:
for /r "$(projectdir)scripts/debug" %s in (*.js) jsmin.exe %s > "$(projectdir)scripts/release/%~ns.min.js"
that assumes scripts in (or in directories within) directory named ~/scripts/debug , minifies them ~/scripts/release .js replaced .min.js.
i've tested in cmd, not build event in vs. so, may need tweak syntax slightly.
- Get link
- X
- Other Apps
Comments
Post a Comment