From the course: SharePoint Framework for Developers: 5 SPFx and Angular
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Build and run Angular elements
From the course: SharePoint Framework for Developers: 5 SPFx and Angular
Build and run Angular elements
- [Instructor] So, with the various changes done now, I have a test harness ready. All that's left to be done is create this ship.js file. This is, actually, pretty simple to do. Let's go into package.json one more time, and I'm going to make some minor changes here. So, up here, I'm going to go ahead and add a script to buildForShip. What's going on here? We're basically saying ng build --prod, so the production origin output-hashing=none. So, that'll create the java script versions of this file formula, of this project for me. Then, I go into the folder where those files are created, and I take all those files, I concatenate them, and, inside of the plainHTML folder, I create a file called ship.js. Simple as that. Let's also go ahead and create another command here called plainHTML. This command is, simply, going to invoke lite-server. So, basically, what we intend to do here, is that we want to buildForShip, which means that it'll craft up my entire project, it'll build it. And, it…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.