Working example of CSInterface inside a vue-cli build, updated from vue-cli-3-CEP with only prerequisite being NodeJS.
npm install -g @vue/cli(only need to do this once and never again)npm install -g @vue/cli-init(only need to do this once and never again)vue init webpack-simple (name of project here)- Follow the terminal prompts for your template
- It prompts you to
cd (name of project here) npm install- (Might not be needed)
npm run build npm run dev- Ready! Now paste in a CSXS folder (check the readme to see how to enable live reloading and nodejs for
manifest.xml) and .debug file, set up your two index files, make sure you have a PORT inwebpack.config.jslike linked here, and finally add CSInterface toApp.vue(or useimport/requiremethods). Or just copy/paste the files from this repo into yours and hack your way through.
-
You must run the
npm run devcommand prior to opening your app (at least for AI) if you want hot-reloading to work. -
See
./CSXS/for notes onmanifest.xmlfile for nodeJS. -
See
index-dev.htmlandindex.html.index-dev.htmlis pointed to inmanifest.xml, which itself contains the PORT: parameter toindex.htmlfromwebpack.config.jsfile (line #52).index.htmlcan contain any number of external scripts likeCSInterface.js, though this likely isn't good practice.