Skip to content

Commit 5b8cd66

Browse files
committed
Add examples for locally hosted repos and files
1 parent 2c16fa6 commit 5b8cd66

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

example-channel.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@
1010
// All repositories must be an HTTPS URL. SSL certificates help prevent
1111
// unauthorized code being loaded onto users' machines.
1212
"repositories": [
13+
// include another external repository.json
1314
"https://packagecontrol.io/packages.json",
15+
16+
// include repository located relative to this one
17+
"./local/repository.json",
18+
19+
// include a locally hosted repository.json
20+
"file:///absolute/path/to/repository.json",
21+
22+
// include single GitHub repository (possible, but not recommended)
1423
"https://github.com/buymeasoda/soda-theme",
24+
25+
// include Github user or organization (possible, but not recommended)
1526
"https://github.com/SublimeText"
1627
],
1728

example-repository.json

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,26 @@
572572
"tags": "st4107-"
573573
}
574574
]
575+
},
576+
577+
// Locally hosted package using `file://` protocol.
578+
{
579+
"name": "My Package",
580+
"description": "A locally hosted Sublime Text package",
581+
"author": "John Doe",
582+
"issues": "https://company.com/software/issues",
583+
"releases": [
584+
{
585+
"platforms": ["windows-x64"],
586+
"version": "1.0.0",
587+
"url": "file:///c:/absolute/path/to/My Package.sublime-package"
588+
},
589+
{
590+
"platforms": ["linux-x64"],
591+
"version": "1.0.0",
592+
"url": "./path/relative/to/repository_json/My Package.sublime-package"
593+
}
594+
]
575595
}
576596
],
577597

@@ -803,6 +823,28 @@
803823
"python_versions": ["3.3"]
804824
}
805825
]
826+
},
827+
828+
// Locally hosted libraries using `file://` protocol.
829+
{
830+
"name": "My Library",
831+
"description": "A locally hosted python package",
832+
"author": "John Doe",
833+
"issues": "https://company.com/software/issues",
834+
"releases": [
835+
{
836+
"platforms": ["linux-x64"],
837+
"python_versions": ["3.8"],
838+
"version": "1.0.0",
839+
"url": "file:///absolute/path/to/my_librariy.whl"
840+
},
841+
{
842+
"platforms": ["windows-x64"],
843+
"python_versions": ["3.8"],
844+
"version": "1.0.0",
845+
"url": "./path/relative/to/repository_json/my_librariy.whl"
846+
}
847+
]
806848
}
807849
],
808850

@@ -821,7 +863,10 @@
821863
"./repository/0-9.json",
822864
"./repository/a.json",
823865

824-
// An example of an absolute URL
866+
// An example of a local absolute URL
867+
"file:///absolute/path/to/repository.json",
868+
869+
// An example of a remote absolute URL
825870
"https://packagecontrol.io/repository/b.json"
826871
]
827872
}

0 commit comments

Comments
 (0)