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

vue-email-personaliser

v0.9.5

Published

Vue Web Component for formatting email message based on CSV file content. An example of a backend (Laravel package) using this package is at https://github.com/damms005/laravel-personalised-email-sender

Downloads

4

Readme

vue-email-personaliser

Art for vue-email-personaliser

Vue Web Component for formatting email message based on CSV file content). Sample backend (Laravel package): laravel-personalised-email-sender

The general workflow in using this Vue component is:

  • Paste details of your email recipients in CSV format (actually, TSV, for now :)). The first row are parsed as header/placeholders
  • Format the email you wish to send (use {{mustache}} syntax to dynamically inject data from the CSV pasted above. The CSV headers serve as placeholders)
  • Check the rendered sample email message in the Preview box to be sure your formatted mail looks the way you want it
  • Specify your backend endpoint that handles the actual sending of the email messages (see sample implementation here. You can actually simply use laravel-personalised-email-sender) as your backend end-point
  • Specify the index of the column that your endpoint will uniquely use to identify each row
  • Send it!

Usage

As a web browser drop-in Vue component

The /dist folder contains this package's Vue Web Component built with the --inline-vue flag (see more details in the package.json file). This means that you can immediately start using this package as a Vue component by simply importing it into your web page like below:

<script src='dist/vue-email-personaliser.min.js'></script>

This will provide you with a Vue component as <vue-email-personaliser></vue-email-personaliser>. This component accepts a prop named default-post-endpoint, which you use to specify the endpoint that will do the actual sending out of your email (e.g. as implemented in laravel-personalised-email-sender). The formatted email template will be POSTed to this endpoint.

Development

If you are interested in having a dev version of this project (e.g. for customization), cd to the project root and run the following commands:

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Todo

  • Write tests
  • Improve README to have more practical example (screenshot?)

Learning resources

  • https://www.codementor.io/@martinaimar/web-components-with-vue-cli-3-t1bduun66
  • https://cli.vuejs.org/guide/build-targets.html#web-component
  • https://medium.com/mounoydev/vue-component-rich-text-editor-wysiwyg-59b57052d5b3