What are the steps to take after you say "rake install"?

I want to install the plugin, but I'm afraid that it will install a lot of unnecessary things. I would like to see which file rake accepts installation instructions and delete something unnecessary.

I believe this is a rakefile. But I'm not sure what happens when a rake looks at the rakefile - does it execute the entire rake file or only parts of the rake file that are designated as relevant to this installation procedure?

+3
source share
3 answers

A rake file is a collection of tasks when you call rake with an argument (in this case, install) that performs the task. (It is similar to ant if you came from Java)

So no, rake does not execute the whole rakefile when you call "rake + task", but only the selected task. Please note that tasks may have dependencies (for example, the test task may depend on other previous tasks, such as creating some folders and files to run tests).

Finally, it is useful to use the rake user guide as indicated by other users, but I recommend reading the nicer one here → Ruby Rails Rake Tutorial .

+3
source

Rake , , Rakefile . ruby ​​ script , Rake , , .

, :

task :install => :stage do 
    # stuff to do
end

- install, , stage.

install, Rake stage ( ), stage, , , install. , , , , .

Rake :

file 'foo.html' => 'bar.xml' do |t|
    # Build foo.html from bar.xml, however that is done
end

Make, . , bar.xml -, , . , bar.xml , foo.html, Rake . foo.html , , .

, Rake - , , Rake.

+1

- ""?

, , , , , , ? , ...

0

Source: https://habr.com/ru/post/1710295/


All Articles