0

파일을 Sublime Text 3에서 빌드 한 후 이름을 바꿀 수 있습니까? 기본적으로 출력은 입력과 동일합니다. 그래서 filename.scss는 filename.css로 만들어졌습니다. 그러나이 파일이 scss 파일을 기반으로한다는 것을 나타 내기 위해 기본적으로 filename.scss.css를 원하면 어떻게 될까요? 이것이 가능한가?파일을 Sublime Text 3에 작성한 후 이름을 변경하십시오.

답변

0

예. 자세한 내용은 Build Systems Reference을 읽어보십시오. 첫째, 사용할 수있는 몇 가지 변수가 있습니다. $file은 현재 파일의 전체 경로에 대한 참조입니다 (예 : /home/foo/test.php). 도 있습니다 $filepath (/home/foo), $file_name (test.php), $file_extension (php), $file_base_name (test), 및 some others. 중괄호 안의 어디에서나 정규 표현식을 사용할 수도 있습니다 ($file${file}과 같습니다). 예를 들어 ${file/\.php/\.txt/}.php에서 .txt (/home/foo/test.txt)까지 접미사의 이름을 바꿉니다. ${filepath/testing/production}은 디렉토리를 변경합니다. 여기에 인위적인 예를 결합 몇 가지 있습니다 :

"cmd": ["myprocessor", "--infile", "$file", "--outfile", "/mnt/${project_name}/var/www/assets/${file_base_name/test/final}.css"], 
... 

당신의 특별한 경우를 들어,이 작업을해야합니다

"cmd": ["myprocessor", "--infile", "$file", "--outfile", "$filepath/$file_name.css"], 

/path/to/yourfile.scss을 가지고 만약 당신이 원하는 경우 처리 /path/to/yourfile.scss.css을 뱉어해야한다.