1
여기까지 어떻게 끝났는지 모르겠지만, 언제든지 guard init
을 실행하면 바깥 쪽을 약간 보일 것 같습니다. 한 번씩 coffeescript/sass/livereload를 추가하는 대신 각 그들 중 몇 번이나. 여기 가드 초기화를 실행하면 워처 라인이 복제됩니다.
guard init
를 실행 한 후 명령 행에서 무엇을 얻을 :이되는 내용으로
WARN: Unresolved specs during Gem::Specification.reset:
thor (>= 0.14.6)
lumberjack (>= 1.0.2)
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
11:39:55 - INFO - Writing new Guardfile to /var/www/the-newbies-guide-to-test-driven-development/Guardfile
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:55 - INFO - coffeescript guard added to Guardfile, feel free to edit it
11:39:57 - INFO - compass guard added to Guardfile, feel free to edit it
11:39:57 - INFO - concat guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 2 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - livereload guard added to Guardfile, feel free to edit it
11:39:58 - INFO - There are 3 definitions in your Guardfile for 'livereload', you may want to clean up your Guardfile as this could cause issues.
11:39:58 - INFO - phpunit guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - sass guard added to Guardfile, feel free to edit it
11:39:58 - INFO - uglify guard added to Guardfile, feel free to edit it
내 Guardfile
: 분명히
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'coffeescript', :input => 'app/assets/javascripts'
guard 'compass' do
watch('^src/(.*)\.s[ac]ss')
end
# This will concatenate the javascript files specified in :files to public/js/all.js
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all"
guard :concat, type: "css", files: %w(), input_dir: "public/css", output: "public/css/all"
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" }
end
guard 'phpunit', :cli => '--colors' do
watch(%r{^.+Test\.php$})
end
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'sass', :input => 'sass', :output => 'css'
guard 'uglify', :destination_file => "public/javascripts/application.js" do
watch (%r{app/assets/javascripts/application.js})
end
난 그냥 가서 중복을 제거 할 수 있습니다 라인,하지만 난 왜 처음에 그런 일이 있었는지 궁금 해서요.
가드 프로젝트에 github 문제가 기록되었습니다. https://github.com/guard/guard/issues/471 – OharaSi
감사합니다. 이것은 내 문제를 부분적으로 해결 한 것으로 보이며'gem cleanup ... '명령을 실행하여 많은 오래된 버전을 제거 할 수 있었지만, 어떤 이유로 든'guard- livereload'는'(1.4.0, 1.0.3)'(원래 3 개)를 설치했기 때문에 새로 생성 된'Guardfile'에서 livereload를 위해 두 개의 항목을 얻고 있습니다. 왜 이런 일이 일어날 지 모릅니다. –
하나 이상의 버전이 아직 설치되어 있다고 생각하는 유일한 이유는 프로젝트 중 하나에 이전 버전에 대한 종속성이 있다는 것입니다. 번들러를 사용하고 있다면 항상 모든 종속성을 충족시킵니다. 어쩌면 당신은 특정 버전에 고정되어있는 보석을 가지고 있을까요? 경비원을 돌보는 사람들은 최근에 중복 문제를 해결했지만 공개되면 업데이트 할 가치가 있습니다. – OharaSi