Skip to content

Commit d545b25

Browse files
committed
Setup plugin name and common dev tools
1 parent a8ae7cc commit d545b25

11 files changed

Lines changed: 1079 additions & 1104 deletions

File tree

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/eslint");

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[ruby]": {
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "ruby-syntax-tree.vscode-syntax-tree"
5+
},
6+
}

app/controllers/my_plugin_module/examples_controller.rb renamed to app/controllers/rollmaster/examples_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
module ::MyPluginModule
3+
module ::Rollmaster
44
class ExamplesController < ::ApplicationController
55
requires_plugin PLUGIN_NAME
66

config/locales/client.en.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ en:
33
admin:
44
site_settings:
55
categories:
6-
TODO_plugin_name: "Plugin Name"
6+
rollmaster: "Rollmaster"
77
js:
8-
discourse_plugin_name:
8+
rollmaster:
99
placeholder: placeholder

config/locales/server.en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
en:
2+
site_settings:
3+
rollmaster_enabled: "Enable Rollmaster"

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
MyPluginModule::Engine.routes.draw do
3+
Rollmaster::Engine.routes.draw do
44
get "/examples" => "examples#index"
55
# define routes here
66
end
77

8-
Discourse::Application.routes.draw { mount ::MyPluginModule::Engine, at: "my-plugin" }
8+
Discourse::Application.routes.draw { mount ::Rollmaster::Engine, at: "rollmaster" }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# frozen_string_literal: true
22

3-
module ::MyPluginModule
3+
module ::Rollmaster
44
class Engine < ::Rails::Engine
55
engine_name PLUGIN_NAME
6-
isolate_namespace MyPluginModule
6+
isolate_namespace Rollmaster
77
config.autoload_paths << File.join(config.root, "lib")
88
scheduled_job_dir = "#{config.root}/app/jobs/scheduled"
99
config.to_prepare do

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"private": true,
33
"devDependencies": {
4-
"@discourse/lint-configs": "2.4.0",
5-
"ember-template-lint": "6.1.0",
6-
"eslint": "9.19.0",
7-
"prettier": "2.8.8"
4+
"@discourse/lint-configs": "2.12.0",
5+
"ember-template-lint": "7.0.4",
6+
"eslint": "9.24.0",
7+
"prettier": "3.5.3",
8+
"stylelint": "16.16.0"
89
},
910
"engines": {
1011
"node": ">= 22",

plugin.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# frozen_string_literal: true
22

3-
# name: discourse-plugin-name
3+
# name: rollmaster
44
# about: TODO
55
# meta_topic_id: TODO
66
# version: 0.0.1
7-
# authors: Discourse
7+
# authors: RpNation
88
# url: TODO
9-
# required_version: 2.7.0
9+
# required_version: 3.0.0
1010

11-
enabled_site_setting :plugin_name_enabled
11+
enabled_site_setting :rollmaster_enabled
1212

13-
module ::MyPluginModule
14-
PLUGIN_NAME = "discourse-plugin-name"
13+
module ::Rollmaster
14+
PLUGIN_NAME = "discourse-rollmaster"
1515
end
1616

17-
require_relative "lib/my_plugin_module/engine"
17+
require_relative "lib/rollmaster/engine"
1818

1919
after_initialize do
2020
# Code which should run after Rails has finished booting

0 commit comments

Comments
 (0)