Sha256: efa21341934fd7efe93c215589d0a7053b8f714ac401ef233f05fb2e3cc8be47

Contents?: true

Size: 1.12 KB

Versions: 46

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 Rails.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

46 entries across 46 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/install/angular.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/install/angular.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/install/angular.rb
webpacker-5.4.4 lib/install/angular.rb
webpacker-5.4.3 lib/install/angular.rb
webpacker-5.4.2 lib/install/angular.rb
webpacker-5.4.1 lib/install/angular.rb
webpacker-5.4.0 lib/install/angular.rb
webpacker-5.3.0 lib/install/angular.rb
webpacker-5.2.2 lib/install/angular.rb
webpacker-5.2.1 lib/install/angular.rb
webpacker-4.3.0 lib/install/angular.rb
webpacker-5.2.0 lib/install/angular.rb
webpacker-5.1.1 lib/install/angular.rb
webpacker-5.1.0 lib/install/angular.rb
webpacker-5.0.1 lib/install/angular.rb
webpacker-5.0.0 lib/install/angular.rb
webpacker-4.2.2 lib/install/angular.rb
webpacker-4.2.1 lib/install/angular.rb
webpacker-4.2.0 lib/install/angular.rb