This is a seed project for creating UI for Sitecore's Marketing Automation custom activity UI. It has things pre-configurerd, so you can focus on implementation rather than doing complicated setup. Before you start development using this seed app, delete the codegen and dist folder, they are there just to represent how it will look like after you have build your code.
- Node v6.9.1
- NPM v3.10.10
- Open package.json and update the path to your sitecore instance. Replace
<SITECORE_INSTANCE>with your instance name or change the complete path if required. There are 2 places in the file where you need to make this change. First ispublishinscriptssection and another is path to@sitecore/ma-corepackage. - Execute
npm installin the root of your project.
- Once you are done with activity implementation, execute
npm run dev. This will generatecodegenfolder. (This is only required when compiling plugin for first time, after that you can usenpm run buildornpm run buildandpublish) - Add
ActivityDefinitionto the entry point file. In sample project the entry point file issample.plugin.ts. - Execute
npm run buildandpublish. This will build your custom activity plugin and also publish it to your sitecore instance/sitecore/shell/client/Applications/MarketingAutomation/plugins/location (which you have configured inpackage.jsonpublish script).
npm run dev: This script only needs to be executed when compiling your plugin for the first time and you have added ActivityDefinitions in entry point file. After that, this step is take care by other scripts.npm run webpack: It creates a webpack bundle from the code which is compiled bynpm run devcommand using angular compiler. The bundle is create indistfolder in the root of your app.npm run build: This will executenpm run devandnpm run webpack.npm run publish: This will take the webpack bundle and deploy it to your Sitecore instance. The path has to be configured inpackage.json.npm run buildandpublishThis will executenpm run buildandnpm run publish.
MIT