diff --git a/bin/cli-plugins b/bin/cli-plugins index e4b5cae51..942036d29 100755 --- a/bin/cli-plugins +++ b/bin/cli-plugins @@ -274,7 +274,7 @@ async function reconcilePluginDeps({skipLocal, skipRemote, dryRun, upgradeRemote } async function createSeedPlugin() { - const pluginsDir = path.join(dir, 'plugins'); + const pluginsDir = path.join(__dirname, 'plugins'); function pluginNameExists(pluginName) { const pluginNames = fs.readdirSync(pluginsDir); @@ -321,7 +321,7 @@ async function createSeedPlugin() { // Creating plugin seed //============================================================================== - const seedPlugin = path.join(dir, 'scripts/templates/plugin'); + const seedPlugin = path.join(__dirname, 'bin/templates/plugin'); const newPluginPath = path.join(pluginsDir, answers.pluginName); if (fs.existsSync(seedPlugin)) { @@ -363,7 +363,7 @@ async function createSeedPlugin() { // This is a client-side plugin, let's push this. if (answers.client) { j.client.push(answers.pluginName); - + const output = JSON.stringify(j, null, 2); fs.writeFileSync(pluginsJson, output); } @@ -381,8 +381,8 @@ async function createSeedPlugin() { }); } - console.log(`✨ Yay! Plugin created! Find your plugin: ${answers.pluginName} in the /plugins folder`); - } + console.log(`✨ Yay! Plugin created! Find your plugin: ${answers.pluginName} in the ./plugins folder`); + } } diff --git a/scripts/templates/plugin/client/.babelrc b/bin/templates/plugin/client/.babelrc similarity index 100% rename from scripts/templates/plugin/client/.babelrc rename to bin/templates/plugin/client/.babelrc diff --git a/scripts/templates/plugin/client/.eslintrc.json b/bin/templates/plugin/client/.eslintrc.json similarity index 100% rename from scripts/templates/plugin/client/.eslintrc.json rename to bin/templates/plugin/client/.eslintrc.json diff --git a/scripts/templates/plugin/client/components/MyPluginComponent.css b/bin/templates/plugin/client/components/MyPluginComponent.css similarity index 100% rename from scripts/templates/plugin/client/components/MyPluginComponent.css rename to bin/templates/plugin/client/components/MyPluginComponent.css diff --git a/scripts/templates/plugin/client/components/MyPluginComponent.js b/bin/templates/plugin/client/components/MyPluginComponent.js similarity index 100% rename from scripts/templates/plugin/client/components/MyPluginComponent.js rename to bin/templates/plugin/client/components/MyPluginComponent.js diff --git a/scripts/templates/plugin/client/index.js b/bin/templates/plugin/client/index.js similarity index 100% rename from scripts/templates/plugin/client/index.js rename to bin/templates/plugin/client/index.js diff --git a/scripts/templates/plugin/client/translations.yml b/bin/templates/plugin/client/translations.yml similarity index 100% rename from scripts/templates/plugin/client/translations.yml rename to bin/templates/plugin/client/translations.yml diff --git a/scripts/templates/plugin/index.js b/bin/templates/plugin/index.js similarity index 100% rename from scripts/templates/plugin/index.js rename to bin/templates/plugin/index.js