@empreintes/content-provider
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Content Provider

A tiny small script for node.js to load stuff in your code

This project has been designed to get content from text file

Getting Started

This script target nodejs environment

npm install @empreintes/contentprovider
# or
yarn add @empreintes/contentprovider 

Prerequisites

fs module

Usage

basic usage

const {contentProvider} = require('@empreintes/content-provider')

const cp = contentProvider({base_path:'view',file_extension:'html'})
cp('foo.bar.myfile) // return the content
cp('afolder.another.folder.myfile) // return the content etc..

const {contentProvider} = require('@empreintes/content-provider')
contentProvider({ file_extension: "json", base_path: "." })("myfile")

publish

 npm run prepare
 npm publish ./dist [options]

Licence

released under the MIT license.

Versioning

Semantic Versioning for versioning.

Authors

Acknowledgments

  • This is a side project of a side project of a side project (for real)
  • Use in production only if you know what you do.
  • Full synchrone

Readme

Keywords

Package Sidebar

Install

npm i @empreintes/content-provider

Weekly Downloads

2

Version

0.0.7

License

MIT

Unpacked Size

3.02 kB

Total Files

8

Last publish

Collaborators

  • empreintes