問題描述
我正在查看 jquery 插件的 git repo.我想在我自己的項目中進行一些更改,但是當我打開存儲庫時,它具有我以前從未見過的結構.我不確定要使用/復制到我自己的項目中的文件.
I'm looking at a git repo for a jquery plugin. I want to make a few changes for use in my own project, but when I opened up the repo it had a structure I've never seen before. I'm not sure which files to use / copy into my own project.
有一個dist"和一個src"文件夾.這些有什么作用?這是特定于 gruntjs 還是 jquery 插件的東西?
There is a "dist" and a "src" folder. What purpose do these serve? Is this something specific for gruntjs or maybe jquery plugins?
我很好奇的 git repo:https://github.com/ducksboard/gridster.js
The git repo I'm curious about: https://github.com/ducksboard/gridster.js
推薦答案
src/
代表source,是之前的raw code縮小或連接或其他一些編譯 - 用于讀取/編輯代碼.
src/
stands for source, and is the raw code before minification or concatenation or some other compilation - used to read/edit the code.
dist/
代表 distribution,是 minified/concatenated 版本 - 實際用于生產站點.
dist/
stands for distribution, and is the minified/concatenated version - actually used on production sites.
這是為網(wǎng)絡上的資產完成的一項常見任務,以使其更小.
This is a common task that is done for assets on the web to make them smaller.
您可以在此處查看示例:http://blog.kevinchisholm.com/javascript/node-js/javascript-concatenation-and-minification-with-the-grunt-js-task-runer/
You can see an example here: http://blog.kevinchisholm.com/javascript/node-js/javascript-concatenation-and-minification-with-the-grunt-js-task-runer/
這篇關于src 和 dist 文件夾的作用是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!