Large reorganization; switched from Browserify to Webpack, cleaner gulpfile, preparations for Polymer stack, moved old code aside, etc.
parent
a00294188d
commit
500afa8b18
@ -1,66 +0,0 @@
|
||||
var app, bodyParser, cookieParser, express, favicon, logger, path, routes, users;
|
||||
|
||||
express = require('express');
|
||||
|
||||
path = require('path');
|
||||
|
||||
favicon = require('static-favicon');
|
||||
|
||||
logger = require('morgan');
|
||||
|
||||
cookieParser = require('cookie-parser');
|
||||
|
||||
bodyParser = require('body-parser');
|
||||
|
||||
routes = require('./routes/index');
|
||||
|
||||
users = require('./routes/users');
|
||||
|
||||
app = express();
|
||||
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
|
||||
app.set('view engine', 'jade');
|
||||
|
||||
app.use(favicon());
|
||||
|
||||
app.use(logger('dev'));
|
||||
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.use(bodyParser.urlencoded());
|
||||
|
||||
app.use(cookieParser());
|
||||
|
||||
app.use(express["static"](path.join(__dirname, 'public')));
|
||||
|
||||
app.use('/', routes);
|
||||
|
||||
app.use('/users', users);
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
var err;
|
||||
err = new Error("Not Found");
|
||||
err.status = 404;
|
||||
return next(err);
|
||||
});
|
||||
|
||||
if (app.get("env") === "development") {
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
return res.render("error", {
|
||||
message: err.message,
|
||||
error: err
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
return res.render("error", {
|
||||
message: err.message,
|
||||
error: {}
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = app;
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
var debug = require('debug')('openNG');
|
||||
var app = require('../app');
|
||||
|
||||
app.set('port', process.env.PORT || 3000);
|
||||
|
||||
var server = app.listen(app.get('port'), function() {
|
||||
debug('Express server listening on port ' + server.address().port);
|
||||
});
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env coffee
|
||||
debug = require('debug')('openNG')
|
||||
app = require('../app')
|
||||
|
||||
app.set('port', process.env.PORT ? 3000)
|
||||
|
||||
server = app.listen app.get('port'), ->
|
||||
debug('Express server listening on port ' + server.address().port)
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Attribute", {
|
||||
tableName: "attributes",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("AttributeSource", {
|
||||
tableName: "attribute_sources",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("AttributeType", {
|
||||
tableName: "attribute_types",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Bin", {
|
||||
tableName: "bins",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("BinAuthorization", {
|
||||
tableName: "bin_authorizations",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("BinItem", {
|
||||
tableName: "bin_items",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("BinProjectAssociation", {
|
||||
tableName: "bin_project_associations",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Clearance", {
|
||||
tableName: "clearances",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Node", {
|
||||
tableName: "nodes",
|
||||
idAttribute: "id",
|
||||
relationIdAttribute: "perma_id",
|
||||
type: function() {
|
||||
return this.belongsTo("NodeType", "type_id");
|
||||
},
|
||||
tags: function() {
|
||||
return this.belongsToMany("NodeTag").through("NodeTagAssociation");
|
||||
},
|
||||
attributes: function() {
|
||||
return this.hasMany("Attribute", "node_id");
|
||||
}
|
||||
});
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("NodeTag", {
|
||||
tableName: "node_tags",
|
||||
idAttribute: "id",
|
||||
nodes: function() {
|
||||
var wrappedModel;
|
||||
wrappedModel = Object.create(bookshelf.model("NodeTag"));
|
||||
return wrappedModel.idAttribute = this.belongsToMany("NodeTag").through("NodeTagAssociation");
|
||||
}
|
||||
});
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("NodeTagAssociation", {
|
||||
tableName: "node_tag_associations",
|
||||
idAttribute: "id",
|
||||
node: this.belongsTo("Node", "node_id"),
|
||||
tag: this.belongsTo("NodeTag", "tag_id")
|
||||
});
|
||||
};
|
@ -1,7 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("NodeType", {
|
||||
tableName: "node_types",
|
||||
idAttribute: "id",
|
||||
nodes: this.hasMany("Node", "type_id")
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Project", {
|
||||
tableName: "projects",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("ProjectAuthorization", {
|
||||
tableName: "project_autorizations",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Reference", {
|
||||
tableName: "references",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("Relationship", {
|
||||
tableName: "relationships",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("RelationshipReference", {
|
||||
tableName: "relationship_references",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("RelationshipSource", {
|
||||
tableName: "relationship_sources",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = function(bookshelf) {
|
||||
return bookshelf.model("RelationshipType", {
|
||||
tableName: "relationship_types",
|
||||
idAttribute: "id"
|
||||
});
|
||||
};
|
Before Width: | Height: | Size: 399 KiB After Width: | Height: | Size: 399 KiB |
@ -0,0 +1 @@
|
||||
<div>Hi! Gah!</div>
|
@ -0,0 +1 @@
|
||||
null;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "",
|
||||
"sources": ["style.scss"],
|
||||
"names": [],
|
||||
"mappings": ""
|
||||
}
|
@ -1 +0,0 @@
|
||||
{{ uuid }}
|
@ -1 +0,0 @@
|
||||
<form method="post" action="/nodes/create" class="pure-form"><div class="toolbarWindow hasBottom"><div class="toolbarWindowContents"><div class="formSection"><h1 class="formSectionTitle">Node</h1><div class="formField"><label>Name<i class="fa fa-exclamation-circle required"></i></label><input name="name" type="text"/></div><div class="formField"><label>Notes</label><textarea name="notes"></textarea></div></div><div class="formSection"><h1 class="formSectionTitle">Properties</h1><div auto-duplicate="auto-duplicate" class="formField"><input name="propertyName[]" placeholder="Name"/><input name="propertyValue[]" placeholder="Value"/></div></div></div><div class="toolbarWindowControls bottom"><button type="submit"><i class="fa fa-check"></i>Create</button></div></div></form>
|
@ -1 +0,0 @@
|
||||
<form method="post" action="/nodes/create" class="pure-form"><div class="toolbarWindow hasBottom"><div class="toolbarWindowContents"><div class="formSection"><h1 class="formSectionTitle">Node</h1><div class="formField"><div class="labelWrapper"><label>Name<i class="fa fa-exclamation-circle required"></i></label></div><div class="inputWrapper"><input name="name" type="text"/></div></div><div class="formField"><div class="labelWrapper"><label>Notes</label></div><div class="inputWrapper"><textarea name="notes"></textarea></div></div></div><div class="formSection"><h1 class="formSectionTitle">Properties</h1><div auto-duplicate="auto-duplicate" class="formField unlabeled grouped"><div class="inputWrapper pure-u-1-2"><input name="propertyName[]" placeholder="Name"/></div><div class="inputWrapper pure-u-1-2"><input name="propertyValue[]" placeholder="Value"/></div></div></div></div><div class="toolbarWindowControls bottom"><button type="submit" class="pure-button style-okay"><i class="fa fa-check"></i>Create</button></div></div></form>
|
@ -1 +0,0 @@
|
||||
<div ng-class="{'window-focused': focused}" ng-show="visible" style="width: {{width || 400}}px; height: {{height || 300}}px; left: {{ x || 0 }}px; top: {{ y || 0 }}px;" class="window-wrapper window-styled"><div class="window-title"><span class="window-title-inner">{{ title }}</span><div class="window-close"><a href="#">X</a></div></div><div class="window-outer"><div class="window-inner-wrapper"><div window-view="window-view" ng-transclude="ng-transclude" class="window-inner"></div></div><div ng-show="resizable" class="window-resizer"></div></div></div>
|
@ -1,15 +0,0 @@
|
||||
var router;
|
||||
|
||||
router = require("express-promise-router")();
|
||||
|
||||
router.get("/", function(req, res) {
|
||||
return res.render("layout");
|
||||
});
|
||||
|
||||
router.get("/node/:uuid", function(req, res) {
|
||||
return res.json({
|
||||
"uuid": req.params.uuid
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue