{"id":18383061,"url":"https://github.com/timkelty/gulp-jsmart","last_synced_at":"2025-04-06T23:32:04.731Z","repository":{"id":28908789,"uuid":"32433676","full_name":"timkelty/gulp-jsmart","owner":"timkelty","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-07T22:02:44.000Z","size":125,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T09:04:08.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timkelty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-18T02:40:05.000Z","updated_at":"2018-07-20T17:34:59.000Z","dependencies_parsed_at":"2022-08-03T05:30:14.928Z","dependency_job_id":null,"html_url":"https://github.com/timkelty/gulp-jsmart","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkelty%2Fgulp-jsmart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkelty%2Fgulp-jsmart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkelty%2Fgulp-jsmart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkelty%2Fgulp-jsmart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timkelty","download_url":"https://codeload.github.com/timkelty/gulp-jsmart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569124,"owners_count":20959758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:09:55.626Z","updated_at":"2025-04-06T23:32:03.105Z","avatar_url":"https://github.com/timkelty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-jsmart\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]  [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]\n\n\u003e [jSmart](https://github.com/umakantp/jsmart) plugin for [gulp](https://github.com/wearefractal/gulp), based on [gulp-template](https://github.com/sindresorhus/gulp-template) and [grunt-jsmart](https://github.com/hereandnow/grunt-jsmart)\n\n## Install\n\n```shell\nnpm install --save-dev gulp-jsmart\n```\n\n## Usage\n\n### `gulpfile.js`\n\nThis example shows how one might convert glob of templates, and rename them with [gulp-rename](https://www.npmjs.com/package/gulp-rename)\n\n```js\nvar gulp = require('gulp');\nvar jsmart = require('gulp-jsmart');\nvar rename = require('gulp-rename');\nvar options = {\n  templatePath: 'app/templates/',\n};\n\ngulp.task('default', function () {\n\treturn gulp.src('src/templates/*.tpl')\n\t\t.pipe(jsmart('src/data/', options))\n\t\t.pipe(rename({extname: '.html'}))\n\t\t.pipe(gulp.dest('dist'));\n});\n```\n\n## API\n\n### jsmart(data, options)\n\n#### data\nType: `String`|`Object`\nDefault value: undefined\n\nA value where you can pass your data as\n\n1. Object\n2. File\n3. Directory\n\nIf you pass your data as JSON-File or Directory Containing JSON-Files, the `first Level` in Object-Hierarchy is the Name of the JSON-File (Underscores, Hyphens etc. are converted to camelCase!).\n\nE.g. Your Filename is `book-store.json` with the content\n\n    {\n       \"greeting\": \"Hi, there are some JScript books you may find interesting:\"\n    }\n\nyou must use it in your template like this:\n\n    \u003ch1\u003e{$bookStore.greeting}\u003c/h1\u003e\n\n#### options\nType: `Object`\n\n##### options.templatePath\nType: `String`\nDefault value: undefined\n\nA string value where you can define a Path in your Project where jSmart should load Templates for Inheritance.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n\n[npm-url]: https://npmjs.org/package/gulp-jsmart\n[npm-image]: https://badge.fury.io/js/gulp-jsmart.png\n\n[travis-url]: http://travis-ci.org/timkelty/gulp-jsmart\n[travis-image]: https://secure.travis-ci.org/timkelty/gulp-jsmart.png?branch=master\n\n[coveralls-url]: https://coveralls.io/r/timkelty/gulp-jsmart\n[coveralls-image]: https://coveralls.io/repos/timkelty/gulp-jsmart/badge.png\n\n[depstat-url]: https://david-dm.org/timkelty/gulp-jsmart\n[depstat-image]: https://david-dm.org/timkelty/gulp-jsmart.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkelty%2Fgulp-jsmart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimkelty%2Fgulp-jsmart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkelty%2Fgulp-jsmart/lists"}