diff --git a/Procfile.dev b/Procfile.dev index cf52204b251..5bd11659a90 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,4 @@ web: bundle exec rails server -p ${PORT:="8080"} -b ${HOST:="127.0.0.1"} --env ${RAILS_ENV:="development"} -assets: cd frontend && RAILS_ENV=${RAILS_ENV:="development"} npm run webpack-watch +legacy: cd frontend && RAILS_ENV=${RAILS_ENV:="development"} npm run legacy-webpack-watch +angular: npm run serve worker: bundle exec rake jobs:work diff --git a/frontend/src/app/modules/plugins/linked-plugins.module.ts b/frontend/src/app/modules/plugins/linked-plugins.module.ts index 103c0eee78e..45904515a26 100644 --- a/frontend/src/app/modules/plugins/linked-plugins.module.ts +++ b/frontend/src/app/modules/plugins/linked-plugins.module.ts @@ -30,13 +30,9 @@ // rake openproject:plugins:register_frontend import {NgModule} from "@angular/core"; -import {PluginModule as OpenprojectAvatars} from './linked/openproject-avatars/main'; -import {PluginModule as OpenprojectCosts} from './linked/openproject-costs/main'; @NgModule({ imports: [ - OpenprojectAvatars, - OpenprojectCosts, ], }) export class LinkedPluginsModule { } diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 9b812aeecfd..8dcad35d9da 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -33,7 +33,7 @@ require 'open_project/assets' # Otherwise Sprockets cannot find the files that webpack produces. Rake::Task['assets:precompile'] .clear_prerequisites - .enhance(%w[openproject:plugins:register_frontend assets:compile_environment assets:prepare_op]) + .enhance(%w[ assets:compile_environment assets:prepare_op]) namespace :assets do # In this task, set prerequisites for the assets:precompile task @@ -42,7 +42,7 @@ namespace :assets do end desc 'Prepare locales and angular assets' - task prepare_op: [:angular, :export_locales] + task prepare_op: [:angular, 'openproject:plugins:register_frontend', :export_locales] desc 'Compile assets with webpack' task :angular do diff --git a/lib/tasks/plugin_specs.rake b/lib/tasks/plugin_specs.rake index a1e7dda0527..f1eec38898a 100644 --- a/lib/tasks/plugin_specs.rake +++ b/lib/tasks/plugin_specs.rake @@ -47,12 +47,12 @@ begin namespace :spec do desc 'Run core and plugin specs' - RSpec::Core::RakeTask.new(all: [:environment, 'assets:prepare_op']) do |t| + RSpec::Core::RakeTask.new(all: [:environment]) do |t| t.pattern = [Rails.root.join('spec').to_s] + Plugins::LoadPathHelper.spec_load_paths end desc 'Run plugin specs' - RSpec::Core::RakeTask.new(plugins: [:environment, 'assets:prepare_op']) do |t| + RSpec::Core::RakeTask.new(plugins: [:environment]) do |t| t.pattern = Plugins::LoadPathHelper.spec_load_paths # in case we want to run plugins' specs and there are none diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake index f07791c6aec..29442572699 100644 --- a/lib/tasks/plugins.rake +++ b/lib/tasks/plugins.rake @@ -31,29 +31,6 @@ require 'json' namespace :openproject do namespace :plugins do - namespace :test do - desc 'Runs the plugins unit tests.' - Rake::TestTask.new units: 'db:test:prepare' do |t| - t.libs << 'test' - t.verbose = true - t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"] - end - - desc 'Runs the plugins functional tests.' - Rake::TestTask.new functionals: 'db:test:prepare' do |t| - t.libs << 'test' - t.verbose = true - t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"] - end - - desc 'Runs the plugins integration tests.' - Rake::TestTask.new integration: 'db:test:prepare' do |t| - t.libs << 'test' - t.verbose = true - t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"] - end - end - desc 'Register plugins from the :opf_plugins bundle group to the frontend' task register_frontend: [:environment] do ::OpenProject::Plugins::FrontendLinking.regenerate! diff --git a/package.json b/package.json index 46b652e8554..1a418a61177 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,9 @@ "postinstall": "cd frontend && npm install", "test": "cd frontend && npm test && cd ..", "tslint_typechecks": "cd frontend && npm run tslint_typechecks && cd ..", - "karma": "cd frontend && npm run karma && cd ..", - "webpack": "cd frontend && npm run webpack && cd ..", - "webpack-watch": "cd frontend && npm run webpack-watch", - "webpack-watch-with-test": "cd frontend && npm run webpack-watch-with-test" + "serve": "cd frontend && npm run serve", + "legacy-webpack": "cd frontend && npm run webpack && cd ..", + "legacy-webpack-watch": "cd frontend && npm run legacy-webpack-watch" }, "private": true, "engines": {