Set up your project
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
Procedure
- 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.
$ 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:customerprefixis the value in the glide.appcreator.company.code system property on your instance.componentnameis the value provided in the component'snameparameter when you created the project.
Alternatively, you can add a value to the
scopeNameparameter 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
-
From the folder you created, execute this command.
-
Run the following command to install the npm dependencies.
npm install