Create the component project and the set of files required to develop a component.
You can connect to your instance and create an application scope for your component, or you
can reserve a scope to verify later.
-
If you are developing components in online mode, log into your instance.
Otherwise, you can log in before deploying the component to your instance.
-
Open your system's command line tool and execute this command.
now-cli login
Pass in values for these parameters.
Name |
Description |
host |
Target ServiceNow instance. Only supports HTTPS
protocol. |
method |
Authentication method to use. Default: basic. |
username |
User name to log in to the ServiceNow instance. |
password |
User password to log in to the ServiceNow instance. |
now-cli login --host http://myinstance.service-now.com --method basic --username username --password password
-
Create a folder for your project and point your system's command line tool to
the folder.
-
Create the component project and all the files required to build a
component.
-
From the folder you created, execute this command.
now-cli project
Pass in values for these parameters.
Name |
Description |
name |
Required. The project name. Must be a valid and unique npm package
name. |
description |
The project description to be available in the npm registry and the plugins
list in your instance. |
scope |
Suggested application scope to assign to this project and its components. If
provided, the instance validates the name. Use the namespace identifier guidelines for application
development on the instance. For more information, see Application scope. Maximum: 18 characters. Case: snake case. Default: x_customerprefix_componentname , where:
customerprefix is the value in the
glide.appcreator.company.code system property on your instance.
componentname is the value provided in the component's
name parameter when you created the project.
Alternatively, you can add a value to the scopeName
parameter in the now-ui.json file. For more information, see Change a component's application scope. |
offline |
When true, creates and scaffolds a component while disconnected from your
instance. Skips validation of the given scope name. Default:
false |
now-cli project --name @myorg/movie-quotes --description 'A web component that prints movie quotes.'
now-cli project --name @myorg/hello-world --scope x_myorg_helloworld --offline
-
Run the following command to install the npm dependencies.