Comments (8)
i like the idea: too often packages come with a lot of extra cruft / clutter eg tools used to develop the package or config files for those tools. These clutter the namespace and can interfere with IDEs eg with phpStorm, i have to manually tell it to ignore symbols in some .phar files a package developer has forgotten to exclude from release because they are duplicates of other packages in my composer.json.
from skeleton.
That's interesting reading; thanks.
On furhter consideration, though, it occurs to me that this, like #6 , might well be out-of-scope for a standard that intends only to define top-level names for common directories and files.
from skeleton.
Can you provide an example of what is "a lean package"? I read your link but don't understand it.
from skeleton.
A lean package is a released package that does only contain the minimal required code / artifacts for it to work.
For this standard PHP package skeleton this would be:
$ tree .
.
├── (LICENSE)
├── (bin)
├── composer.json
├── (config)
├── (public)
└── src
(*) optional
With the presence of the directories bin
, config
, and public
being dependent on the type of the package. And the presence of the LICENSE
file being dependent on the chosen license model of the package.
This can be achieved by utilising export-ignore patterns in a .gitattributes file like shown next.
.ctl.cache export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.github/ export-ignore
.gitignore export-ignore
.gitmessage export-ignore
.php_cs export-ignore
.travis.yml export-ignore
bin/application-version export-ignore
bin/release-version export-ignore
bin/start-watchman export-ignore
bin/travis/* export-ignore
CHANGELOG.md export-ignore
example/ export-ignore
phpunit.xml.dist export-ignore
README.md export-ignore
tests/ export-ignore
from skeleton.
@raphaelstolt -- Can you link to some literature that talks about "lean" packages in general?
Also, I don't know how common this is. At a minimum, analyzing for this would require examining the .gitattributes of each package in the sample, then determining if the "right" files had been excluded. Then it would need to be able to be applied regardless of the SCM system (Git, Hg, Svn, FutureSystem, etc).
If it's not commonly-done, and can't be abstracted away from a particular SCM toolset, then it's probably not a candidate for the standard.
from skeleton.
@pmjones So there are two links I can provide you. One from reddit and one that got me started using .gitattributes
.
I can also remember a debate and decision to not do this for the Symfony components, would really like to know their reasoning against it.
A quick and shallow Google search reveals that this feature seems to be Git specific. However I got a gut feeling that the majority of PHP packages are using a Git based SCM and that lean packages are definitively a goal to strive for. How about making it a MUST for Git based packages and a RECOMMEND or SHALL for the other SCM systems?
from skeleton.
@raphaelstolt @pavarnos Any further thoughts here? I am leaning toward closing this as "out of scope" but I want to make sure I'm not missing something else important.
from skeleton.
Feel free to close it.
from skeleton.
Related Issues (20)
- Some Interfacing HOT 5
- Update Packagist HOT 1
- License rules do not respect the LGPL HOT 6
- A /data directory HOT 2
- Resource vs "other files" and run-time generated artifacts HOT 6
- resource -> res, docs -> doc, tests -> test HOT 2
- Clarify difference between /public and /src HOT 4
- Where does the database go? HOT 2
- Prefer PSR-4 HOT 1
- /bin particulars HOT 3
- /src for main? HOT 1
- Skeleton generation checks wrong list of files HOT 2
- Generator path issue
- Question: Concrete PDS-Skeleton Example HOT 1
- examples directory HOT 2
- Question: Clarify "resources" vs "vendor" in composer projects. HOT 2
- IDEA: Considered submitting as a PSR? HOT 3
- What is better?, resources, res or assets? HOT 1
- Don't you mind if i contribute dockerfile?
- What about NEWS instead of CHANGELOG? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skeleton.