@@ -4,7 +4,7 @@ The module mapfile-ejs allows you to use [Embedded JavaScript (EJS)](http://ejs.
44
55## Installation
66
7- 1 . Install ` Node.js ` and ` npm ` from < https://nodejs.org/ >
7+ 1 . Install ` Node.js ` and ` npm ` from < https://nodejs.org/ >
882 . Install ` mapfile-ejs ` with ` npm i mapfile-ejs -g `
99
1010## Getting started
@@ -77,52 +77,58 @@ and at the [examples directory](https://github.com/stadt-bielefeld/mapfile-ejs/t
7777
7878### Mapfile
7979
80- Input (example.emap):
80+ ** Input (example.emap):**
8181
8282``` js
8383MAP
84-
8584< %
8685 // Loop to create 3 layers
8786 for (let i = 0 ; i < 3 ; i++ ) {
88- % >
89-
90- LAYER
91- NAME " layer_<%- i %>"
92- END
93-
87+ -% >
88+ LAYER
89+ NAME " layer_<%- i %>"
90+ END
9491< %
9592 } // End of loop
96- % >
97-
93+ -% >
9894END
9995```
10096
101- Output (example.map):
97+ ** Output (example.map):**
10298
10399``` js
104100MAP
105-
106- LAYER
107- NAME " layer_0"
101+ LAYER
102+ NAME " layer_0"
103+ END
104+ LAYER
105+ NAME " layer_1"
106+ END
107+ LAYER
108+ NAME " layer_2"
109+ END
108110END
111+ ```
109112
110- LAYER
111- NAME " layer_1"
112- END
113+ ** How to use require and include:**
113114
114- LAYER
115- NAME " layer_2"
116- END
115+ ``` js
116+ < %
117+ // require is available like
118+ const path = require (` path` );
119+ -% >
117120
118- END
121+ < %
122+ // include is available (include_file.ejs) like
123+ -% >
124+ < %- include (' include_file' , { }); % >
119125```
120126
121127## Documentation
122128
123- * [ API Documentation] ( https://stadt-bielefeld.github.io/mapfile-ejs/docs/api/index.html )
124- * [ Changelog] ( https://github.com/stadt-bielefeld/mapfile-ejs/tree/master/docs/changelog/index.md )
125-
129+ - [ API Documentation] ( https://stadt-bielefeld.github.io/mapfile-ejs/docs/api/index.html )
130+ - [ Changelog] ( https://github.com/stadt-bielefeld/mapfile-ejs/tree/master/docs/changelog/index.md )
131+
126132## Developer
127133
128134** Build API Documentation:**
@@ -147,4 +153,4 @@ node examples\watch\index.js
147153
148154## License
149155
150- [ MIT] ( https://github.com/stadt-bielefeld/mapfile-ejs/blob/master/LICENSE )
156+ [ MIT] ( https://github.com/stadt-bielefeld/mapfile-ejs/blob/master/LICENSE )
0 commit comments