npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

voog-webpack-plugin

v1.2.0

Published

Develop, build and deploy your Voog application locally with WebPack - https://voog.com

Downloads

12

Readme

npm size

voog-webpack-plugin

This plugin uses Voog API to deploy layouts and assets to Voog.

ℹ️ Usable with webpack@4

Why use WebPack

Voog custom layouts and code editor is a good way to get your designs up and running fast, but once your site grows then the simplicity creates some limitations in how the project is structured, what kind of optimization tools are available and how to continue developing the design.

With WebPack and VoogWebpackPlugin you can overcome some of these limitations. For example you could add

  1. folder management
  2. branch management - develop layouts/components in git branches and deploy all changes with webpack immediately
  3. cache busting to javscript, css, image and font files
  4. SASS/CSS/JS minification with webpack
  5. critical CSS to your layouts for faster loading
  6. babel so you could use ES6 syntax
  7. or write TypeScript

... or implement any webpack plugin.

Getting Started

To begin, you'll need to install voog-webpack-plugin:

$ npm install voog-webpack-plugin --save-dev

Then add the plugin to your webpack config. For example:

webpack.config.js

const VoogWebpackPlugin = require('voog-webpack-plugin');

module.exports = {
  plugins: [
    new VoogWebpackPlugin({
      voogApiHost: 'YOUR_VOOG_API_HOST',
      voogApiToken: 'YOUR_VOOG_API_TOKEN'
    })
  ],
};

And run webpack via your preferred method.

How to use

The best way to get started is look at the example-project in the same github repository.

  1. Name your layouts filename-layout.tpl and components filename-component.tpl. The plugin will know how to separate these from the file name extensions.

ℹ️ All files without -layout.tpl or -component.tpl extension will be ignored.

  1. When you start webpack builder then the plugin will download a list of all the files in your Voog server and keeps it in memory. If you have changed a file in your local editor then the plugin will check if the contents is different then what was downloaded from Voog and upload a new version. This will make sure that only the files that have changed are uploaded.

  2. Everything in your webpack build folder will be uploaded to your Voog server. Including layouts, components, images, stylesheets, javascript files, fonts.

Known Problems

1. I'm experiencing slow build speed with larger projects

This is caused by html-webpack-plugin that handles generation of HTML files. The plugin is generating files synchronously and this makes things slow when you have a lot of template files.

HtmlWebpackPlugin version 4 should fix this issue, but it's still in beta.

2. I'm getting ["invalid syntax","Syntax error (line 100): Tag '{%=\"\" unless=\"\" editmode=\"\" %}' was not properly terminated with regexp: /\\%\\}/"] (or similar) exception`

You have probably used Voog specific tags in HTML element attributes. In some cases Voog markup conflicts with HtmlWebpackPlugin.

This is not allowed: <div {% unless editmode %}class="active"{% endunless%}>Voog is fun</div>. Instead use if/else statement for the full element

  {% if editmode %}
    <div>Voog is fun</div>
  {% else %}
    <div class="active">Voog is fun</div>
  {% endif %}

An alternative would be to assign class to Voog variable and use it inside the element attribute:

{% if editmode %}
  {% assign cssClass = 'active' %}
{% else %}
  {% assign cssClass = 'not-active' %}
{% endif %}

<div class="{{ cssClass }}}">Voog is fun</div>

License

MIT

Authors

Messente - Send SMS messages and PIN codes in over 190 countries