bespoke-forms
Advanced tools
Comparing version 0.1.0 to 1.0.0-beta
{ | ||
"name": "bespoke-forms", | ||
"version": "0.1.0", | ||
"version": "1.0.0-beta", | ||
"main": "./dist/bespoke-loop.js", | ||
"ignore": [ | ||
"**/.*" | ||
], | ||
"dependencies": { | ||
"bespoke.js": ">=0.3.0" | ||
"bespoke.js": "^1.0.0" | ||
} | ||
} |
# Contributing | ||
## Important notes | ||
Please don't edit files in the `dist` subdirectory as they are generated via [Grunt](http://gruntjs.com/). You'll find source code in the `src` subdirectory! | ||
Please don't edit files in the `dist` subdirectory as they are generated via [gulp](https://github.com/gulpjs/gulp). You'll find source code in the `lib` subdirectory! | ||
@@ -12,9 +12,9 @@ ### Code style | ||
Test that Grunt's CLI is installed by running `grunt --version`. If the command isn't found, run `npm install -g grunt-cli`. For more information about installing Grunt, see the [getting started with Grunt guide](http://gruntjs.com/getting-started). | ||
Test that gulp is installed globally by running `gulp --version` at the command-line. If gulp isn't installed globally, run `npm install -g gulp` to install the latest version. | ||
1. Fork and clone the repo. | ||
1. Run `npm install` to install all build dependencies (including Grunt). | ||
1. Run `grunt` to grunt this project. | ||
1. Run `npm install` to install all dependencies (including gulp). | ||
1. Run `gulp` to build this project. | ||
Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken. | ||
Assuming that you don't see any red, you're ready to go. Just be sure to run `gulp` after making any changes, to ensure that nothing is broken. | ||
@@ -24,6 +24,6 @@ ## Submitting pull requests | ||
1. Create a new branch, please don't work in your `master` branch directly. | ||
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail. | ||
1. Add failing tests for the change you want to make. Run `gulp` to see the tests fail. | ||
1. Fix stuff. | ||
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done. | ||
1. Run `gulp` to see if the tests pass. Repeat steps 2-4 until done. | ||
1. Update the documentation to reflect any changes. | ||
1. Push to your fork and submit a pull request. |
@@ -1,3 +0,5 @@ | ||
bespoke.horizontal.from('article', { | ||
forms: true | ||
}); | ||
bespoke.from('article', [ | ||
bespoke.plugins.keys(), | ||
bespoke.plugins.touch(), | ||
bespoke.plugins.forms() | ||
]); |
/*! | ||
* bespoke-forms v0.1.0 | ||
* https://github.com/markdalgleish/bespoke-forms | ||
* bespoke-forms v1.0.0-beta | ||
* | ||
* Copyright 2013, Mark Dalgleish | ||
* Copyright 2014, Mark Dalgleish | ||
* This content is released under the MIT license | ||
* http://mit-license.org/markdalgleish | ||
*/ | ||
(function(bespoke) { | ||
bespoke.plugins.forms = function(deck) { | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self);var f=o;f=f.bespoke||(f.bespoke={}),f=f.plugins||(f.plugins={}),f.forms=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ | ||
module.exports = function() { | ||
return function(deck) { | ||
deck.slides.forEach(function(slide) { | ||
@@ -20,3 +20,6 @@ slide.addEventListener('keydown', function(e) { | ||
}; | ||
}; | ||
}(bespoke)); | ||
},{}]},{},[1]) | ||
(1) | ||
}); |
@@ -1,2 +0,2 @@ | ||
/*! bespoke-forms v0.1.0 © 2013 Mark Dalgleish, Licensed MIT */ | ||
!function(a){a.plugins.forms=function(a){a.slides.forEach(function(a){a.addEventListener("keydown",function(a){(/INPUT|TEXTAREA|SELECT/.test(a.target.nodeName)||"true"===a.target.contentEditable)&&a.stopPropagation()})})}}(bespoke); | ||
/*! bespoke-forms v1.0.0-beta © 2014 Mark Dalgleish, MIT License */ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self);var t=n;t=t.bespoke||(t.bespoke={}),t=t.plugins||(t.plugins={}),t.forms=e()}}(function(){return function e(n,t,o){function r(i,u){if(!t[i]){if(!n[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(f)return f(i,!0);throw new Error("Cannot find module '"+i+"'")}var p=t[i]={exports:{}};n[i][0].call(p.exports,function(e){var t=n[i][1][e];return r(t?t:e)},p,p.exports,e,n,t,o)}return t[i].exports}for(var f="function"==typeof require&&require,i=0;i<o.length;i++)r(o[i]);return r}({1:[function(e,n){n.exports=function(){return function(e){e.slides.forEach(function(e){e.addEventListener("keydown",function(e){(/INPUT|TEXTAREA|SELECT/.test(e.target.nodeName)||"true"===e.target.contentEditable)&&e.stopPropagation()})})}}},{}]},{},[1])(1)}); |
{ | ||
"name": "bespoke-forms", | ||
"version": "0.1.0", | ||
"version": "1.0.0-beta", | ||
"description": "Form element support for Bespoke.js", | ||
@@ -11,3 +11,3 @@ "homepage": "https://github.com/markdalgleish/bespoke-forms", | ||
}, | ||
"main": "./dist/bespoke-forms.js", | ||
"main": "./lib/bespoke-forms.js", | ||
"repository": { | ||
@@ -18,31 +18,47 @@ "type": "git", | ||
"scripts": { | ||
"test": "grunt" | ||
"test": "gulp", | ||
"coveralls": "gulp coveralls" | ||
}, | ||
"peerDependencies": { | ||
"bespoke": ">=0.3.0" | ||
"bespoke": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"grunt-cli": "~0.1.9", | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-jshint": "~0.6.4", | ||
"grunt-contrib-jasmine": "~0.5.2", | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-uglify": "~0.2.4", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-contrib-watch": "~0.5.3", | ||
"grunt-micro": "~0.1.0", | ||
"simulant": "~0.1.0", | ||
"bespoke": ">=0.3.0" | ||
"bespoke": "^1.0.0", | ||
"bespoke-keys": "^1.0.0", | ||
"bespoke-touch": "^1.0.0", | ||
"browserify": "^4.1.5", | ||
"function-bind": "^0.1.0", | ||
"gulp": "^3.5.1", | ||
"gulp-clean": "^0.2.4", | ||
"gulp-coveralls": "^0.1.0", | ||
"gulp-header": "^1.0.2", | ||
"gulp-jshint": "^1.3.4", | ||
"gulp-karma": "0.0.2", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-uglify": "^0.3.0", | ||
"istanbul": "^0.2.11", | ||
"jshint-stylish": "^0.1.5", | ||
"karma": "^0.10.9", | ||
"karma-browserify": "^0.2.1", | ||
"karma-coverage": "^0.1.5", | ||
"karma-jasmine": "^0.1.5", | ||
"karma-phantomjs-launcher": "^0.1.4", | ||
"lodash": "^2.4.1", | ||
"simulant": "^0.1.0", | ||
"vinyl-buffer": "0.0.0", | ||
"vinyl-map": "^1.0.1", | ||
"vinyl-source-stream": "^0.1.1" | ||
}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
"node": ">=0.10.0" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT" | ||
"type": "MIT", | ||
"url": "http://mit-license.org/markdalgleish" | ||
} | ||
], | ||
"keywords": [ | ||
"bespoke.js-plugin" | ||
"bespoke-plugin" | ||
] | ||
} |
@@ -1,2 +0,2 @@ | ||
[![Build Status](https://secure.travis-ci.org/markdalgleish/bespoke-forms.png?branch=master)](https://travis-ci.org/markdalgleish/bespoke-forms) | ||
[![Build Status](https://secure.travis-ci.org/markdalgleish/bespoke-forms.png?branch=master)](https://travis-ci.org/markdalgleish/bespoke-forms) [![Coverage Status](https://coveralls.io/repos/markdalgleish/bespoke-forms/badge.png)](https://coveralls.io/r/markdalgleish/bespoke-forms) | ||
@@ -18,20 +18,25 @@ # bespoke-forms | ||
First, include both `bespoke.js` and `bespoke-forms.js` in your page. | ||
This plugin is shipped in a [UMD format](https://github.com/umdjs/umd), meaning that it is available as a CommonJS/AMD module or browser global. | ||
Then, simply include the plugin when instantiating your presentation. | ||
For example, when using CommonJS modules: | ||
```js | ||
bespoke.horizontal.from('article', { | ||
forms: true | ||
}); | ||
var bespoke = require('bespoke'), | ||
forms = require('bespoke-forms'); | ||
bespoke.from('article', [ | ||
forms() | ||
]); | ||
``` | ||
## Package managers | ||
When using browser globals: | ||
### Bower | ||
```bash | ||
$ bower install bespoke-forms | ||
```js | ||
bespoke.from('article', [ | ||
bespoke.plugins.forms() | ||
]); | ||
``` | ||
## Package managers | ||
### npm | ||
@@ -43,7 +48,6 @@ | ||
The bespoke-forms npm package is designed for use with [browserify](http://browserify.org/), e.g. | ||
### Bower | ||
```js | ||
require('bespoke'); | ||
require('bespoke-forms'); | ||
```bash | ||
$ bower install bespoke-forms | ||
``` | ||
@@ -50,0 +54,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16708
19
272
60
25
2
4
1