Sha256: a30cac35afb2995b113fe138388adc6761a3e6a7999b847b7091c0d38944e2f9

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

require "webpacker/configuration"

say "Copying angular example entry file to #{Webpacker.config.source_entry_path}"
copy_file "#{__dir__}/examples/angular/hello_angular.js", "#{Webpacker.config.source_entry_path}/hello_angular.js"

say "Copying hello_angular app to #{Webpacker.config.source_path}"
directory "#{__dir__}/examples/angular/hello_angular", "#{Webpacker.config.source_path}/hello_angular"

say "Installing all angular dependencies"
run "yarn add core-js zone.js rxjs @angular/core @angular/common @angular/compiler @angular/platform-browser @angular/platform-browser-dynamic"

if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR > 1
  say "You need to enable unsafe-eval rule.", :yellow
  say "This can be done in Rails 5.2+ for development environment in the CSP initializer", :yellow
  say "config/initializers/content_security_policy.rb with a snippet like this:", :yellow
  say "if Jets.env.development?", :yellow
  say "  policy.script_src :self, :https, :unsafe_eval", :yellow
  say "else", :yellow
  say "  policy.script_src :self, :https", :yellow
  say "end", :yellow
end

say "Webpacker now supports angular 🎉", :green

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jetpacker-0.7.0 lib/install/angular.rb
jetpacker-0.6.0 lib/install/angular.rb
jetpacker-0.5.0 lib/install/angular.rb
jetpacker-0.4.2 lib/install/angular.rb
jetpacker-0.4.1 lib/install/angular.rb
jetpacker-0.4.0 lib/install/angular.rb
jetpacker-0.3.0 lib/install/angular.rb
jetpacker-0.2.0 lib/install/angular.rb