【发布时间】:2015-05-27 15:12:20
【问题描述】:
我正在将应用程序从 php 移植到 node(sailsjs),同时尝试用 grunt 替换 ant。我喜欢当前的项目构建结构,我想保留其中的一些。
如下图...
project root
├── build (git ignored)
│ ├── coverage
│ ├── dist(to be deployed to target env)
│ └── local(to be deployed to local env)
├── lib
│ └── some library files like selenium..etc.
├── src
│ ├── conf
│ │ └── target/local properties
│ ├── scripts(may not be needed with grunt??)
│ │ ├── db
│ │ │ └── create_scripts...
│ │ ├── se
│ │ │ └── run_selenium_scripts...
│ │ └── tests
│ │ └── run_unit_test_scripts...
│ ├── tests
│ │ └── test_code....
│ └── webapp(this is where I'd like to place node[sailsjs] code)
│ └── code....
└── wiki .etc...
它不必与上面完全相同,但或多或少我更喜欢构建类似的东西。现在,我见过的几乎所有sailsjs 示例都如下所示。
project root
├── .tmp
│ └── stuff...
├── package.json
├── tasks
│ ├── config
│ │ └── grunt task configs...
│ └── register
│ └── grunt task registrations...
├── tests
│ ├── unit
│ └── selenium
└── Gruntfile.js
我应该在哪里放置 Gruntfile.js、app.js、package.json 来实现我想要的?我还需要什么其他细节来制作 grunt 功能并根据需要创建工件?
注意: 显然我并不期望获得 grunt 配置的所有细节。但我想了解最重要的事情在哪里以及如何配置基本任务会有所帮助。
感谢您的回答。
【问题讨论】:
标签: gruntjs