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 ispublish
inscripts
section and another is path to@sitecore/ma-core
package. - Execute
npm install
in the root of your project.
- Once you are done with activity implementation, execute
npm run dev
. This will generatecodegen
folder. (This is only required when compiling plugin for first time, after that you can usenpm run build
ornpm run buildandpublish
) - Add
ActivityDefinition
to 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.json
publish 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 dev
command using angular compiler. The bundle is create indist
folder in the root of your app.npm run build
: This will executenpm run dev
andnpm 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 buildandpublish
This will executenpm run build
andnpm run publish
.
MIT