Before you can deploy an extension or test it on a local server, you must first download files for the currently active theme by running the following command:
Downloads HTML and Sass files for the currently active theme. Do not modify these files. The Sass and HTML files downloaded using this command are for reference only.
Downloads files for any custom extensions that are currently activated.
The developer tools require theme files (HTML and Sass) to compile a local distribution for testing an extension on a local server. The developer tools also use these files to run a test compilation before deploying. When you fetch the active theme, you provide the necessary files in your local extension workspace. Later, when you test locally or deploy your extension, the developer tools can compile the code without error.
If you want to skip this step, you can run the
gulp extension:deploy --skip-compilation command to deploy your extension files without running the compilation. For more Gulp.js commands used with extensions, see Extension Developer Gulp Commands.
gulp extension:fetch command also fetches files for any custom extensions. When you fetch files for an active extension, you download these development files to your local extension workspace. You can now customize these files further development and testing.
When you fetch custom extension files, the developer tools download extension files that are activated for the specified domain. This action overwrites any extension files currently stored in your local workspace. This can result in loss of development files if you are not careful. To ensure that you do not lose any work under development, do not run the
gulp extension:fetch command until you have deployed your extension work to NetSuite.
This command does not download files for published extensions. A published extension is an extension installed into your account as part of a published SuiteApp. You cannot edit published content due to copyright restrictions.
Fetch the active files:
In your local developer environment, open a command line or terminal and access the top-level extension development directory.
Run the following command:
When prompted, enter the following information:
NetSuite Email – Enter the email address associated with your NetSuite account.
NetSuite Password – Enter your account password.
Choose Your Target Account and Role – Select the NetSuite account where SuiteCommerce application is installed. You must specify the correct role with required permissions for connecting to NetSuite.
You must log in using the SCDeployer role to access your NetSuite account. Failure to use this role may result in an error. See Developer Tools Roles and Permissions for instructions on setting up this role.
Choose Your Website – Select your website with the domain you want to access.
Choose Your Domain – Select your domain with the active theme or extensions you want to download.
Extensions to Fetch – If you have any active extensions for the domain selected, you can download the working files of any selected extensions. This is optional. Content downloads to your extension’s Extras folder.
gulp extension:fetch command creates a theme subdirectory in your Workspace/Extras directory. These files are for use by the developer tools only. Do not add, edit, delete, or move any files in this location.
You are now ready to perform either of the following tasks: