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

aurelia-google-recaptcha

v0.0.4

Published

Aurelia Google Recaptcha Plugin

Downloads

23

Readme

aurelia-google-recaptcha

Npm Version HitCount Contributions welcome

TravisCI CircleCI

Donate to this project using Patreon

An integration of Google's reCAPTCHA api for Aurelia Framework.

Plugin is inspired by Jeremy Danyow's post, so please give a lot of credits to him as well, as we do.

Index

Audience

This documentation is designed for people familiar with Aurelia Framework, HTML forms, server-side processing or mobile application development.

We hope you find this documentation easy to follow. For feedback and discussions please use the issues page of this project.

Getting Started

npm i aurelia-google-recaptcha --save

or

yarn add aurelia-google-recaptcha

Usage

In your aurelia main.js add:

aurelia.use.plugin(PLATFORM.moduleName('aurelia-google-recaptcha'));
// or (if you want to configure the plugin from the start)
aurelia.use.plugin(PLATFORM.moduleName('aurelia-google-recaptcha'), config => {
    config.assign({
        siteKey: '', // use this as general sitekey if you use only one type of recaptcha
        siteKeys: {
          v2: '', // use these sitekeys to separte the values between all 3 types of recaptcha
          v2i: '',
          v3: ''
        },
        lang: 'en'  // for V2, we can also set the supported language
                    // see https://developers.google.com/recaptcha/docs/language
    });
});

In your HTML add one of the components as presented in the Overview section.

<recaptcha-* ...></recaptcha-*>

Generic Options

| Option | Type | Default | Description | |---|---|---|---| | auto | Boolean | false | Optional. Trigger an auto-validate loop interval, keeping the recaptcha validated. | | id | String | | Optional. Two Way bindable value, announcing recaptcha component ID. | | sitekey | String | | Optional. Your can also mention the sitekey inline within code. This value will override the one from config. | | value | String | | Optional. Two Way bindable value, announcing recaptcha result outside of the component. |

Overview

As Google will tell, you, to start using reCAPTCHA, you need to sign up for an API key pair for your site. Please read the documentation on reCAPTCHA website to learn how to obtain the API keys.

From the versions presented by reCAPTCHA, we chose to implement, within our Aurelia plugin, the following:

For verifying the user's response please read the reCAPTCHA documentation.

Development

Fork the repo then clone it

$ git clone [email protected]:dragoscirjan/aurelia-google-recaptcha-dev.git && cd aurelia-google-recaptcha

yarn global add gulp-cli (or $ npm install --global gulp-cli): Install Gulp cli tool.

$ yarn (or $ npm i): Install the dependencies;

$ yarn build (or $ npm run build): Build to production;

$ yarn dev: Run the docz to see your changes;

NOTE: Momentarely I do not use the testing environment. I'm using this project to develop. You're all invited to help with the unit tests, if you wish to.

$ yarn test: Run all tests: type checking and unit tests;

$ yarn test:watch: Watch unit tests;

$ yarn tsc: Typescript checking;

$ yarn tsc:watch: Typescript checking with watching;

Issues

For issues, please reffer to this repository's issue page.

License

MIT