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

widget-loader

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

widget-loader - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

.jshintrc

11

lib/loader.js

@@ -13,6 +13,5 @@ "use strict";

module.exports = function (opts) {
module.exports = function (App, opts) {
var App = opts.App;
var widgetDir = opts.widgetDir;
var widgetDir = opts.widgetDirectory;

@@ -34,3 +33,3 @@

// Check for an actual class, otherwise just use whatever was returned
// Check for an actual class, catch just use whatever was returned
if (_.isFunction(AppClass)) {

@@ -171,3 +170,3 @@ app = new AppClass();

})
.otherwise(function (error) {
.catch(function (error) {
console.error(error);

@@ -188,3 +187,3 @@ next(error);

})
.otherwise(function (error) {
.catch(function (error) {
console.error(error);

@@ -191,0 +190,0 @@ next(error);

{
"name": "widget-loader",
"version": "0.1.2",
"version": "0.2.0",
"description": "Widget loader for WidGet CMS",

@@ -5,0 +5,0 @@ "main": "index.js",

# WidGet Loader
> Widget loader/middleware for WidGet CMS.
> Widget loader/middleware for WidGet CMS.

@@ -18,10 +18,9 @@

var express = require('express');
var app = express();
var widgetDir = path.join(__dirname, './widgets');
var App = express();
var widgetDirectory = path.join(__dirname, './widgets');
app.use(widgetLoader({
App: app,
widgetDir: widgetDir
app.use(widgetLoader(App, {
widgetDirectory: widgetDirectory
}))

@@ -43,2 +42,2 @@

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@@ -27,5 +27,4 @@

expressApp.use(widgetLoader({
App: App,
widgetDir: widgetDir
expressApp.use(widgetLoader(App, {
widgetDirectory: widgetDir
}));

@@ -36,8 +35,8 @@

});
server = expressApp.listen(3004, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);

@@ -57,2 +56,2 @@

});
});
});
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