https://github.com/jsreport/jsreport-sample-template
jsreport extension which creates a sample template at the first run
https://github.com/jsreport/jsreport-sample-template
Last synced: 9 months ago
JSON representation
jsreport extension which creates a sample template at the first run
- Host: GitHub
- URL: https://github.com/jsreport/jsreport-sample-template
- Owner: jsreport
- License: lgpl-3.0
- Created: 2015-11-05T15:02:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T16:42:17.000Z (almost 5 years ago)
- Last Synced: 2025-08-27T00:47:05.356Z (10 months ago)
- Language: JavaScript
- Size: 1.13 MB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**⚠️ This repository has been moved to the monorepo [jsreport/jsreport](https://github.com/jsreport/jsreport)**
--
# jsreport-sample-template
[](https://npmjs.com/package/jsreport-sample-template)
[](https://travis-ci.org/jsreport/jsreport-sample-template)
jsreport extension which creates sample templates at the first run
## jsreport-core
If you use `jsreport-core`, you can apply this extension manually and [pass configuration](#configuration) to it directly:
```js
var jsreport = require('jsreport-core')();
jsreport.use(require('jsreport-sample-template')({createSamples: true}));
```
## Configuration
Use `sample-template` key in the standard [jsreport config](https://github.com/jsreport/jsreport/blob/master/config.md) file.
Available options:
```js
"extensions": {
"sample-template": {
/* when true, it will create defined samples*/
"createSamples": true,
/*
by default samples will be created only on the first run of your jsreport installation,
when this option is true it will allow to create the samples in the next run
(useful when you want to install a new version of this extension and want to create the new examples that come with it)
*/
"forceCreation": false
}
}
```