Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit be9cfcc
Showing
13 changed files
with
273 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
; Unix-style newlines | ||
[*] | ||
end_of_line = LF | ||
indent_style = tab | ||
trim_trailing_whitespace = false | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# Commenting this out is preferred by some people, see | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- | ||
node_modules | ||
|
||
# Users Environment Variables | ||
.lock-wscript | ||
|
||
docs/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"globals": { | ||
"steal": true, | ||
"can": true, | ||
"Zepto": true, | ||
"QUnit": true, | ||
"System": true, | ||
"SimpleDOM": true, | ||
"test": true, | ||
"asyncTest": true, | ||
"expect": true, | ||
"module": true, | ||
"ok": true, | ||
"equal": true, | ||
"notEqual": true, | ||
"deepEqual": true, | ||
"notDeepEqual": true, | ||
"strictEqual": true, | ||
"notStrictEqual": true, | ||
"raises": true, | ||
"start": true, | ||
"stop": true, | ||
"global": true | ||
}, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"freeze": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"noarg": true, | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"maxdepth": 4, | ||
"boss" : true, | ||
"eqnull": true, | ||
"evil": true, | ||
"loopfunc": true, | ||
"smarttabs": true, | ||
"maxerr" : 200, | ||
"jquery": true, | ||
"dojo": true, | ||
"mootools": true, | ||
"yui": true, | ||
"browser": true, | ||
"phantom": true, | ||
"rhino": true, | ||
"node": true, | ||
"esnext": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: node_js | ||
node_js: node | ||
before_install: | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var stealTools = require("steal-tools"); | ||
|
||
stealTools.export({ | ||
system: { | ||
config: __dirname + "/package.json!npm" | ||
}, | ||
outputs: { | ||
"+cjs": {}, | ||
"+amd": {}, | ||
"+global-js": {} | ||
} | ||
}).catch(function(e){ | ||
|
||
setTimeout(function(){ | ||
throw e; | ||
},1); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"sites": { | ||
"docs": { | ||
"dest": "docs", | ||
"parent": "donejs-number-input", | ||
"pageConfig": { | ||
"page": "docs" | ||
}, | ||
"glob": { | ||
"pattern": "src/**/*.{js,md}" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "donejs-number-input", | ||
"version": "0.0.0", | ||
"description": "A number input field for DoneJS using Bootstrap", | ||
"homepage": "http://donejs.com", | ||
"author": { | ||
"name": "Bitovi", | ||
"email": "contact@bitovi.com", | ||
"url": "http://bitovi.com" | ||
}, | ||
"scripts": { | ||
"preversion": "npm test && npm run build", | ||
"version": "git commit -am \"Update dist for release\" && git checkout -b release && git add -f dist/", | ||
"postversion": "git push --tags && git checkout master && git branch -D release && git push", | ||
"testee": "testee src/test/test.html --browsers firefox", | ||
"test": "npm run jshint && npm run testee", | ||
"jshint": "jshint src/. --config", | ||
"release:patch": "npm version patch && npm publish", | ||
"release:minor": "npm version minor && npm publish", | ||
"release:major": "npm version major && npm publish", | ||
"build": "node build.js", | ||
"document": "documentjs" | ||
}, | ||
"main": "src/donejs-number-input", | ||
"files": [ | ||
"src" | ||
], | ||
"keywords": [ | ||
"canjs", | ||
"donejs" | ||
], | ||
"system": { | ||
"directories": { | ||
"lib": "src" | ||
}, | ||
"npmIgnore": [ | ||
"documentjs", | ||
"testee" | ||
], | ||
"npmAlgorithm": "flat" | ||
}, | ||
"dependencies": { | ||
"can": "^2.3.0", | ||
"jquery": "2.1.4" | ||
}, | ||
"devDependencies": { | ||
"documentjs": "^0.4.1", | ||
"jshint": "^2.9.1", | ||
"steal": "^0.14.0-pre.8", | ||
"steal-qunit": "^0.1.1", | ||
"steal-tools": "^0.14.0-pre.1", | ||
"testee": "^0.2.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# donejs-number-input | ||
|
||
[![Build Status](https://travis-ci.org/donejs/donejs-number-input.png?branch=master)](https://travis-ci.org/donejs/donejs-number-input) | ||
|
||
A number input field for DoneJS using Bootstrap | ||
|
||
## Usage | ||
|
||
### ES6 use | ||
|
||
With StealJS, you can import this module directly in a template that is autorendered: | ||
|
||
```js | ||
import plugin from 'donejs-number-input'; | ||
``` | ||
|
||
### CommonJS use | ||
|
||
Use `require` to load `donejs-number-input` and everything else | ||
needed to create a template that uses `donejs-number-input`: | ||
|
||
```js | ||
var plugin = require("donejs-number-input"); | ||
``` | ||
|
||
## AMD use | ||
|
||
Configure the `can` and `jquery` paths and the `donejs-number-input` package: | ||
|
||
```html | ||
<script src="require.js"></script> | ||
<script> | ||
require.config({ | ||
paths: { | ||
"jquery": "node_modules/jquery/dist/jquery", | ||
"can": "node_modules/canjs/dist/amd/can" | ||
}, | ||
packages: [{ | ||
name: 'donejs-number-input', | ||
location: 'node_modules/donejs-number-input/dist/amd', | ||
main: 'lib/donejs-number-input' | ||
}] | ||
}); | ||
require(["main-amd"], function(){}); | ||
</script> | ||
``` | ||
|
||
### Standalone use | ||
|
||
Load the `global` version of the plugin: | ||
|
||
```html | ||
<script src='./node_modules/donejs-number-input/dist/global/donejs-number-input.js'></script> | ||
``` | ||
|
||
## Contributing | ||
|
||
### Making a Build | ||
|
||
To make a build of the distributables into `dist/` in the cloned repository run | ||
|
||
``` | ||
npm install | ||
node build | ||
``` | ||
|
||
### Running the tests | ||
|
||
Tests can run in the browser by opening a webserver and visiting the `test.html` page. | ||
Automated tests that run the tests from the command line in Firefox can be run with | ||
|
||
``` | ||
npm test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function() { | ||
return `This is the donejs-number-input plugin`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@page donejs-number-input | ||
|
||
# donejs-number-input | ||
|
||
A number input field for DoneJS using Bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<title>donejs-number-input</title> | ||
<script src="../../node_modules/steal/steal.js" main="donejs-number-input/test/"></script> | ||
<div id="qunit-fixture"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import QUnit from 'steal-qunit'; | ||
import plugin from '../donejs-number-input'; | ||
|
||
QUnit.module('donejs-number-input'); | ||
|
||
QUnit.test('Initialized the plugin', function(){ | ||
QUnit.equal(typeof plugin, 'function'); | ||
QUnit.equal(plugin(), 'This is the donejs-number-input plugin'); | ||
}); |