Skip to content

Commit

Permalink
Apply license and clean up code (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddself authored Jun 23, 2017
1 parent ec5c0f4 commit e2cd8cc
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 31 deletions.
1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2017 Scripto, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.`
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ Create a form input element wrapped by a label
```

## License
Copyright © 2017 Scripto, LLC. All rights reserved
Copyright © 2017 Scripto, LLC. Licensed under Apache-2.0
4 changes: 2 additions & 2 deletions button-el.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const noop = () => {}
module.exports = button

function button (text, handler, buttonOpts) {
var classes = ['b', 'f5', 'white', 'w-100', 'mt3', 'pt1', 'pb2', 'lh-copy', 'outline-0', 'bn', 'br2']
var style = 'background: #00C9D8;'
var classes = []
var style = ''

handler = typeof handler === 'function' ? handler : noop
buttonOpts = buttonOpts || {}
Expand Down
3 changes: 0 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
machine:
node:
version: 6
dependencies:
pre:
- ./npmauth.sh
test:
override:
- npm run coverage
Expand Down
8 changes: 4 additions & 4 deletions error-el.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const html = require('bel')
const helpers = require('./element-helper')

function errorContainer (opts) {
const classes = helpers.classes(['center', 'w-100', 'tc', 'red', 'f4', 'mt3', 'mb3'], opts)
const classes = helpers.classes([], opts)
const style = helpers.style('', opts)
const el = helpers.opts(html`<div class="${classes.join(' ')}" style="${style}"></div>`, opts)
return el
Expand All @@ -19,9 +19,9 @@ function error (opts) {

return {
render: () => container,
displayError,
removeError,
clear
displayError: displayError,
removeError: removeError,
clear: clear
}

function displayError (key, txt) {
Expand Down
2 changes: 1 addition & 1 deletion input-el.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const noop = () => {}
module.exports = input

function input (type, handler, value, inputOpts) {
var classes = ['w-100', 'outline-0', 'ba', 'b--moon-gray', 'f6', 'pa1', 'br2']
var classes = []
var style = ''

handler = typeof handler === 'function' ? handler : noop
Expand Down
4 changes: 2 additions & 2 deletions label-el.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const html = require('bel')
module.exports = label

function label (label, labelOpts, children) {
var classes = ['db', 'mt3', 'ttu', 'lh-copy']
var style = 'text-indent: 4px;'
var classes = []
var style = ''

if (!Array.isArray(children)) {
children = [children]
Expand Down
9 changes: 0 additions & 9 deletions npmauth.sh

This file was deleted.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@scriptollc/form-elements",
"name": "form-elements",
"version": "2.2.2",
"description": "Form elements for showrunner",
"description": "Form elements for HTML-element based systems",
"main": "form-elements.js",
"scripts": {
"test": "standard && npm run dep && node test/ssr-rendering.js && browserify test/*.spec.js | tape-run",
"coverage": "npm run test && node test-harness.js",
"start": "bankai start standalone.js --no-uglify --debug",
"start": "bankai start standalone.js --debug",
"dep": "dependency-check . && dependency-check . --unused --no-dev -i envify -i yo-yoify -i babelify -i babel-preset-env -i sheetify"
},
"browserify": {
Expand All @@ -17,9 +17,9 @@
"babelify"
]
},
"keywords": [],
"keywords": ["bel", "choo", "forms", "form", "validation"],
"author": "Todd Kennedy <[email protected]>",
"license": "UNLICENSED",
"license": "Apache-2.0",
"dependencies": {
"babel-preset-env": "^1.5.2",
"babelify": "^7.3.0",
Expand All @@ -29,7 +29,6 @@
"yo-yoify": "^3.7.3"
},
"devDependencies": {
"@scriptollc/app-entry": "^1.0.1",
"bankai": "^8.1.1",
"browserify": "^14.3.0",
"browserify-istanbul": "github:toddself/browserify-istanbul#strip-base-path",
Expand Down
6 changes: 4 additions & 2 deletions standalone.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const entry = require('@scriptollc/app-entry')
const choo = require('choo')
const html = require('bel')
const els = require('./')

Expand Down Expand Up @@ -36,4 +36,6 @@ function main (state, emit) {
}
}

entry([], [{route: '/', method: main}], 'body')
const app = choo()
app.route('/', main)
document.body.appendChild(app.start())

0 comments on commit e2cd8cc

Please sign in to comment.