### Install @oracle/ojet-cli Source: https://github.com/oracle/ojet-cli/blob/master/README.md Installs the Oracle JET command line interface globally using npm. On macOS, administrative privileges might be required. ```bash npm install -g @oracle/ojet-cli ``` -------------------------------- ### ojet serve Enhancements and Customization Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details on the shift from `connect` to `express` for `ojet serve`, and the expanded options for custom middleware and server configuration via hook scripts. ```javascript ojet serve // Hook script context properties: 'express', 'server', 'options', 'urlPrefix', 'http', 'liveReloadServer' ``` -------------------------------- ### Oracle JET CLI Commands and Help Source: https://github.com/oracle/ojet-cli/blob/master/README.md Provides an overview of the available commands for the Oracle JET CLI, including their basic functionality and how to access detailed help for specific commands or scopes. ```APIDOC Oracle JET CLI Commands: General Syntax: ojet [] [] [] Available Commands: add ................ Adds platforms, plugins and more to a JET app build .............. Builds a JET app clean .............. Cleans build output from a JET app create ............. Creates a new JET app, custom theme, or component help ............... Displays command line help list ............... Lists platforms, plugins and more within a JET app remove ............. Removes platforms, plugins and more from a JET app restore ............ Restores missing dependencies, plugins and libraries to a JET app serve .............. Serves a JET app to the browser strip .............. Strips all non source files from the JET app Help Usage: ojet help Displays a list of all available commands. ojet help [] Provides detailed help for a specific command and its scope. Examples: ojet help create Shows detailed help for the 'create' command. ojet help add plugin Shows detailed help for adding a plugin using the 'add' command. ``` -------------------------------- ### Oracle JET CLI Command-Line Flags and Options Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Lists various command-line flags and options available for the ojet-cli, used for managing projects, serving applications, and controlling build behaviors. ```APIDOC Command-Line Interface (CLI) Options: - ojet add docgen - Adds the 'enableDocGen' flag to oraclejetconfig.json and sets it to true, enabling API documentation generation. - ojet serve - Serves the application. Supports the '--server-url' option to specify a server URL. - Example: "ojet serve --server-url http://localhost:8080" - --omit-component-version - Flag to omit component versioning. Its behavior is overridden by the 'unversioned' property in oraclejetconfig.json. - --vcomponent - Used when creating a vcomponent. The template type defaults to 'function' if the flag value is not specified. - watch-files flag - Enables or disables the watch file functionality when serving. If set to false, file watching is disabled. - no-livereload flag - Disables live reload functionality. Files will still be watched unless 'watch-files' is set to false or the 'no-watch-files' flag is used. ``` -------------------------------- ### Oracle JET CLI Command-Line Options Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Key command-line flags and options available for Oracle JET CLI commands like 'ojet create' and 'ojet build'. ```APIDOC Oracle JET CLI Commands and Flags: - ojet create: - --ci: Restores dependencies using 'npm ci' instead of the default 'npm install'. - --installer: Configures the installer for the project (corresponds to oraclejetconfig.json installer property). - --use-global-tooling: Shares a global CLI module among applications to save space and time. If not specified, oraclejet-tooling is installed locally. - --template=: Scaffolds applications from specified templates. If the template contains oraclejetconfig.json or package.json, ojet will inject dependencies if missing, rather than replacing them. - ojet create theme: - --basetheme: Specifies the base theme ('redwood' or 'stable'). Required when creating a theme. - ojet build: - --vcomponent: Synonym for 'functional' or 'function' when specifying component types. - webpack option: Facilitates webpack-based release bundling as an alternative to requirejs bundling. - ojet publish pack: - Atomic publishing: In case of validation issues with any components, the publishing request is rejected as a whole, and no artifacts are uploaded to Exchange. - before_serve hook configuration: - configObj['middleware']: If specified, replaces the default middleware exclusively. - configObj['preMiddleware']: Prepends custom middleware to the default middleware. - configObj['postMiddleware']: Appends custom middleware to the default middleware. ``` -------------------------------- ### Oracle JET Build Process and Script Injection Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details on changes to the Oracle JET build process, including the removal of ES5 support, the introduction of script tag injector tokens, and the shift towards Webpack. ```APIDOC Build Process and Script Injection: - ES5 Support Removal: Support for ES5 code (IE11) has been removed. 'main_es5.js' and 'batch_es5.js' are no longer generated. Release builds now directly load bundle.js after bundling and minifying all code. - Script Tag Injector Tokens: Tokens in `src/index.html` automatically replace with required script tags. - Debug builds: Tokens replaced with script tags loading `require.js` and `main.js`. - Release builds: Tokens replaced with script tags loading `require.js` and `bundle.js`. - If not using injector tokens, ensure `src/index.html` includes a script tag for `bundle.js` instead of `main.js` in release builds. Example Token: ```html ``` - Webpack Support: Expanded to both debug and release builds, offering an alternative to requirejs bundling. - Dependency Updates: - node-sass updated to 5.0.0. - ojet-cli requires node 12.21 or later. - Third-party library 'svgo' updated; ensure version 2.7.0+ is installed for 'ojet build' if encountering issues. - Hybrid build/serve capability based on Cordova is deprecated and planned for removal in version 12.0.0. ``` -------------------------------- ### Build and Optimization Error Handling Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Information on build process changes, specifically regarding optimization failures and the return codes of the `ojet build` command. ```cli ojet build ``` -------------------------------- ### Hook Script Context Object Handling Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Guidance on hook script execution, emphasizing the requirement to `resolve()` the context object and advising against removing properties from it. ```javascript // Hook scripts must resolve() the context object. // Avoid removing properties from the context object. ``` -------------------------------- ### Oracle JET CLI Configuration Options (oraclejetconfig.json) Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details configuration properties within the oraclejetconfig.json file that control various aspects of the Oracle JET build and development process, including API documentation generation, dependency management, and component versioning. ```APIDOC oraclejetconfig.json Configuration: - enableDocGen: boolean - Controls API documentation generation. If true, API documentation can be generated. If false, it is disabled. - Example: "enableDocGen": true - jsdocLibraries: object - Facilitates maintenance of packages required for API documentation generation. - Example: "jsdocLibraries": { "packages": ["@babel/core", "@babel/preset-env"] } - unversioned: boolean - Controls whether components in the staging folder are versioned. If true, components are not versioned. If false, they are versioned. - This setting overrides the --omit-component-version flag during the build process. - Defaults to true if not defined. - Example: "unversioned": false - tsconfig: object - Allows users to optionally configure the path to their tsconfig.json file, relative to the app root path. - Example: "tsconfig": { "source": "./tsconfig.app.json" } - webpackLibraries: object - Facilitates maintenance of third-party libraries needed by Webpack. - Example: "webpackLibraries": { "version": "5.76.0" } - typescriptLibraries: object - Facilitates maintenance of third-party libraries needed by TypeScript. - Example: "typescriptLibraries": { "version": "5.7.2" } ``` -------------------------------- ### Configure oj_whenReady for Oracle JET Source: https://github.com/oracle/ojet-cli/blob/master/test/templates/webMigrationTest/src/index.html Configures the global `oj_whenReady` variable to enable a busy state strategy. This strategy implicitly adds a busy state until the application explicitly calls `applicationBootstrapComplete` on the busy state context. ```javascript // The "oj_whenReady" global variable enables a strategy that the busy context whenReady, // will implicitly add a busy state, until the application calls applicationBootstrapComplete // on the busy state context. window["oj_whenReady"] = true; ``` -------------------------------- ### Oracle JET CLI Usage Syntax Source: https://github.com/oracle/ojet-cli/blob/master/README.md The general syntax for invoking commands within the Oracle JET CLI. It follows a pattern of command, optional scope, parameters, and options. ```bash ojet [] [] [] ``` -------------------------------- ### Configure oj_whenReady for Oracle JET Source: https://github.com/oracle/ojet-cli/blob/master/test/templates/webTsApiTest/src/index.html Configures the global `oj_whenReady` variable to enable a busy state strategy. This strategy implicitly adds a busy state until the application explicitly calls `applicationBootstrapComplete` on the busy state context. ```javascript // The "oj_whenReady" global variable enables a strategy that the busy context whenReady, // will implicitly add a busy state, until the application calls applicationBootstrapComplete // on the busy state context. window["oj_whenReady"] = true; ``` -------------------------------- ### Oracle JET CLI Version 10.0.0 PWA and Theming Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Key features introduced in version 10.0.0, including support for Progressive Web Apps (PWAs), default theming changes, and template handling. ```APIDOC Version 10.0.0 Features: - Progressive Web Apps (PWAs): Support has been added for creating progressive web apps. - Theming: 'cssvars' is now the default for theming. - Template Handling for Non-NPM Applications: Applications scaffolded from non-NPM templates (`--template=`, `--template=`, `--template=`) will: - Retain their `oraclejetconfig.json` and `package.json` if present, rather than being replaced by ojet's defaults. - If a template's `package.json` lacks `@oraclejet/oraclejet` and `@oraclejet/oraclejet-tooling` dependencies, ojet will inject the latest versions. - Retain their `tsconfig.json` without renaming to `tsconfig_old.json`. ``` -------------------------------- ### Oracle JET CLI Configuration Properties Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details on optional properties that can be added to the oraclejetconfig.json file to customize build and project settings. ```APIDOC oraclejetconfig.json Properties: - stripList: Optional property to provide a list of files/directories to delete during build processes, offering an alternative to relying on .gitignore. - installer: Optional property to configure installer-related settings for the project. - svgMin.plugin: (Requires svgo 2.7.0+) If using the svgMin section in oraclejetconfig.json, plugins may need updates per svgo 2.7.0 documentation. - basetheme: (Used with 'ojet create theme') Required when creating a theme, allows specifying 'redwood' or 'stable' as the base theme. ``` -------------------------------- ### Custom Hooks for TypeScript Processes Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Introduction of new custom hooks specifically for managing TypeScript compilation steps within the application and component build processes. ```javascript after_app_typescript before_app_typescript after_component_typescript before_component_typescript ``` -------------------------------- ### Component Configuration (component.json) Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Highlights the 'dependencyScope' attribute within the component.json file, which influences how dependencies are managed for components. ```APIDOC component.json Configuration: - dependencyScope: string - Attribute within component.json that specifies the scope for component dependencies. - Example: "dependencyScope": "local" ``` -------------------------------- ### HTML Script Tag for CDN Bundles Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Demonstrates the modification of the script tag type in index.html to 'module' when using CDN bundle configuration with ESM (ECMAScript Module) support. ```APIDOC index.html Script Tag: When 'cdn' and 'bundles-config-esm.js' are selected in path_mapping.json, the injected ``` -------------------------------- ### Oracle JET CLI Version 13.0.0 Enhancements Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Highlights from version 13.0.0, including metadata emission for API documentation, support for non-vdom JavaScript/TypeScript in Webpack applications, and CLI synonym updates. ```APIDOC Version 13.0.0 Features: - API Documentation Metadata: Metadata to support API documentation is now emitted for vcomponents during the build process. - Webpack Applications: New Webpack applications support non-vdom JavaScript and TypeScript source code. - TypeScript Version: Updated default TypeScript version to 4.6.4. - CLI Synonym: Added a synonym for `--vcomponent` to allow 'functional' in addition to 'function'. - Monorepo Development: Enhancements to ease monorepo development. ``` -------------------------------- ### TypeScript Integration and Compilation Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Notes on TypeScript support, including breaking changes for existing TypeScript applications and the deprecation of specific `tsc` flags used with ojet. ```typescript ojet add typescript // Previously: tsc && ojet build -- // Previously: tsc -w && ojet serve -- ``` -------------------------------- ### JET Pack Packaging Changes Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details changes in how JET packs are packaged, affecting the inclusion of member component type definitions and minified files. The CLI automatically rearranges folders upon download for compatibility. ```cli ojet package pack ojet publish pack ojet add pack ``` -------------------------------- ### Oracle JET Web Nav Bar Item Source: https://github.com/oracle/ojet-cli/blob/master/test/templates/webMigrationTest/src/index.html Defines a list item for a navigation bar in an Oracle JET application. It uses Vue.js-like binding syntax to dynamically display an icon and a text label from data details. ```html
  • ``` -------------------------------- ### Oracle JET Web Nav Bar Item Source: https://github.com/oracle/ojet-cli/blob/master/test/templates/webTsApiTest/src/index.html Defines a list item for a navigation bar in an Oracle JET application. It uses Vue.js-like binding syntax to dynamically display an icon and a text label from data details. ```html
  • ``` -------------------------------- ### ojet strip Command Behavior Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Change in behavior for the `ojet strip` command, which will no longer remove `package-lock.json` files. ```cli ojet strip ``` -------------------------------- ### Oracle JET CLI Version 11.1.0 Plugin Name Source: https://github.com/oracle/ojet-cli/blob/master/RELEASENOTES.md Details on the supported name for the ojcss plugin in version 11.1.0. ```APIDOC Version 11.1.0 Feature: - ojcss Plugin Name: 'ojs/ojcss' is now supported as a name for the ojcss plugin. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.