简体   繁体   中英

Packager for Html + js +css

我如何将一堆html,js和css文件压缩/打包在一起,以便每当有人单击该zip文件时,chrome和本地服务器就会在该计算机上启动,并且某些特定文件将被加载到第一个屏幕上……主意

Simple!

  1. Combine all your HTML files into one.
  2. uuencode all your media assets and add them to CSS.
  3. Convert all the CSS to inline CSS in the single HTML file.
  4. Copy all the JS into the same HTML file.

You now have a package with everything in it, and since it's got an html file extension, it will launch the browser when you double-click it.

(I recommend you write a script to do this, and share it with all of us.)

You might have to create an auto executing .exe file in the zip file that runs after it's un-zipped.

You'd probably be better off with a "README.TXT" file in there, as the auto .exe is sketchy (and virus like) - it may also be snagged and quarantined by anti-virus

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM