javascript - How to abstract commonly used working directories?
phpcn_u1582
phpcn_u1582 2017-05-19 10:32:56
0
5
559

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?

phpcn_u1582
phpcn_u1582

reply all(5)
Peter_Zhu

Create a git project, then git clone
or other projects

某草草

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)

给我你的怀抱

Write your own boilerplate

When digging a new hole, clone and rebuild.git, or simply download the zip from github

阿神

You can try http://yeoman.io/

Peter_Zhu

Scaffolding can be developed using gulp-based slush. Link description

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template