prepare for production deployment
This commit is contained in:
parent
98e5b186f1
commit
f27d91a803
@ -591,7 +591,7 @@ module.exports = function (grunt) {
|
|||||||
|
|
||||||
grunt.registerTask('serve', function (target) {
|
grunt.registerTask('serve', function (target) {
|
||||||
if (target === 'dist') {
|
if (target === 'dist') {
|
||||||
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'open', 'express-keepalive']);
|
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'express-keepalive']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target === 'debug') {
|
if (target === 'debug') {
|
||||||
@ -617,7 +617,6 @@ module.exports = function (grunt) {
|
|||||||
'autoprefixer',
|
'autoprefixer',
|
||||||
'express:dev',
|
'express:dev',
|
||||||
'wait',
|
'wait',
|
||||||
'open',
|
|
||||||
'watch'
|
'watch'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// nav(ng-include='"components/navbar/navbar.html"')
|
// nav(ng-include='"components/navbar/navbar.html"')
|
||||||
|
|
||||||
nav(ng-include='"components/elements/header.html"', onload='title = "wdiff markdown"; ')
|
nav(ng-include='"components/elements/header.html"', onload='title = "dubdiff"; ')
|
||||||
|
|
||||||
.container
|
.container
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// nav(ng-include='"components/navbar/navbar.html"')
|
// nav(ng-include='"components/navbar/navbar.html"')
|
||||||
|
|
||||||
nav(ng-include='"components/elements/header.html"', onload='title = "wdiff markdown"; subtitle ="results"')
|
nav(ng-include='"components/elements/header.html"', onload='title = "dubdiff"; subtitle ="results"')
|
||||||
|
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('markdownFormatWdiffApp')
|
angular.module('markdownFormatWdiffApp')
|
||||||
.controller('NavbarCtrl', function ($scope, $location , /*Auth*/) {
|
.controller('NavbarCtrl', function ($scope, $location) {
|
||||||
$scope.menu = [{
|
$scope.menu = [{
|
||||||
'title': 'Home',
|
'title': 'Home',
|
||||||
'link': '/'
|
'link': '/'
|
||||||
@ -9,16 +9,6 @@ angular.module('markdownFormatWdiffApp')
|
|||||||
|
|
||||||
$scope.isCollapsed = true;
|
$scope.isCollapsed = true;
|
||||||
|
|
||||||
/*
|
|
||||||
$scope.isLoggedIn = Auth.isLoggedIn;
|
|
||||||
$scope.isAdmin = Auth.isAdmin;
|
|
||||||
$scope.getCurrentUser = Auth.getCurrentUser;
|
|
||||||
|
|
||||||
$scope.logout = function() {
|
|
||||||
Auth.logout();
|
|
||||||
$location.path('/login');
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
$scope.isActive = function(route) {
|
$scope.isActive = function(route) {
|
||||||
return route === $location.path();
|
return route === $location.path();
|
||||||
|
@ -35,7 +35,7 @@ module.exports = function(a, b, asMarkdown, callback) {
|
|||||||
if (err)
|
if (err)
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
|
||||||
//write the string to the file
|
//write the string to the file
|
||||||
fs.write(fileb.fd, b);
|
fs.write(fileb.fd, b);
|
||||||
|
|
||||||
//close the file
|
//close the file
|
||||||
@ -45,11 +45,12 @@ module.exports = function(a, b, asMarkdown, callback) {
|
|||||||
|
|
||||||
var cmd = "./bin/wdiff " + filea.path + " " +fileb.path;
|
var cmd = "./bin/wdiff " + filea.path + " " +fileb.path;
|
||||||
exec(cmd, function(err, stdout) {
|
exec(cmd, function(err, stdout) {
|
||||||
|
//console.log(cmd);
|
||||||
|
//console.log(err);
|
||||||
|
//console.log(stdout);
|
||||||
if (err && err.code!=1 && err.code!=0) {
|
if (err && err.code!=1 && err.code!=0) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if no difference was found by wdiff, err.code will be 0
|
//if no difference was found by wdiff, err.code will be 0
|
||||||
var wdiffSame;
|
var wdiffSame;
|
||||||
wdiffSame = (err && err.code == 0) ? true:false;
|
wdiffSame = (err && err.code == 0) ? true:false;
|
||||||
@ -246,4 +247,4 @@ function rewriteWdiffMarkdown(source) {
|
|||||||
});
|
});
|
||||||
return output;
|
return output;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
// MongoDB connection options
|
// MongoDB connection options
|
||||||
mongo: {
|
mongo: {
|
||||||
uri: 'mongodb://localhost/markdownformatwdiff-dev'
|
uri: 'mongodb://mongodb/markdownformatwdiff-dev'
|
||||||
},
|
},
|
||||||
|
|
||||||
seedDB: false
|
seedDB: false
|
||||||
|
@ -18,6 +18,6 @@ module.exports = {
|
|||||||
uri: process.env.MONGOLAB_URI ||
|
uri: process.env.MONGOLAB_URI ||
|
||||||
process.env.MONGOHQ_URL ||
|
process.env.MONGOHQ_URL ||
|
||||||
process.env.OPENSHIFT_MONGODB_DB_URL+process.env.OPENSHIFT_APP_NAME ||
|
process.env.OPENSHIFT_MONGODB_DB_URL+process.env.OPENSHIFT_APP_NAME ||
|
||||||
'mongodb://localhost/markdownformatwdiff'
|
'mongodb://mongodb/markdownformatwdiff'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user