From b765988f7901730dd8e6d3e5831c10fcad536660 Mon Sep 17 00:00:00 2001 From: Mike DeVita Date: Wed, 27 Dec 2017 04:32:51 -0700 Subject: [PATCH] Support 0.12x SailsJs fixes #225 (#339) * update sails dependency version to 0.12.14 * update bootstrap.js to use Sails.load instead of Sails.lifta * cleanup of bootstrap.js fixed Sails.lower and unused sails variable. --- generators/app/templates/package.json | 2 +- generators/app/templates/test/bootstrap.js | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/generators/app/templates/package.json b/generators/app/templates/package.json index 3d487b9f..68d4d080 100644 --- a/generators/app/templates/package.json +++ b/generators/app/templates/package.json @@ -4,7 +4,7 @@ "main": "app.js", "dependencies": { "rc": "1.1.6", - "sails": "0.11.4" + "sails": "0.12.14" }, "devDependencies": { "esdoc": "0.4.3", diff --git a/generators/app/templates/test/bootstrap.js b/generators/app/templates/test/bootstrap.js index f50b75a2..dd3a49c6 100644 --- a/generators/app/templates/test/bootstrap.js +++ b/generators/app/templates/test/bootstrap.js @@ -3,15 +3,11 @@ const Sails = require('sails'); const config = require('../config/env/test'); -let sails; - before(done => { - Sails.lift(config, (error, server) => { + Sails.load(config, (server, error) => { if (error) return done(error); - - sails = server; done(); }); }); -after(done => sails.lower(done)); +after(done => Sails.lower(done));