Method: WebpackDriver::Configuration::Example#install_using_yarn

Defined in:
lib/webpack_driver/configuration/example.rb

#install_using_yarnObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/webpack_driver/configuration/example.rb', line 25

def install_using_yarn
    yarn.init unless yarn.valid?
    %w(webpack webpack-dev-server).each do |package|
        package = Knitter::Package.new(package, yarn: yarn)
        unless package.installed?
            package.dependency_type = :development
            package.add
        end
    end
end