골드키위 (KCM, YSH)

Visual Studio Code 설치 및 org 연결 본문

IT/SalesForce - sfdc

Visual Studio Code 설치 및 org 연결

골드 키위 2022. 4. 5. 13:10

1. vs code 설치

https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 

2. extension (Ctrl + Shift + X) => Salesforce Extension Pack 설치

3. Command Palette (Ctrl + Shift + P) => create Salesforce DX Project 

   명령어 : SFDX: Create Project

※ 사용하는 네이밍 케이스

종류 camelCase PascalCase kebab-case
예제 testBrowserForm TestBrowserForm test-browser-form
사용 - Folder
- File Name
  (js, html, css ...)
- Apex Class Name
- Project Name
- markup component
- HTML attribute

 

4. vs code & Trailhead Playground 권한 부여 (연결)

   명령어 : SFDX: Authorize an Org

          =>Production: login.salesforce.com 

          => default alias 입력 (ex : vscodeOrg)

          => 웹페이지 로그인 후 권한 승인

 

※ 로그인 전 사전 작업 (트레일헤드 가입 및 get your login credentials 에서 id, pw 확인)

 

5. lwc & apex class 생성

   명령어 : SFDX: Create Lightning Web Component (lwc 생성 : camelCase)

   명령어 : SFDX: Create Apex Class (Apex 생성 : PascalCase)

 

6. 배포 및 org 실행

   명령어 : SFDX: Deploy Source to Org (Org에 변경내역 반영)

   명령어 : SFDX: Open Default Org (Org 실행)

반응형
Comments