Closed hsendoa closed 6 years ago
imho the minimal gulpfile.js should look like:
require('code-forensics').configure(
{
repository: {
rootPath: "./",
}
}
);
@hsendoa - have you tried that?
@hsendoa please take the time to read the documentation. It explains how to configure and run the program. The minimal configuration suggested in the README can take you a little further but I strongly recommend you read the wiki to properly setup your environment. I would personally advise against the configuration suggested by @gernotstarke, because you would end up adding files and code to the very repository you want to analyse. code-forensics should be executed in a folder that is separate from the repository path you wish to analyse
acutally the gulpfile.js is quoted from the documentation wiki......
I added this gulpfile to the directory containing my Dockerfile and docker-compose.yml.
@gernotstarke the documentation doesn't suggest to place the gulpfile in the same folder as your repo and set the repository path as ./
. That is what I would personally advise against. I don't know how you setup code-forensics in docker but again I would try to keep the repository files under analysis in a separate folder from where I run code-forensics.
thanks @gernotstarke and @smontanari ..
First, the rootPath is the server rootPath(for example: svn://server:port) or the client rootPath (in windows would be D:\SVN).
I use a node for windows in a fresh install, I make the
npm install gulp -g
npm install code-forensics
npm install
(for all dependencies)
after I wrote the gulpfile.js like this:
require('code-forensics').configure(
{
repository: {
rootPath: "C:\\SVN",
}
}
);
but when run the gulp command
gulp
the console return that not found the default task.
when run the gulp command
gulp webserver
the console return that not found the webserver task.
My apologies for my bad question, but I don't have idea about this error.
Unfortunately I can't debug a windows setup. In particular it's strange that you don't see any error or stack trace in the console.
The configure
function generates the gulp tasks dynamically based on the task definition javascript files contained in the code-forensics package. It could be that the way files are found/loaded doesn't work as expected in windows hence no tasks are created, but I'm only speculating. If you know javascript I can give you some hints on how to try and troubleshoot this, otherwise I would suggest you look at #21 and see how @jdevoo has made a dockerized code-forensics solution to run in a windows OS.
@hsendoa, if you have Docker installed: here you find a proposal for a minimized Dockerfile that should work on windows...
thanks!.. It-s work (without docker)
the gulp command not found the subtask
like this
throw
if I try to usage the other command, it's fail