packages/plugins: move to plugins/
This commit is contained in:
@@ -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
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"packages": ["packages/*", "packages/plugins/*"],
|
||||
"packages": ["packages/*", "plugins/*"],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.0.0"
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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...'));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"include": ["src"]
|
||||
}
|
||||
Vendored
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user