Project

General

Profile

« Previous | Next » 

Revision 381ab91d

Added by Ewoud Kohl van Wijngaarden about 5 years ago

Add package.json skeleton to foreman_plugin template (#3655)

This allows updating using update-requirements:

./update-requirements npm ../project/package.json packages/plugins/project/project.spec

In future iterations the gem bumping script should automatically extract
the package.json and update the NPM dependencies.

View differences:

gem2rpm/foreman_plugin.spec.erb
has_db_migrations = spec.files.any? { |f| f.start_with?('db/migrate/') }
has_db_seeds = spec.files.any? { |f| f.start_with?('db/seeds.d/') }
has_webpack = spec.files.any? { |f| f.start_with?('webpack/') }
has_package_json = spec.files.any? { |f| f == 'package.json' }
precompile_flags = ''
precompile_flags << ' -a' if has_apidoc
......
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
Provides: foreman-plugin-%{plugin_name} = %{version}
# end specfile generated dependencies
<% if has_package_json -%>
# start package.json devDependencies BuildRequires
# end package.json devDependencies BuildRequires
# start package.json dependencies BuildRequires
# end package.json dependencies BuildRequires
<% end -%>
%description
<%= spec.description %>

Also available in: Unified diff