javascript - Grunt 'No Express Targets Found' With load-grunt-config -
when grunt module load-grunt-config
express configuration, no "express" targets found.
. clarified grunt load-grunt-config --config-debug
finding correctly. doing wrong?
debug:
one@node ~/github/simple-load-balancer-service/lbs $ grunt load-grunt-config --config-debug { "express": { "prod": { "options": { "port": 9000, "script": "app.js" } } }, "package": { "name": "app", "description": "simple-angular", "version": "0.0.1", "dependencies": { "express": "4.x", "express-multi-proxy-router": "*", "body-parser": "*" }, "devdependencies": { "grunt": "latest", "testem": "latest", "jasmine": "latest", "phantomjs": "latest", "load-grunt-tasks": "latest", "load-grunt-config": "latest", "grunt-bower-install": "latest", "grunt-contrib-watch": "latest", "grunt-contrib-connect": "latest", "grunt-express-server": "latest", "grunt-open": "latest", "grunt-contrib-coffee": "latest", "grunt-contrib-less": "latest", "grunt-injector": "latest", "grunt-testem": "latest", "grunt-bowercopy": "latest", "grunt-reload": "latest" } } }
grunt/express.js"
one@node ~/github/simple-load-balancer-service/lbs $ cat grunt/express.js module.exports = { prod: { options: { port: 9000, script: 'app.js', } } };
gruntfile.js:
module.exports = function(grunt) { require('load-grunt-tasks')(grunt); require('load-grunt-config')(grunt); grunt.initconfig({ //todo: clean file path directives watch: { express: { files: ['app/static/**', 'app/scripts/**', 'app.js'], tasks: ['express:prod'], options: { spawn: false, livereload: true } }, files: ['app/static/**', 'app/scripts/**', 'app.js'], tasks: ['reload'], } }); grunt.registertask('default', 'start server', function() { grunt.task.run('express'); // uncomment grunt.task.run('open') if plan on running on running on // 127.0.0.1 rather interfaces 0.0.0.0 //grunt.task.run('open'); //grunt.task.run('bowerinstall'); //grunt.task.run('coffee'); //grunt.task.run('less'); //grunt.task.run('injector'); grunt.task.run('watch'); }); }
Comments
Post a Comment