This is for the front-end development team to follow and contract
Open Source Project Catalog specification, which is intended to achieve consistency of the open source project directory structure. Description
The keywords used in the document "must","must Not","required","shall","shall not","should","should not","recommended","may" and " optional"is described in RFC2119.
has not been finalized, the points mentioned in the specification are not in favour of the issues (please add a 目录规范
label) to the discussion.
Catalog specification
The directory structure to participate in is:
.├── .editorconfig├── .travis.yml├── css├── dist├── doc├── README.md├── src
Readme.md
Each project must contain a "must" README.md
file, which should "should" outline the features and features of the project.
. editorconfig
Each project should be "should" included .editorconfig
, used to unify the configuration Editor's line-wrapping, indentation storage format, using the way please refer to what is Editorconfig?
Src
All JS source code in the project should be "should" stored in this directory, and all JS files should "should" follow the JavaScript coding specification.
CSS, themes, less, sass
Style class file storage should "should" follow the following rules, and file writing should "should" follow the CSS coding specifications.
- Style files without a theme should be "should" unified under the CSS directory, and the background image resources used in the style should be stored "should" uniform under the
css/images
directory.
- The theme of the style file should be "should" unified in the Themes directory under the corresponding theme directory, the default theme should be "should" used
default
as the theme name, and should be "should" by default, the corresponding picture file in the style should " should"is stored in the directory under the theme directory where the style file resides images
.
- Less-formatted style files should be "should" unified under the
less
directory.
- Style files in the SASS format should be "should" unified under the
sass
directory.
Doc
All projects should "should" contain a doc
directory for detailed API usage documentation.
Dist
Dist as the project output directory, all the files compiled and supplied to the user should be "should" stored in this directory.
In order for users who are not so good at node. JS to work with compiled code, the Dist directory should "should" contain the basic output and submit it to GitHub.
Build
All tool-class scripts should be "should" in this directory.
Test
All test-related code should be "should" in this directory.
Src_cov
In order to test code coverage, all new JS files generated for test coverage should be "should" stored under this directory.
GitHub Open Source Project Catalog specification (Introduction)