diff --git a/README.md b/README.md index 2ac183e730..f2ccf8581e 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ To create a new plugin, make sure you're run `yarn` to install dependencies, the $ yarn create-plugin ``` -This will prompt you to enter an ID for your plugin, and then create your plugin inside the `packages/plugins/` directory. The plugin will be automatically included in the app by modifing the app's `package.json` and `src/plugins.ts`. +This will prompt you to enter an ID for your plugin, and then create your plugin inside the `plugins/` directory. The plugin will be automatically included in the app by modifing the app's `package.json` and `src/plugins.ts`. If you have `yarn start` already running you should be able to see the default page for your new plugin at [localhost:3000/my-plugin](http://localhost:3000/my-plugin), if you called the plugin `"my-plugin"`. diff --git a/lerna.json b/lerna.json index 53b216d8c2..4621689664 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "packages": ["packages/*", "packages/plugins/*"], + "packages": ["packages/*", "plugins/*"], "npmClient": "yarn", "useWorkspaces": true, "version": "0.0.0" diff --git a/package.json b/package.json index 71b8d579dd..b8bc51f039 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "workspaces": { "packages": [ "packages/*", - "packages/plugins/*" + "plugins/*" ] }, "resolutions": { diff --git a/packages/cli/src/commands/createPlugin.test.ts b/packages/cli/src/commands/createPlugin.test.ts index bb823218fe..a7d6a6c78a 100644 --- a/packages/cli/src/commands/createPlugin.test.ts +++ b/packages/cli/src/commands/createPlugin.test.ts @@ -92,7 +92,7 @@ describe('createPlugin', () => { const id = 'testPlugin'; const tempDir = path.join(os.tmpdir(), id); const rootDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-')); - const pluginDir = path.join(rootDir, 'packages', 'plugins', id); + const pluginDir = path.join(rootDir, 'plugins', id); try { createTemporaryPluginFolder(tempDir); movePlugin(tempDir, pluginDir, id); diff --git a/packages/cli/src/commands/createPlugin.ts b/packages/cli/src/commands/createPlugin.ts index e32295a52a..81a74ca086 100644 --- a/packages/cli/src/commands/createPlugin.ts +++ b/packages/cli/src/commands/createPlugin.ts @@ -18,7 +18,7 @@ const checkExists = (rootDir: string, id: string) => { console.log(); console.log(chalk.green(' Checking if the plugin already exists:')); - const destination = path.join(rootDir, 'packages', 'plugins', id); + const destination = path.join(rootDir, 'plugins', id); if (fs.existsSync(destination)) { console.log( @@ -326,7 +326,7 @@ const createPlugin = async () => { const cliPackage = resolvePath(__dirname, '..', '..'); const templateFolder = resolvePath(cliPackage, 'templates', 'default-plugin'); const tempDir = path.join(os.tmpdir(), answers.id); - const pluginDir = path.join(rootDir, 'packages', 'plugins', answers.id); + const pluginDir = path.join(rootDir, 'plugins', answers.id); console.log(); console.log(chalk.green('Creating the plugin...')); diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json index 9b376c2b1d..596e2cf729 100644 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ b/packages/cli/templates/default-plugin/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../tsconfig.json", "include": ["src"] } diff --git a/packages/plugins/hello-world/tsconfig.json b/packages/plugins/hello-world/tsconfig.json deleted file mode 100644 index 9b376c2b1d..0000000000 --- a/packages/plugins/hello-world/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "include": ["src"] -} diff --git a/packages/plugins/home-page/tsconfig.json b/packages/plugins/home-page/tsconfig.json deleted file mode 100644 index 9b376c2b1d..0000000000 --- a/packages/plugins/home-page/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "include": ["src"] -} diff --git a/packages/plugins/hello-world/jest.config.js b/plugins/hello-world/jest.config.js similarity index 100% rename from packages/plugins/hello-world/jest.config.js rename to plugins/hello-world/jest.config.js diff --git a/packages/plugins/hello-world/jest.setup.ts b/plugins/hello-world/jest.setup.ts similarity index 100% rename from packages/plugins/hello-world/jest.setup.ts rename to plugins/hello-world/jest.setup.ts diff --git a/packages/plugins/hello-world/package.json b/plugins/hello-world/package.json similarity index 100% rename from packages/plugins/hello-world/package.json rename to plugins/hello-world/package.json diff --git a/packages/plugins/hello-world/src/components/MyComponent/MyComponent.test.tsx b/plugins/hello-world/src/components/MyComponent/MyComponent.test.tsx similarity index 100% rename from packages/plugins/hello-world/src/components/MyComponent/MyComponent.test.tsx rename to plugins/hello-world/src/components/MyComponent/MyComponent.test.tsx diff --git a/packages/plugins/hello-world/src/components/MyComponent/MyComponent.tsx b/plugins/hello-world/src/components/MyComponent/MyComponent.tsx similarity index 100% rename from packages/plugins/hello-world/src/components/MyComponent/MyComponent.tsx rename to plugins/hello-world/src/components/MyComponent/MyComponent.tsx diff --git a/packages/plugins/hello-world/src/components/MyComponent/index.ts b/plugins/hello-world/src/components/MyComponent/index.ts similarity index 100% rename from packages/plugins/hello-world/src/components/MyComponent/index.ts rename to plugins/hello-world/src/components/MyComponent/index.ts diff --git a/packages/plugins/hello-world/src/index.ts b/plugins/hello-world/src/index.ts similarity index 100% rename from packages/plugins/hello-world/src/index.ts rename to plugins/hello-world/src/index.ts diff --git a/packages/plugins/hello-world/src/plugin.test.ts b/plugins/hello-world/src/plugin.test.ts similarity index 100% rename from packages/plugins/hello-world/src/plugin.test.ts rename to plugins/hello-world/src/plugin.test.ts diff --git a/packages/plugins/hello-world/src/plugin.ts b/plugins/hello-world/src/plugin.ts similarity index 100% rename from packages/plugins/hello-world/src/plugin.ts rename to plugins/hello-world/src/plugin.ts diff --git a/packages/plugins/hello-world/src/proto/hello_grpc_web_pb.d.ts b/plugins/hello-world/src/proto/hello_grpc_web_pb.d.ts similarity index 100% rename from packages/plugins/hello-world/src/proto/hello_grpc_web_pb.d.ts rename to plugins/hello-world/src/proto/hello_grpc_web_pb.d.ts diff --git a/packages/plugins/hello-world/src/proto/hello_grpc_web_pb.js b/plugins/hello-world/src/proto/hello_grpc_web_pb.js similarity index 100% rename from packages/plugins/hello-world/src/proto/hello_grpc_web_pb.js rename to plugins/hello-world/src/proto/hello_grpc_web_pb.js diff --git a/packages/plugins/hello-world/src/proto/hello_pb.d.ts b/plugins/hello-world/src/proto/hello_pb.d.ts similarity index 100% rename from packages/plugins/hello-world/src/proto/hello_pb.d.ts rename to plugins/hello-world/src/proto/hello_pb.d.ts diff --git a/packages/plugins/hello-world/src/proto/hello_pb.js b/plugins/hello-world/src/proto/hello_pb.js similarity index 100% rename from packages/plugins/hello-world/src/proto/hello_pb.js rename to plugins/hello-world/src/proto/hello_pb.js diff --git a/plugins/hello-world/tsconfig.json b/plugins/hello-world/tsconfig.json new file mode 100644 index 0000000000..596e2cf729 --- /dev/null +++ b/plugins/hello-world/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src"] +} diff --git a/packages/plugins/home-page/README.md b/plugins/home-page/README.md similarity index 100% rename from packages/plugins/home-page/README.md rename to plugins/home-page/README.md diff --git a/packages/plugins/home-page/jest.config.js b/plugins/home-page/jest.config.js similarity index 100% rename from packages/plugins/home-page/jest.config.js rename to plugins/home-page/jest.config.js diff --git a/packages/plugins/home-page/jest.setup.ts b/plugins/home-page/jest.setup.ts similarity index 100% rename from packages/plugins/home-page/jest.setup.ts rename to plugins/home-page/jest.setup.ts diff --git a/packages/plugins/home-page/package.json b/plugins/home-page/package.json similarity index 100% rename from packages/plugins/home-page/package.json rename to plugins/home-page/package.json diff --git a/packages/plugins/home-page/src/components/HomePage/HomePage.test.tsx b/plugins/home-page/src/components/HomePage/HomePage.test.tsx similarity index 100% rename from packages/plugins/home-page/src/components/HomePage/HomePage.test.tsx rename to plugins/home-page/src/components/HomePage/HomePage.test.tsx diff --git a/packages/plugins/home-page/src/components/HomePage/HomePage.tsx b/plugins/home-page/src/components/HomePage/HomePage.tsx similarity index 100% rename from packages/plugins/home-page/src/components/HomePage/HomePage.tsx rename to plugins/home-page/src/components/HomePage/HomePage.tsx diff --git a/packages/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx b/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx similarity index 100% rename from packages/plugins/home-page/src/components/HomePage/SquadTechHealth.tsx rename to plugins/home-page/src/components/HomePage/SquadTechHealth.tsx diff --git a/packages/plugins/home-page/src/components/HomePage/index.ts b/plugins/home-page/src/components/HomePage/index.ts similarity index 100% rename from packages/plugins/home-page/src/components/HomePage/index.ts rename to plugins/home-page/src/components/HomePage/index.ts diff --git a/packages/plugins/home-page/src/components/HomepageTimer/HomepageTimer.tsx b/plugins/home-page/src/components/HomepageTimer/HomepageTimer.tsx similarity index 100% rename from packages/plugins/home-page/src/components/HomepageTimer/HomepageTimer.tsx rename to plugins/home-page/src/components/HomepageTimer/HomepageTimer.tsx diff --git a/packages/plugins/home-page/src/components/HomepageTimer/index.ts b/plugins/home-page/src/components/HomepageTimer/index.ts similarity index 100% rename from packages/plugins/home-page/src/components/HomepageTimer/index.ts rename to plugins/home-page/src/components/HomepageTimer/index.ts diff --git a/packages/plugins/home-page/src/index.ts b/plugins/home-page/src/index.ts similarity index 100% rename from packages/plugins/home-page/src/index.ts rename to plugins/home-page/src/index.ts diff --git a/packages/plugins/home-page/src/plugin.test.ts b/plugins/home-page/src/plugin.test.ts similarity index 100% rename from packages/plugins/home-page/src/plugin.test.ts rename to plugins/home-page/src/plugin.test.ts diff --git a/packages/plugins/home-page/src/plugin.ts b/plugins/home-page/src/plugin.ts similarity index 100% rename from packages/plugins/home-page/src/plugin.ts rename to plugins/home-page/src/plugin.ts diff --git a/plugins/home-page/tsconfig.json b/plugins/home-page/tsconfig.json new file mode 100644 index 0000000000..596e2cf729 --- /dev/null +++ b/plugins/home-page/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src"] +}