我对Gruntjs比较陌生,但我设法让所有东西都自动运行,除了我的localhost.
我如何让Grunt跑python manage.py runserver 0.0.0.0:8000 --insecure?
Tob*_*uch 12
您可以使用grunt-shell https://github.com/sindresorhus/grunt-shell
尝试这样的事情:
grunt.initConfig({
shell: {
pythonServer: {
options: {
stdout: true
},
command: 'python manage.py runserver 0.0.0.0:8000 --insecure'
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', ['shell:pythonServer']);
Run Code Online (Sandbox Code Playgroud)
我希望它有所帮助:)干杯
| 归档时间: |
|
| 查看次数: |
3663 次 |
| 最近记录: |