# electron-view

> Electron View Pass Webpage Like Laravel

Latest version **1.0.2** (published 2019-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install electron-view
pnpm add electron-view
yarn add electron-view
bun add electron-view
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-02-05 |
| First published | 2019-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | "Reza Ghasemzadeh |
| Maintainers | rezaghz |
| Keywords | electron, view |

## Links

- npm: https://www.npmjs.com/package/electron-view
- Repository: https://github.com/rezaghz/electron-view
- Homepage: https://github.com/rezaghz/electron-view#readme
- Issues: https://github.com/rezaghz/electron-view/issues
- npm.io page: https://npm.io/package/electron-view

## Dependencies (2)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [app-root-path](https://npm.io/package/app-root-path.md) ^2.1.0

## Recent versions

- 1.0.2 (latest) — 2019-02-05
- 1.0.1 — 2019-02-04
- 1.0.0 — 2019-02-04

## README

# Electron View

NPM package For Pass View Electron Web Page Easier and Faster Like Laravel Framework.


## Installation


install by NPM 

```bash
$ npm install electron-view --save
```

install by Yarn 

```bash
$ yarn add electron-view
```

## How To Use ? 


Example For Es6

```javascript
/**
* View Function Information Parameters
* @param {string} address - The address of Web page 
* @param {string} {folderName = views} - The Name of Folder For View Folder Default = 
* @param {string} {ext = .html } - The extension of Web page
*/
import view from 'electron-view';
import {BrowserWindow} from 'electron';
let mainWin = new BrowserWindow({});
mainWin.loadURL(view("panel.dashboard.index"));
```

Example For Es5 or below

```javascript
/**
* View Function Information Parameters
* @param {string} address - The address of Web page 
* @param {string} {folderName = views} - The Name of Folder For View Folder Default = 
* @param {string} {ext = .html } - The extension of Web page
*/
const view = require('electron-view');
const {BrowserWindow} = require('electron');
let mainWin = new BrowserWindow({});
mainWin.loadURL(view("panel.dashboard.index"));
```

Output String

```javascript
view("admin.dashboard.index");
// file://E://myProject/views/admin/dashboard/index.html
view("admin.dashboard.index","resources");
// file://E://myProject/resources/admin/dashboard/index.html
view("admin.dashboard.index","resources");
// file://E://myProject/resources/admin/dashboard/index.html
view("admin.dashboard.index","resources",".xml");
// file://E://myProject/resources/admin/dashboard/index.xml
```

---
_Source: https://npm.io/package/electron-view · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
