diff --git a/demos/step-library.ts b/demos/step-library.ts new file mode 100644 index 0000000..3a9f596 --- /dev/null +++ b/demos/step-library.ts @@ -0,0 +1,25 @@ +import { runCLI, RunCLIServer } from '@wp-playground/cli'; +import PlaygroundStepLibrary from 'playground-step-library'; + +const compiler = new PlaygroundStepLibrary(); + +let cliServer: RunCLIServer; + +cliServer = await runCLI({ + command: 'server', + wp: 'latest', + login: true, + blueprint: compiler.compile( + { + steps: [ + { + step: 'addPost', + postTitle: 'Welcome to Playground', + postStatus: 'publish', + postType: 'post', + postContent: 'This is a test post created by the blueprint', + }, + ], + } + ), +}); diff --git a/package.json b/package.json index 6fb3227..8522317 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,8 @@ "prettier": "^3.6.2", "tsx": "^4.20.5", "typescript": "^5.9.2" + }, + "dependencies": { + "playground-step-library": "^1.0.1" } }