3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/generators/webpack_native/dev_generator.rb', line 3
def generate_development_assets
compiling_notice = "Compiling for development..."
puts "\n" + "\e[36m#{compiling_notice}\e[0m" + "\n\n"
Mutex.new.synchronize do
Dir.chdir "#{Rails.root}/app/webpack_native" do
Dir.mkdir('src/images') unless Dir.exist?('src/images')
Dir.mkdir('src/favicons') unless Dir.exist?('src/favicons')
%x{ yarn install }
result = %x{ npm run build:dev }
puts "\n"
puts result
end
end
end
|