src和dist文件夹的作用是什么? [英] What is the role of src and dist folders?
问题描述
我正在寻找一个jQuery插件的git仓库。我想在自己的项目中进行一些更改,但是当我打开回购时,它有一个我从未见过的结构。我不确定要将哪些文件用于/复制到我自己的项目中。
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回购: https://github.com/ducksboard/gridster.js
The git repo I'm curious about: https://github.com/ducksboard/gridster.js
推荐答案
src /
代表 source ,并且是缩小或连接或其他编译前的原始代码 - 用于读取/编辑代码。
src/
stands for source, and is the raw code before minification or concatenation or some other compilation - used to read/edit the code.
dist /
代表分发,并且是缩小/ concatenated 版本 - 实际在生产网站上使用。
dist/
stands for distribution, and is the minified/concatenated version - actually used on production sites.
这是一项常见任务,可以通过网络上的资产进行缩小。
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-run呃/
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文件夹的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!