Removing and Restoring Non-Source Files from Your JET Application
The Oracle JET CLI provides commands (clean, strip, and restore) that manage the source code of your JET application by removing extraneous files, such as the build output for the platforms your JET application supports or npm modules installed into your project.
Consider using these commands when you want to package your source code for distribution to colleagues or others who may work on the source code with you. Use of these commands may not be appropriate in all circumstances. Use of the clean and strip commands will, for example, remove the build output for hybrid mobile applications that includes the installation files to install the application on a user’s device.
ojet clean
Use the ojet clean command to clean the build output of your JET application. Specify the appropriate parameter with the ojet clean command to clean the build output on the platform(s) that your JET application supports (android, ios, windows, and web). This command can be useful when developing a hybrid mobile application that makes use of staging files as you can make sure that all staging files are removed between builds. These staging files will be regenerated the next time that you build or serve the hybrid mobile application. Run the following command in your application’s top level directory to clean the output of your application that targets the Android platform:
ojet clean android
Similarly, run ojet clean web to remove the contents of your application’s root directory’s web directory.
ojet strip
Use ojet strip when you want to remove all non-source files from your JET application. In addition to the build output removed by the ojet clean command, ojet strip removes additional dependencies, such as Cordova plugins, and npm modules installed into your project. A typical usage scenario for the ojet strip command is when you want to distribute the source files of your JET application to a colleague and you want to reduce the number of files to transmit to the minimum.
ojet restore
Use the ojet restore command to restore the dependencies, plugins, libraries, and composite components that the ojet strip command removes. After the ojet restore command completes, use the ojet build and/or ojet serve commands to build and serve your JET application.
For additional help with CLI commands, enter ojet help at a terminal prompt.