Comments (7)
put the PHP source in it's own directory
You mean src
?
I would go with either PSR-4 or PSR-0
It is already PSR-4: https://github.com/cebe/markdown/blob/master/composer.json#L30
from markdown.
from markdown.
That's for @cebe to decide but I support this move.
from markdown.
from markdown.
what are the arguments for doing this? I only see one argument, that your tool is unable to distinguish files?
from markdown.
I think the primary reason is just to separate things so they are better defined for users and tools. Most PHP packages use an src directory, but it could be named source or something else. The point is to tell the user this is all that is really needed for this package to work. You can also point a tool at it one source directory, and it will have everything it needs to know about. Right now, you have to specifically exclude the test directory to just get the actual PHP source code the package uses.
Basically, you are almost there. Create a src directory. It would contain the and 4 php files in the root, plus the block and inline directories. Then a user could glance at the project and see block and inline are part of the package namespace. While bin and tests are obviously not part of the package, you really can't be sure unless you look at them specifically.
One example of why you might want this is if you were to grep the source for something, you might find matches in the test directory as well as the source, when you don't care about the tests. If you wanted to include the tests in the search, you simply start one level up. But searching just the source would then be easier.
In the end, what you have works. It is just not a typical PHP library layout. It keeps things a bit better organized in the end. Kind of the same reason we use namespaces, they keep things more organized.
Anyway, happy to submit a PR. I think it would be a good thing and make this package like most of the rest of the PHP community packages.
from markdown.
Relatedly, there's some good info at php-pds/skeleton about common directory structures for PHP projects. They recommend src/
and tests/
among other things.
I guess it mostly comes down to standardization, and making it slightly quicker for people new to a project to know where things are.
from markdown.
Related Issues (20)
- Php 7 compatibility
- Inline HTML support with <details> and <summary> in Github flavored markdown HOT 6
- ListTrait looping through all lines HOT 2
- Code block with empty newline does not working HOT 2
- Inconsistent behavior of multiple backticks HOT 29
- Potential XSS in link rendering HOT 2
- GFM: Line break using a backslash HOT 1
- Difference traditional and GitHub markdown HOT 3
- Can this be used to pretty print Markdown? HOT 4
- Definition list is not rendered HOT 2
- Get all headings for table of contents HOT 6
- Tags separated by spaces are rendered together HOT 1
- Table without body at the end of markdown not detected
- Confirm (modified) PSR2 coding standard HOT 3
- renderLink() breaks URLs with query params HOT 1
- h is singled out in parsing
- [FEATURE] Header links HOT 8
- Getting Fatal error Out of memory on ReflectionClass HOT 2
- Maintenance status? 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 markdown.