Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jade-bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade-bootstrap - npm Package Compare versions

Comparing version 1.0.9 to 1.0.11

_bootstrap.pug

7

package.json
{
"name": "jade-bootstrap",
"version": "1.0.9",
"version": "1.0.11",
"description": "Bootstrap framework written completely using mixins in JADE",

@@ -31,6 +31,7 @@ "main": "bootstrap.jade",

"devDependencies": {
"jade": "^1.11.0",
"pug": "^2.0.0-beta11",
"jasmine": "^2.4.1",
"mocha": "^2.3.4"
}
},
"dependencies": {}
}

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -11,4 +11,4 @@ var assert = require("assert");

+accordion-item(type,title,parent,expanded)`;
fs.writeFileSync(path.join(__dirname,"fixtures/accordion","accordion.jade"),accordionTemplate);
var fn = jade.compileFile(path.join(__dirname,"fixtures/accordion","accordion.jade"));
fs.writeFileSync(path.join(__dirname,"fixtures/accordion","accordion.pug"),accordionTemplate);
var fn = pug.compileFile(path.join(__dirname,"fixtures/accordion","accordion.pug"));
var actual = '<div id="accordionmyaccordion" role="tablist" aria-multiselectable="true" class="panel-group"><div class="panel panel-primary"><div role="tab" id="headingMy Accordion Item" class="panel-heading"><h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordionmyaccordion" href="#collapseMyAccordionItem" aria-expanded="true" aria-controls="collapseOne">My Accordion Item</a></h4></div><div id="collapseMyAccordionItem" role="tabpanel" aria-labelledby="headingMy Accordion Item" class="panel-collapse collapse"><div class="panel-body"></div></div></div></div>';

@@ -22,4 +22,4 @@ var locals = { id: "myaccordion",title:"My Accordion Item",type: "primary", parent: "myaccordion",expanded:false};

+accordion-item-primary(title,parent,expanded)`;
fs.writeFileSync(path.join(__dirname, "fixtures/accordion","accordion-item-primary.jade"),accItemPrimary);
fn = jade.compileFile(path.join(__dirname,"fixtures/accordion","accordion-item-primary.jade"));
fs.writeFileSync(path.join(__dirname, "fixtures/accordion","accordion-item-primary.pug"),accItemPrimary);
fn = pug.compileFile(path.join(__dirname,"fixtures/accordion","accordion-item-primary.pug"));
actual = 'div class="panel panel-primary"><div role="tab" id="headingMy Accordion Item" class="panel-heading"><h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordionmyaccordion" href="#collapseMyAccordionItem" aria-expanded="true" aria-controls="collapseOne">My Accordion Item</a></h4></div><div id="collapseMyAccordionItem" role="tabpanel" aria-labelledby="headingMy Accordion Item" class="panel-collapse collapse"><div class="panel-body"></div></div></div>';

@@ -26,0 +26,0 @@ it("should generate a primary accordion item", function() {

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -15,5 +15,5 @@ var path = require("path");

spec: `should render a ${m} ${prefix}`,
fixture: `${prefix}-${m}.jade`,
fixture: `${prefix}-${m}.pug`,
locals: { message: `This is a ${m} ${prefix}` },
actual: `<div role="alert" class="${prefix} ${prefix}-${m}">This is a ${m} ${prefix}</div>`
actual: `<div class="${prefix} ${prefix}-${m}" role="alert">This is a ${m} ${prefix}</div>`
};

@@ -26,3 +26,3 @@ });

it(item.spec,function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/alerts", item.fixture));
var fn = pug.compileFile(path.join(__dirname,"fixtures/alerts", item.fixture));
assert.equal(item.actual,fn(item.locals));

@@ -37,3 +37,3 @@ });

+alert(type,message)`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert.jade"),genericAlert);
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert.pug"),genericAlert);

@@ -44,5 +44,5 @@ alertTypes.map(function(t) {

spec: `should render a ${t} alert`,
fixture: "alert.jade",
fixture: "alert.pug",
locals: { type: `${t}`,message:`This is a ${t} alert`},
actual: `<div role="alert" class="alert alert-${t}">This is a ${t} alert</div>`
actual: `<div class="alert alert-${t}" role="alert">This is a ${t} alert</div>`
};

@@ -55,3 +55,3 @@ }).forEach(runSpecs);

+alert-i(type,message,icon)`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert-i.jade"),genericAlertIcon);
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert-i.pug"),genericAlertIcon);

@@ -62,5 +62,5 @@ alertTypes.map(function(t) {

spec: `should render a ${t} icon alert`,
fixture: "alert-i.jade",
fixture: "alert-i.pug",
locals: { type: `${t}`,message:`This is a ${t} icon alert`, icon:"info"},
actual: `<div role="alert" class="alert alert-${t}"><span aria-hidden="true" class="glyphicon glyphicon-info"></span> &nbsp;This is a ${t} icon alert</div>`
actual: `<div class="alert alert-${t}" role="alert"><span class="glyphicon glyphicon-info" aria-hidden="true"></span> &nbsp;This is a ${t} icon alert</div>`
};

@@ -72,3 +72,3 @@ }).forEach(runSpecs);

+alert-x(type,message)`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert-x.jade"),genericAlertx);
fs.writeFileSync(path.join(__dirname,"fixtures/alerts","alert-x.pug"),genericAlertx);

@@ -79,5 +79,5 @@ alertTypes.map(function(t) {

spec: `should render a ${t} dismissible alert`,
fixture: "alert-x.jade",
fixture: "alert-x.pug",
locals: { type: `${t}`,message:`This is a ${t} dismissible alert`},
actual: `<div role="alert" class="alert alert-dismissible alert-${t}"><button type="button" data-dismiss="alert" aria-label="Close" class="close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible alert</div>`
actual: `<div class="alert alert-dismissible alert-${t}" role="alert"><button class="close" type="button" data-dismiss="alert" aria-label="Close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible alert</div>`
};

@@ -90,3 +90,3 @@ }).forEach(runSpecs);

+alert-${m}(message)`;
var fileName = `alert-${m}.jade`;
var fileName = `alert-${m}.pug`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts",fileName),fixtureTemplate);

@@ -102,3 +102,3 @@ });

+alert-i-${m}(message)`;
var fileName = `alert-i-${m}.jade`;
var fileName = `alert-i-${m}.pug`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts",fileName),fixtureTemplate);

@@ -124,5 +124,5 @@ });

spec: `should render a ${t} icon alert`,
fixture: `alert-i-${t}.jade`,
fixture: `alert-i-${t}.pug`,
locals: { message:`This is a ${t} icon alert`, icon:"info"},
actual: `<div role="alert" class="alert alert-${t}"><span aria-hidden="true" class="glyphicon glyphicon-${icon}"></span> &nbsp;This is a ${t} icon alert</div>`
actual: `<div class="alert alert-${t}" role="alert"><span class="glyphicon glyphicon-${icon}" aria-hidden="true"></span> &nbsp;This is a ${t} icon alert</div>`
};

@@ -136,3 +136,3 @@ }).forEach(runSpecs);

+alert-x-${m}(message)`;
var fileName = `alert-x-${m}.jade`;
var fileName = `alert-x-${m}.pug`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts",fileName),fixtureTemplate);

@@ -145,5 +145,5 @@ });

spec: `should render a ${t} dismissible alert`,
fixture: `alert-x-${t}.jade`,
fixture: `alert-x-${t}.pug`,
locals: { type: `${t}`,message:`This is a ${t} dismissible alert`},
actual: `<div role="alert" class="alert alert-dismissible alert-${t}"><button type="button" data-dismiss="alert" aria-label="Close" class="close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible alert</div>`
actual: `<div class="alert alert-dismissible alert-${t}" role="alert"><button class="close" type="button" data-dismiss="alert" aria-label="Close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible alert</div>`
};

@@ -157,3 +157,3 @@ }).forEach(runSpecs);

+alert-ix-${m}(message,icon)`;
var fileName = `alert-ix-${m}.jade`;
var fileName = `alert-ix-${m}.pug`;
fs.writeFileSync(path.join(__dirname,"fixtures/alerts",fileName),fixtureTemplate);

@@ -165,7 +165,7 @@ });

spec: `should render a ${t} dismissible icon alert`,
fixture: `alert-ix-${t}.jade`,
fixture: `alert-ix-${t}.pug`,
locals: { message:`This is a ${t} dismissible icon alert`,icon:"info-sign"},
actual: `<div role="alert" class="alert alert-dismissible alert-${t}"><span aria-hidden="true" class="glyphicon glyphicon-info-sign"></span><button type="button" data-dismiss="alert" aria-label="Close" class="close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible icon alert</div>`
actual: `<div class="alert alert-dismissible alert-${t}" role="alert"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span><button class="close" type="button" data-dismiss="alert" aria-label="Close"><span aria-hidden="true"> &times;</span></button>This is a ${t} dismissible icon alert</div>`
};
}).forEach(runSpecs);
});

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -8,5 +8,5 @@ var path = require("path");

it("should generate a stylesheet link to bootswatch", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures","bootswatch.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures","bootswatch.pug"));
assert.equal('<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.4/luna/bootstrap.min.css" rel="stylesheet"/>',fn({theme:"luna"}));
});
});
var assert = require('assert');
var jade = require('jade');
var pug = require('pug');
var fs = require('fs');

@@ -11,3 +11,3 @@ var path = require('path');

+${m}(name)`;
var fileName = `${m}.jade`;
var fileName = `${m}.pug`;
fs.writeFileSync(path.join(__dirname,"fixtures/buttons",fileName),fileTemplate);

@@ -22,5 +22,5 @@ });

spec: 'should render a primary button',
fixture: 'btn-primary.jade',
fixture: 'btn-primary.pug',
locals: { name: "Primary Button" },
actual: '<button type="button" class="btn btn-primary">Primary Button</button>'
actual: '<button class="btn btn-primary" type="button">Primary Button</button>'
},

@@ -30,5 +30,5 @@ {

spec: 'should render a info button',
fixture: 'btn-info.jade',
fixture: 'btn-info.pug',
locals: { name: "Info Button" },
actual: '<button type="button" class="btn btn-info">Info Button</button>'
actual: '<button class="btn btn-info" type="button">Info Button</button>'
},

@@ -38,5 +38,5 @@ {

spec: 'should render a warning button',
fixture: 'btn-warning.jade',
fixture: 'btn-warning.pug',
locals: { name: "Warning Button" },
actual: '<button type="button" class="btn btn-warning">Warning Button</button>'
actual: '<button class="btn btn-warning" type="button">Warning Button</button>'
},

@@ -46,5 +46,5 @@ {

spec: 'should render a danger button',
fixture: 'btn-danger.jade',
fixture: 'btn-danger.pug',
locals: { name: "Danger Button" },
actual: '<button type="button" class="btn btn-danger">Danger Button</button>'
actual: '<button class="btn btn-danger" type="button">Danger Button</button>'
},

@@ -54,5 +54,5 @@ {

spec: 'should render a success button',
fixture: 'btn-success.jade',
fixture: 'btn-success.pug',
locals: { name: "Success Button" },
actual: '<button type="button" class="btn btn-success">Success Button</button>'
actual: '<button class="btn btn-success" type="button">Success Button</button>'
},

@@ -62,5 +62,5 @@ {

spec: 'should render a large primary button',
fixture: 'btn-lg-primary.jade',
fixture: 'btn-lg-primary.pug',
locals: { name: "Large Primary Button" },
actual: '<button type="button" class="btn btn-primary btn-lg">Large Primary Button</button>'
actual: '<button class="btn btn-primary btn-lg" type="button">Large Primary Button</button>'
},

@@ -70,5 +70,5 @@ {

spec: 'should render a large info button',
fixture: 'btn-lg-info.jade',
fixture: 'btn-lg-info.pug',
locals: { name: "Large Info Button" },
actual: '<button type="button" class="btn btn-info btn-lg">Large Info Button</button>'
actual: '<button class="btn btn-info btn-lg" type="button">Large Info Button</button>'
},

@@ -78,5 +78,5 @@ {

spec: 'should render a large warning button',
fixture: 'btn-lg-warning.jade',
fixture: 'btn-lg-warning.pug',
locals: { name: "Large Warning Button" },
actual: '<button type="button" class="btn btn-warning btn-lg">Large Warning Button</button>'
actual: '<button class="btn btn-warning btn-lg" type="button">Large Warning Button</button>'
},

@@ -86,5 +86,5 @@ {

spec: 'should render a large danger button',
fixture: 'btn-lg-danger.jade',
fixture: 'btn-lg-danger.pug',
locals: { name: "Large Danger Button" },
actual: '<button type="button" class="btn btn-danger btn-lg">Large Danger Button</button>'
actual: '<button class="btn btn-danger btn-lg" type="button">Large Danger Button</button>'
},

@@ -94,5 +94,5 @@ {

spec: 'should render a large success button',
fixture: 'btn-lg-success.jade',
fixture: 'btn-lg-success.pug',
locals: { name: "Large Success Button" },
actual: '<button type="button" class="btn btn-success btn-lg">Large Success Button</button>'
actual: '<button class="btn btn-success btn-lg" type="button">Large Success Button</button>'
},

@@ -104,3 +104,3 @@ ];

it(item.spec,function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/buttons", item.fixture));
var fn = pug.compileFile(path.join(__dirname,"fixtures/buttons", item.fixture));
assert.equal(item.actual,fn(item.locals));

@@ -107,0 +107,0 @@ });

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -3,0 +3,0 @@ var path = require("path");

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -8,5 +8,5 @@ var path = require("path");

it("should generate a dropdown", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/dropdowns","dropdown.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/dropdowns","dropdown.pug"));
assert.equal(true,true);
});
});

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -7,13 +7,13 @@ var path = require("path");

it("should generate input control", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms","input.jade"));
assert.equal('<div class="form-group"><label for="txtInput">Label</label><input type="text" id="txtInput" placeholder="Placeholder" name="txtInput" class="form-control"/></div>',fn({ type:"text",id: "txtInput",placeholder:"Placeholder",label:"Label",name:"txtInput"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms","input.pug"));
assert.equal('<div class="form-group"><label for="txtInput">Label</label><input class="form-control" type="text" id="txtInput" placeholder="Placeholder" name="txtInput"/></div>',fn({ type:"text",id: "txtInput",placeholder:"Placeholder",label:"Label",name:"txtInput"}));
});
it("should generate simple input control", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms","input-simple.jade"));
assert.equal('<input type="text" id="txtInput" placeholder="Placeholder" class="form-control"/>',fn({type: "text", id: "txtInput",placeholder:"Placeholder"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms","input-simple.pug"));
assert.equal('<input class="form-control" type="text" id="txtInput" placeholder="Placeholder" name="txtInput"/>',fn({type: "text", id: "txtInput",placeholder:"Placeholder", name: "txtInput"}));
});
it("should generate a checkbox",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "checkbox.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "checkbox.pug"));

@@ -24,3 +24,3 @@ assert.equal('<div class="checkbox"><label><input type="checkbox" name="txtCheckbox" id="txtCheckbox"/>Checkbox</label></div>',fn({text: "Checkbox", name: "txtCheckbox",id: "txtCheckbox"}));

it("should generate a checkbox inline style",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "checkbox-inline.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "checkbox-inline.pug"));
assert.equal('<div class="checkbox-inline"><input type="checkbox" name="txtCheckbox" id="txtCheckbox"/>Checkbox</div>',fn({text: "Checkbox", name: "txtCheckbox", id:"txtCheckbox"}));

@@ -30,3 +30,3 @@ });

it("should generate a radio button", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "radio.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "radio.pug"));
assert.equal('<div class="radio"><label><input type="radio" name="txtRadio" id="txtRadio"/>Radio</label></div>',fn({ text: "Radio", name: "txtRadio", id:"txtRadio"}));

@@ -36,3 +36,3 @@ });

it("should generate a radio button inline style", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "radio-inline.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "radio-inline.pug"));
assert.equal('<div class="radio-inline"><input type="radio" name="txtRadio" id="txtRadio"/>Radio</div>',fn({ text:"Radio", name: "txtRadio", id: "txtRadio"}));

@@ -42,8 +42,8 @@ });

it("should generate a submit button",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "submit.jade"));
assert.equal('<div class="form-group"><button type="submit" name="btnSubmit" id="btnSubmit" class="btn btn-default">Submit</button></div>',fn({ text: "Submit", name:"btnSubmit", id:"btnSubmit"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "submit.pug"));
assert.equal('<div class="form-group"><button class="btn btn-default" type="submit" name="btnSubmit" id="btnSubmit">Submit</button></div>',fn({ text: "Submit", name:"btnSubmit", id:"btnSubmit"}));
});
it("should generate a input group", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "input-group.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "input-group.pug"));
assert.equal('<div class="form-group"><div class="input-group"><div class="input-group-addon">Prepend</div><input type="text"/><div class="input-group-addon">Append</div></div></div>',fn({prepend: "Prepend", append: "Append"}));

@@ -53,10 +53,10 @@ });

it("should generate a icon button", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "icon-btn.jade"));
assert.equal('<button type="button" aria-label="search" class="btn btn-default"><span aria-hidden="true" class="glyphicon glyphicon-search"></span></button>',fn({ icon: "search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "icon-btn.pug"));
assert.equal('<button class="btn btn-default" type="button" aria-label="search"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>',fn({ icon: "search"}));
});
it("should generate a badge", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/forms", "badge.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/forms", "badge.pug"));
assert.equal('<span class="badge">Badge</span>',fn({ text: "Badge"}));
});
});

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -7,27 +7,27 @@ var path = require("path");

it("should render a plain icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon.pug"));
assert.equal('<span class="glyphicon glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
it("should render a primary icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon-primary.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon text-primary glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon-primary.pug"));
assert.equal('<span class="glyphicon text-primary glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
it("should render a info icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon-info.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon text-info glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon-info.pug"));
assert.equal('<span class="glyphicon text-info glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
it("should render a warning icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon-warning.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon text-warning glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon-warning.pug"));
assert.equal('<span class="glyphicon text-warning glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
it("should render a danger icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon-danger.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon text-danger glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon-danger.pug"));
assert.equal('<span class="glyphicon text-danger glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
it("should render a success icon",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/icons","icon-success.jade"));
assert.equal('<span aria-hidden="true" class="glyphicon text-success glyphicon-search"></span>',fn({name:"search"}));
var fn = pug.compileFile(path.join(__dirname, "fixtures/icons","icon-success.pug"));
assert.equal('<span class="glyphicon text-success glyphicon-search" aria-hidden="true"></span>',fn({name:"search"}));
});
});

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -8,22 +8,22 @@ var path = require("path");

it("should generate a responsive image",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/images","img-responsive.jade"));
assert.equal('<img src="a.jpg" alt="My Image" class="img-responsive"/>',fn(locals));
var fn = pug.compileFile(path.join(__dirname, "fixtures/images","img-responsive.pug"));
assert.equal('<img class="img-responsive" src="a.jpg" alt="My Image"/>',fn(locals));
});
it("should generate a responsive center image",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/images","img-responsive-center.jade"));
assert.equal('<img src="a.jpg" alt="My Image" class="img-responsive center-block"/>',fn(locals));
var fn = pug.compileFile(path.join(__dirname, "fixtures/images","img-responsive-center.pug"));
assert.equal('<img class="img-responsive center-block" src="a.jpg" alt="My Image"/>',fn(locals));
});
it("should generate a circle image",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/images","img-circle.jade"));
assert.equal('<img src="a.jpg" alt="My Image" class="img-circle"/>',fn(locals));
var fn = pug.compileFile(path.join(__dirname, "fixtures/images","img-circle.pug"));
assert.equal('<img class="img-circle" src="a.jpg" alt="My Image"/>',fn(locals));
});
it("should generate a rounded image",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/images","img-rounded.jade"));
assert.equal('<img src="a.jpg" alt="My Image" class="img-rounded"/>',fn(locals));
var fn = pug.compileFile(path.join(__dirname, "fixtures/images","img-rounded.pug"));
assert.equal('<img class="img-rounded" src="a.jpg" alt="My Image"/>',fn(locals));
});
it("should generate a thumbnail image",function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/images","img-thumbnail.jade"));
assert.equal('<img src="a.jpg" alt="My Image" class="img-thumbnail"/>',fn(locals));
var fn = pug.compileFile(path.join(__dirname, "fixtures/images","img-thumbnail.pug"));
assert.equal('<img class="img-thumbnail" src="a.jpg" alt="My Image"/>',fn(locals));
});
});

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -7,29 +7,29 @@ var path = require("path");

it("should generate a generic label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label.pug"));
assert.equal('<span class="label label-primary">My Label</span>',fn({type: "primary", text:"My Label"}));
});
it("should generate a default label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-default.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-default.pug"));
assert.equal('<span class="label label-default">My Label</span>',fn({ text:"My Label"}));
});
it("should generate a primary label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-primary.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-primary.pug"));
assert.equal('<span class="label label-primary">My Label</span>',fn({text:"My Label"}));
});
it("should generate a info label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-info.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-info.pug"));
assert.equal('<span class="label label-info">My Label</span>',fn({text:"My Label"}));
});
it("should generate a warning label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-warning.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-warning.pug"));
assert.equal('<span class="label label-warning">My Label</span>',fn({text:"My Label"}));
});
it("should generate a danger label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-danger.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-danger.pug"));
assert.equal('<span class="label label-danger">My Label</span>',fn({text:"My Label"}));
});
it("should generate a success label", function() {
var fn = jade.compileFile(path.join(__dirname, "fixtures/labels","label-success.jade"));
var fn = pug.compileFile(path.join(__dirname, "fixtures/labels","label-success.pug"));
assert.equal('<span class="label label-success">My Label</span>',fn({text:"My Label"}));
});
});
var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a list group", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/list-groups","list-group.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/list-groups","list-group.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a modal", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/modal","modal.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/modal","modal.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a navbar", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/navbar","navbar.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/navbar","navbar.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a nav", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/navs","navs.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/navs","navs.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a panel", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/panels","panel.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/panels","panel.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

@@ -1,2 +0,2 @@

var jade = require("jade");
var pug = require("pug");
var assert = require("assert");

@@ -7,26 +7,26 @@ var path = require("path");

it("should generate a generic progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-primary"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60,type: "primary" }));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60,type: "primary" }));
});
it("should generate a primary progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-primary.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-primary"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-primary.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
});
it("should generate a info progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-info.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-info"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-info.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
});
it("should generate a warning progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-warning.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-warning"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-warning.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
});
it("should generate a danger progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-danger.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-danger"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-danger.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60 }));
});
it("should generate a success progress bar",function() {
var fn = jade.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-success.jade"));
assert.equal('<div class="progress"><div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-success"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60}));
var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar-success.pug"));
assert.equal('<div class="progress"><div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div></div>',fn({value: 60}));
});
});
var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a table", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/tables","table.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/tables","table.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a tab", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/tabs","tab.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/tabs","tab.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a toggle", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/toggles","toggle.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/toggles","toggle.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

var assert = require("assert");
var jade = require("jade");
var pug = require("pug");
var fs = require("fs");

@@ -9,3 +9,3 @@ var path = require("path");

it("should generate a tooltip", function(){
var fn = jade.compileFile(path.join(__dirname, "fixtures/tooltips","tooltip.jade"));
// var fn = pug.compileFile(path.join(__dirname, "fixtures/tooltips","tooltip.pug"));
assert.equal(1,1);

@@ -12,0 +12,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc