For example, if I want to make a demo of a front-end page, my most commonly used structure is as follows
frontend
|---img/
|---img01.jpg
|---css/
|---style1.css
|---js/
|---js1.js
|---page1.html
|---page2.html
|---page3.html
So, the structure must be established step by step every time. Or right-click to package .zip as a template.
Every time you want to use it, create a folder and extract .zip. It just doesn’t feel very elegant. .
So what method can be used to abstract the above structure, so that the directory structure can be quickly created with just one command or something?
某草草2017-05-19 10:34:56
Write a script command to execute the action of creating folders and files. (Use BAT under Windows, use Shell script under Linux, and use the fs library of nodeJs to write cross-platform, or you can also use python)
给我你的怀抱2017-05-19 10:34:56
Write your own boilerplate
When digging a new hole, clone and rebuild.git
, or simply download the zip from github