From a686bc75a7710c7dc1cd9b04c2d1e2d10a3b9e8c Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Mon, 10 Jul 2017 10:30:20 -0600 Subject: [PATCH] Some changes to server side stuff + tempalte location --- bin/cli-plugins | 10 +++++----- {scripts => bin}/templates/plugin/client/.babelrc | 0 .../templates/plugin/client/.eslintrc.json | 0 .../plugin/client/components/MyPluginComponent.css | 0 .../plugin/client/components/MyPluginComponent.js | 0 {scripts => bin}/templates/plugin/client/index.js | 0 .../templates/plugin/client/translations.yml | 0 {scripts => bin}/templates/plugin/index.js | 0 8 files changed, 5 insertions(+), 5 deletions(-) rename {scripts => bin}/templates/plugin/client/.babelrc (100%) rename {scripts => bin}/templates/plugin/client/.eslintrc.json (100%) rename {scripts => bin}/templates/plugin/client/components/MyPluginComponent.css (100%) rename {scripts => bin}/templates/plugin/client/components/MyPluginComponent.js (100%) rename {scripts => bin}/templates/plugin/client/index.js (100%) rename {scripts => bin}/templates/plugin/client/translations.yml (100%) rename {scripts => bin}/templates/plugin/index.js (100%) 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