feat(build): detect docs configs under docs/
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
92067b2e08
commit
077bdf3342
2 changed files with 12 additions and 0 deletions
|
|
@ -52,6 +52,8 @@ var markers = []projectMarker{
|
|||
{markerComposer, ProjectTypePHP},
|
||||
{markerMkDocs, ProjectTypeDocs},
|
||||
{markerMkDocsYAML, ProjectTypeDocs},
|
||||
{markerDocsMkDocs, ProjectTypeDocs},
|
||||
{markerDocsMkDocsYAML, ProjectTypeDocs},
|
||||
{markerPyProject, ProjectTypePython},
|
||||
{markerRequirements, ProjectTypePython},
|
||||
{markerCargo, ProjectTypeRust},
|
||||
|
|
|
|||
|
|
@ -94,6 +94,16 @@ func TestDiscovery_Discover_Good(t *testing.T) {
|
|||
assert.Equal(t, []ProjectType{ProjectTypeDocs}, types)
|
||||
})
|
||||
|
||||
t.Run("detects docs project in docs directory with mkdocs.yaml", func(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
require.NoError(t, ax.MkdirAll(ax.Join(dir, "docs"), 0755))
|
||||
require.NoError(t, ax.WriteFile(ax.Join(dir, "docs", "mkdocs.yaml"), []byte("site_name: Demo\n"), 0644))
|
||||
|
||||
types, err := Discover(fs, dir)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, []ProjectType{ProjectTypeDocs}, types)
|
||||
})
|
||||
|
||||
t.Run("detects Python project with pyproject.toml", func(t *testing.T) {
|
||||
dir := setupTestDir(t, "pyproject.toml")
|
||||
types, err := Discover(fs, dir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue