내 Grunt 작업 중 하나가 실행되기 전에 파일을 이동해야합니다. 작업 완료 후 파일을 다시 넣으십시오.gruntjs : 방해가되는 파일 이동 방법
GruntJS로 어떻게 할 수 있습니까?
# move node-webkit out of the way
mv app/node-webkit ./tmp
# run grunt task
# move node-webkit back
mv ./tmp/node-webkit ./app/
내 Grunt 작업 중 하나가 실행되기 전에 파일을 이동해야합니다. 작업 완료 후 파일을 다시 넣으십시오.gruntjs : 방해가되는 파일 이동 방법
GruntJS로 어떻게 할 수 있습니까?
# move node-webkit out of the way
mv app/node-webkit ./tmp
# run grunt task
# move node-webkit back
mv ./tmp/node-webkit ./app/
그래가, grunt-shell를 보라 :
기본적으로 내가이 명령을 실행하려면. init 구성에서 :
shell: {
move: {
command: 'mv app/node-webkit ./tmp'
},
moveback: {
command: 'mv ./tmp/node-webkit ./app/'
}
}
그런 다음 실행하려는 다른 작업 전에 move 명령을 실행하는 함수를 등록한 다음 moveback 작업을 실행하십시오.
module.exports = function(grunt) {
'use strict';
grunt.registerTask('mytask', [
'shell:move',
'othertaskshere',
'shell:moveback'
]);
};
파일을 해당 작업에서 제외하는 것이 좋습니다. 어쩌면 (Gruntfile 코드로) 정확히 무엇을 성취하려고 하는지를 확장 할 수 있습니까? – steveax
updated w/command – chovy