Set up your project

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 1 minute to read
  • 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.

    Before you begin

    Set up your environment.

    Procedure

    1. Create a folder for your project and point your system's command-line tool to the folder.
    2. Create the component project and all the files required to build a component.
      1. From the folder you created, execute this command.
        $ snc ui-component project [--name name --description description --scope scope --offline]

        Pass in values for these arguments.

        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.

        $ snc ui-component project --name @myorg/movie-quotes --description 'A web component that prints movie quotes.'
        $ snc ui-component project --name @myorg/hello-world --scope x_myorg_helloworld --offline
    3. Run the following command to install the npm dependencies.
      npm install

    What to do next

    Develop a component.