Merge pull request #183 from spotify/patriko/hoist-plugins

packages/plugins: move to plugins/
This commit is contained in:
Patrik Oldsberg
2020-03-06 16:15:18 +01:00
committed by GitHub
36 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -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"`.
+1 -1
View File
@@ -1,5 +1,5 @@
{
"packages": ["packages/*", "packages/plugins/*"],
"packages": ["packages/*", "plugins/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.0.0"
+1 -1
View File
@@ -11,7 +11,7 @@
"workspaces": {
"packages": [
"packages/*",
"packages/plugins/*"
"plugins/*"
]
},
"resolutions": {
@@ -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);
+2 -2
View File
@@ -17,7 +17,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(
@@ -323,7 +323,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...'));
@@ -1,4 +1,4 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["src"]
}
@@ -1,4 +0,0 @@
{
"extends": "../../../tsconfig.json",
"include": ["src"]
}
-4
View File
@@ -1,4 +0,0 @@
{
"extends": "../../../tsconfig.json",
"include": ["src"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src"]
}