mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Now generates mime file
This commit is contained in:
@ -8,6 +8,7 @@ type languageInfo struct {
|
||||
Extensions []string `yaml:"extensions,omitempty,flow"`
|
||||
Interpreters []string `yaml:"interpreters,omitempty,flow"`
|
||||
Filenames []string `yaml:"filenames,omitempty,flow"`
|
||||
MimeType string `yaml:"codemirror_mime_type,omitempty,flow"`
|
||||
}
|
||||
|
||||
func getAlphabeticalOrderedKeys(languages map[string]*languageInfo) []string {
|
||||
|
@ -67,6 +67,11 @@ const (
|
||||
commitTmplPath = "internal/code-generator/assets/commit.go.tmpl"
|
||||
commitTmpl = "commit.go.tmpl"
|
||||
|
||||
// mime.go generation
|
||||
mimeFile = "data/mime.go"
|
||||
mimeTmplPath = "internal/code-generator/assets/mime.go.tmpl"
|
||||
mimeTmpl = "mime.go.tmpl"
|
||||
|
||||
commitPath = ".linguist/.git/HEAD"
|
||||
)
|
||||
|
||||
@ -97,6 +102,7 @@ func main() {
|
||||
&generatorFiles{generator.Aliases, languagesYAML, "", aliasesFile, aliasesTmplPath, aliasesTmpl, commit},
|
||||
&generatorFiles{generator.Frequencies, "", samplesDir, frequenciesFile, frequenciesTmplPath, frequenciesTmpl, commit},
|
||||
&generatorFiles{generator.Commit, "", "", commitFile, commitTmplPath, commitTmpl, commit},
|
||||
&generatorFiles{generator.Mime, languagesYAML, "", mimeFile, mimeTmplPath, mimeTmpl, commit},
|
||||
}
|
||||
|
||||
for _, file := range fileList {
|
||||
|
Reference in New Issue
Block a user