# sm-vtex-local

> Pacote útil para desenvolvimento de e-commerce vtex

Latest version **1.1.0** (published 2020-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install sm-vtex-local
pnpm add sm-vtex-local
yarn add sm-vtex-local
bun add sm-vtex-local
```

## 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.1.0 |
| Published | 2020-06-22 |
| First published | 2020-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | samuelmanoel |
| Maintainers | samuelmanoel |
| Keywords | vtex, local, frontend |

## Links

- npm: https://www.npmjs.com/package/sm-vtex-local
- Repository: https://github.com/SamuelManoel/sm-vtex-local
- Homepage: https://github.com/SamuelManoel/sm-vtex-local#readme
- Issues: https://github.com/SamuelManoel/sm-vtex-local/issues
- npm.io page: https://npm.io/package/sm-vtex-local

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^3.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.8

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2020-06-22
- 1.0.5 — 2020-06-09
- 1.0.4 — 2020-06-05
- 1.0.3 — 2020-06-05
- 1.0.2 — 2020-06-05
- 1.0.1 — 2020-06-05
- 1.0.0 — 2020-06-05

## README

<h1 align="center">
    <img alt="Vtex-Local" src="https://i.imgur.com/7M4hws6.jpg" />
</h1>
<h4 align="center">
  Local development package on the vtex platform
</h4>
<p align="center">
  <img alt="GitHub top language" src="https://img.shields.io/github/languages/top/samuelmanoel/sm-vtex-local.svg">
    <img alt="GitHub language count" src="https://img.shields.io/github/languages/count/samuelmanoel/sm-vtex-local.svg">
<img alt="Repository size" src="https://img.shields.io/github/repo-size/samuelmanoel/sm-vtex-local.svg">
<a href="https://github.com/samuelmanoel/sm-vtex-local/commits/master">
    <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/samuelmanoel/sm-vtex-local.svg">
  </a>
<a href="https://github.com/samuelmanoel/sm-vtex-local/issues">
    <img alt="Repository issues" src="https://img.shields.io/github/issues/samuelmanoel/sm-vtex-local.svg">
  </a>
  <img alt="GitHub" src="https://img.shields.io/github/license/samuelmanoel/sm-vtex-local.svg">
</p>

<p align="center">
  <a href="#zap-objective">Objective</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
  <a href="#rocket-technologies">Technologies</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
  <a href="#information_source-how-to-use">How To Use</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
  <a href="#memo-license">License</a>
</p>

## :zap: Objective

This package has as objective emulate components of vtex to optimize or develop the local front-end.

Currently the package emulates the following components:

```html
<vtex:template id="sub-template" />
<vtex:contentPlaceHolder id="shelves" />  <!-- Banner, Shelves, Html -->

```

### :x: Common mistakes.

Use the components underneath each other as the following example:
<br>

```html
<vtex:template id="sub-template" /> 
<vtex:template id="sub-template" /> 
```

**DO NOT** use the components together in line:
<br>

```html
<vtex:template id="sub-template" /> <vtex:template id="sub-template" />
```

## :rocket: Technologies

This project was developed with the following technologies:

---

-  [Gulp](https://gulpjs.com/)
-  [Gulp-util](https://www.npmjs.com/package/gulp-util)
-  [Node](https://nodejs.org/en/)
-  [Through2](https://www.npmjs.com/package/through2)
-  [File System](https://nodejs.org/api/fs.html)


## :information_source: How To Use


To use this package you will need the [Gulp](https://gulpjs.com/) and [Node](https://nodejs.org/en/).

Starting from the structure:
```
Raiz da pasta
├---Templates
|   |   home.html
|   |
|   └--sub-templates
|           footer.html
|           header.html
| 
├---Shelves
├---Banner & Html
|---gulpfile.js
```

On your command line:

```bash
# Install gulp-cli global
$ npm install --global gulp-cli

# Install gulp 
$ npm install gulp

# Install sm-vtex-local 
$ npm install sm-vtex-local
```
Create a gulpfile.js with these settings:

```js
const gulp = require('gulp');

const {templates, placeHolder} = require('sm-vtex-local');

gulp.task('components', ()=> {
    gulp.src('./templates/*.html') // template path
        .pipe(templates('./templates/sub-templates/')) // sub-template path
        .pipe(placeHolder('./Shelves/', 5)) // Shelves path & number of items on the shelf
        .pipe(placeHolder('./Banner & Html/')) // Banner & Html path
        .pipe(gulp.dest('dist')); 
})
```

Settings done, now just run:

```bash
$ gulp components
```

## :memo: License

This project is under the MIT license. See the [LICENSE](https://github.com/SamuelManoel/sm-vtex-local/blob/master/LICENCE) for more information.

---

Made with ♥ by Samuel Manoel Gomes

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