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

arf

v0.8.2

Published

Advertisement Rendering Framework (ARF)

Downloads

47

Readme

Build Status

Advertisement Rendering Framework (ARF)

Vuejs + Babel + Webpack + Gulp based framework for rendering ads on your websites.

Features

  • Reactive render advertisement with Vue.js
  • Polyfill with Babel.

Have in mind that you have to build your library before publishing. The files under the build folder are the ones that should be distributed.

Installation

This library is currently available on npm.

$ npm install arf --save

Usage

Sync guide

#####1. Implement the framework, put this line of code on your head tag

<script src="path/to/your/arf.min.js"></script>

#####2. Add a banner container to your document body

<banner id="my-banner"></banner>
<script>
  new Arf.Banner({
    el: '#my-banner',
    propsData: {
      model: {
        id: 'leader-board',
        html: '<p>This is a top banner</p>',
        width: 468,
        height: 90,
      }
    }
  });
</script>

If you have already known Vue.js, you will recognize the above syntax. Arf.Banner is an instance of Vue.component , so Arf.Banner has every features which Vue.component supplies.

Async guide

This is one of the best features of ARF. You can define your ads every where you want then asynchronously implement ARF at the bottom of body tag. Your banners will wait in queue till ARF is defined. When ARF is defined, ARF will fetch through the queue then render all the banner the queue containing.

#####1. Define a banner: ARF handles two queues: window.arfBannersQueue & window.arfZonesQueue. window.arfZonesQueue is for advanced usages with sharing a space for multiple banners. If you just want to put an ads to your site/app, window.arfBannersQueue is all you need.

<banner id="my-banner"></banner>
<script>
  // Init arfBannersQueue if not existed
  window.arfBannersQueue = window.arfBannersQueue || [];

  // Push current banner to arfBannersQueue
  window.arfBannersQueue.push({
    el: '#my-banner',
    propsData: {
      model: {
        id: 'leader-board',
        html: '<p>This is a top banner</p>',
        width: 468,
        height: 90,
      }
    }
  });
</script>

#####2. Put ARF before your </body>

<script src="path/to/your/arf.min.js"></script>

ARF watches the above two queues for changes then render all ads pushed to queues.

Development guide

ARF welcome all contributions from community. Node.js v5 is require as minimum.

  1. Build your library
  • Run npm install to get the project's dependencies
  • Run npm run build to produce your library (outputs are three version of your library: development, production).
  1. Development mode
  • Having all the dependencies installed run npm start or npm run develop. This command will watch the src folder and regenerate all versions of your library so you get the compilation on file change.
  1. Running the tests
  • Run npm run test

Scripts

  • npm run develop - produces all versions of your library and template in watcher mode
  • npm run build - produces all versions of your library and template once
  • npm run test - well ... it runs the tests :)