fix #9647 tmpl=>nimf (#9658)

This commit is contained in:
Timothee Cour
2018-11-13 23:27:48 -08:00
committed by Andreas Rumpf
parent d89c815c41
commit b5448bf25c
15 changed files with 23 additions and 15 deletions

View File

@@ -88,6 +88,11 @@ proc enumToString*(enums: openArray[enum]): string =
### Language changes
- The standard extension for SCF (source code filters) files was changed from
``.tmpl`` to ``.nimf``,
it's more recognizable and allows tools like github to recognize it as Nim,
see [#9647](https://github.com/nim-lang/Nim/issues/9647).
The previous extension will continue to work.
### Tool changes
- `jsondoc` now include a `moduleDescription` field with the module

View File

@@ -31,13 +31,16 @@ Usage
=====
First, put your SCF code in a separate file with filters specified in the first line.
**Note:** You can name your SCF file with any file extension you want, but the conventional extension is ``.tmpl``.
**Note:** You can name your SCF file with any file extension you want, but the
conventional extension is ``.nimf``
(it used to be ``.tmpl`` but that was too generic, for example preventing github to
recognize it as Nim source file).
If we use `generateXML` code shown above and call the SCF file `xmlGen.tmpl`
If we use `generateXML` code shown above and call the SCF file `xmlGen.nimf`
In your `main.nim`:
.. code-block:: nim
include "xmlGen.tmpl"
include "xmlGen.nimf"
echo generateXML("John Smith","42")

View File

@@ -31,7 +31,7 @@ Path Purpose
reStructuredText files
``lib`` the Nim library
``web`` website of Nim; generated by ``nimweb``
from the ``*.txt`` and ``*.tmpl`` files
from the ``*.txt`` and ``*.nimf`` files
============ ===================================================

View File

@@ -180,7 +180,7 @@ block symchoicefield:
import os, times
include "sunset.tmpl"
include "sunset.nimf"
block ttempl:
const
tabs = [["home", "index"],

View File

@@ -1,7 +1,7 @@
#? stdtmpl(subsChar='?') | standard
#proc generateBuildShellScript(c: ConfigData): string =
# result = "#! /bin/sh\n# Generated from niminst\n" &
# "# Template is in tools/niminst/buildsh.tmpl\n" &
# "# Template is in tools/niminst/buildsh.nimf\n" &
# "# To regenerate run ``niminst csource`` or ``koch csource``\n"
set -e

View File

@@ -1,7 +1,7 @@
#? stdtmpl(subsChar='?') | standard
#proc generateMakefile(c: ConfigData): string =
# result = "# Generated from niminst\n" &
# "# Template is in tools/niminst/makefile.tmpl\n" &
# "# Template is in tools/niminst/makefile.nimf\n" &
# "# To regenerate run ``niminst csource`` or ``koch csource``\n"
CC ??= gcc

View File

@@ -126,13 +126,13 @@ proc skipRoot(f: string): string =
inc i
if result.len == 0: result = f
include "inno.tmpl"
include "nsis.tmpl"
include "buildsh.tmpl"
include "makefile.tmpl"
include "buildbat.tmpl"
include "install.tmpl"
include "deinstall.tmpl"
include "inno.nimf"
include "nsis.nimf"
include "buildsh.nimf"
include "makefile.nimf"
include "buildbat.nimf"
include "install.nimf"
include "deinstall.nimf"
# ------------------------- configuration file -------------------------------

View File

@@ -71,7 +71,7 @@ proc initConfigData(c: var TConfigData) =
c.gitCommit = output.strip
c.quotations = initTable[string, tuple[quote, author: string]]()
include "website.tmpl"
include "website.nimf"
# ------------------------- configuration file -------------------------------