mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
committed by
Andreas Rumpf
parent
d89c815c41
commit
b5448bf25c
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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
|
||||
============ ===================================================
|
||||
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ block symchoicefield:
|
||||
|
||||
|
||||
import os, times
|
||||
include "sunset.tmpl"
|
||||
include "sunset.nimf"
|
||||
block ttempl:
|
||||
const
|
||||
tabs = [["home", "index"],
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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 -------------------------------
|
||||
|
||||
|
||||
@@ -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 -------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user