d-bootstrap
Advanced tools
Comparing version 0.1.1 to 0.1.4
@@ -29,3 +29,3 @@ module.exports = Dropdown; | ||
Dropdown.prototype.label = function(value) { | ||
var options = this.model.get('options') || []; | ||
var options = this.getAttribute('options') || []; | ||
for (var i = 0, len = options.length; i < len; i++) { | ||
@@ -37,3 +37,3 @@ var option = options[i]; | ||
} | ||
return this.model.get('prompt') || 'Select'; | ||
return this.getAttribute('prompt') || 'Select'; | ||
}; | ||
@@ -40,0 +40,0 @@ |
@@ -5,3 +5,5 @@ module.exports = function(app, options) { | ||
app.component(require('./tabs')); | ||
app.loadStyles(__dirname + '/css/bootstrap.min'); | ||
app.component(require('./alert')); | ||
app.component(require('./contextMenu')); | ||
if(!options || (options && options.loadStyles)) app.loadStyles(__dirname + '/node_modules/bootstrap/dist/css/bootstrap.min'); | ||
}; |
{ | ||
"name": "d-bootstrap", | ||
"description": "A Derby component library based on Twitter Bootstrap.", | ||
"version": "0.1.1", | ||
"version": "0.1.4", | ||
"homepage": "http://derbyjs.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/codeparty/d-bootstrap.git" | ||
"url": "git://github.com/derbyjs/d-bootstrap.git" | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"bootstrap": "^3.3.1" | ||
}, | ||
"devDependencies": {}, | ||
"optionalDependencies": {}, | ||
"engines": {} | ||
"engines": {}, | ||
"bugs": { | ||
"url": "https://github.com/derbyjs/d-bootstrap/issues" | ||
}, | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "MIT" | ||
} |
@@ -5,2 +5,29 @@ # Derby Boot | ||
## Installation | ||
``` | ||
npm install d-bootstrap | ||
``` | ||
## Usage | ||
To use the component library in a Derby project pass it to `app.use` as usual. | ||
```javascript | ||
app.use(require('d-bootstrap')); | ||
``` | ||
Twitter Bootstrap is installed via npm dependencies, but one can choose whether or not to have the component load the Bootstrap styles by passing an options object to the component through `app.use`. The object should contain a boolean `loadStyles` which dictates if styles are loaded or not. If no options are provided, the styles are loaded automatically. | ||
```javascript | ||
// Loads styles | ||
app.use(require('d-bootstrap')); | ||
// Loads styles | ||
app.use(require('d-bootstrap'), {loadStyles: true}); | ||
// Does not load styles | ||
app.use(require('d-bootstrap'), {loadStyles: false}); | ||
``` | ||
# Contributors wanted! | ||
@@ -7,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
14
0
2
56
10032
1
134
2
+ Addedbootstrap@^3.3.1
+ Addedbootstrap@3.4.1(transitive)