
grunt 설치에서 처음 grunt까지 명령을 한 번에 완료하는 터미널 쉘 스크립트
2022-10-04 last update
7 minutes reading Terminal grunt ShellScriptgrunt 편리하네요!
하지만 일일이 설치하는 것이 귀찮습니다! 시간의 낭비가 아니라 귀찮아요!
그러면 grunt 설치부터 처음 grunt 실행까지 한 번에 끝낼 수 있는 쉘 스크립트입니다. 오, 매번 말하면서 Mac 환경입니다. Windows는 모르겠습니다!
하고 싶은 일
grunt 설치 필요한 파일을 작업 폴더에 저장 첫 번째 grunt
라고 하는 것으로, 우선 일식 격납하는 카피원이 되는 폴더를, 예를 들면 어딘가에 「grunt」라고 하는 이름으로 만든다고 합니다.
다양한 필요한 파일 저장
config.rb Gruntfile.coffee package.json README.md 각종 .sass 각종 .coffee 다양한 웹 글꼴 리소스 각종 .py 등
「 grunt-play 」는 astronauts 씨의 grunt 실행 후에 소리로 가르쳐 주는 신 플러그인 M+WEBFONTS 님의 chibatch 에서 사용하는 웹 폰트, "fontello"군은 Web Icon Fonts 님의 웹 폰트입니다.
Gruntfile.coffee 내용은 fontello를 참조하십시오.
grunt.command 만들기
grunt 설치 설정 파일군을 개발 폴더에 복사한다 grunt 플러그인 세트 설치 css, src, js 폴더 만들기 sass 등을 src 폴더에 복사합니다 웹 글꼴을 css 폴더에 복사 첫 번째 grunt
실행해보기
하지만 일일이 설치하는 것이 귀찮습니다! 시간의 낭비가 아니라 귀찮아요!
그러면 grunt 설치부터 처음 grunt 실행까지 한 번에 끝낼 수 있는 쉘 스크립트입니다. 오, 매번 말하면서 Mac 환경입니다. Windows는 모르겠습니다!
하고 싶은 일
라고 하는 것으로, 우선 일식 격납하는 카피원이 되는 폴더를, 예를 들면 어딘가에 「grunt」라고 하는 이름으로 만든다고 합니다.
다양한 필요한 파일 저장
이 "grunt"에 다음 파일을 둡니다. 개발을 시작할 때의 초기 파일입니다.
「 grunt-play 」는 astronauts 씨의 grunt 실행 후에 소리로 가르쳐 주는 신 플러그인 M+WEBFONTS 님의 chibatch 에서 사용하는 웹 폰트, "fontello"군은 Web Icon Fonts 님의 웹 폰트입니다.
Gruntfile.coffee 내용은 fontello를 참조하십시오.
grunt.command 만들기
이를 grunt.command로 grunt 폴더에 저장합니다.
#!/bin/bash
sudo npm install -g grunt-cli
grunt_dir='/どこか/grunt/'
cp "${grunt_dir}config.rb" "${grunt_dir}Gruntfile.coffee" "${grunt_dir}package.json" "${grunt_dir}README.md" ./
sudo npm install grunt-contrib-coffee grunt-contrib-compass grunt-contrib-concat grunt-contrib-copy grunt-contrib-cssmin grunt-contrib-uglify grunt-este-watch grunt-play grunt-slim grunt-ssh --save-dev
mkdir css src js
cp "${grunt_dir}_include.sass" "${grunt_dir}common.sass" "${grunt_dir}fonts.sass" "${grunt_dir}mobile.sass" "${grunt_dir}reset.sass" "${grunt_dir}tablet.sass" ./src/
cp "${grunt_dir}desktop.coffee" "${grunt_dir}functions.coffee" "${grunt_dir}mobile.coffee" ./src/
cp "${grunt_dir}common.html" "${grunt_dir}config.yml" "${grunt_dir}data.py" "${grunt_dir}functions.py" "${grunt_dir}index.html" "${grunt_dir}index.py" "${grunt_dir}index.slim" "${grunt_dir}view.py" ./src/
cp "${grunt_dir}fontello.eot" "${grunt_dir}fontello.svg" "${grunt_dir}fontello.ttf" "${grunt_dir}fontello.woff" "${grunt_dir}mplus-1p-regular.ttf" "${grunt_dir}WebIconFonts.eot" "${grunt_dir}WebIconFonts.otf" "${grunt_dir}WebIconFonts.ttf" "${grunt_dir}WebIconFonts.woff" ./css/
grunt w
#!/bin/bash
sudo npm install -g grunt-cli
grunt_dir='/どこか/grunt/'
cp "${grunt_dir}config.rb" "${grunt_dir}Gruntfile.coffee" "${grunt_dir}package.json" "${grunt_dir}README.md" ./
sudo npm install grunt-contrib-coffee grunt-contrib-compass grunt-contrib-concat grunt-contrib-copy grunt-contrib-cssmin grunt-contrib-uglify grunt-este-watch grunt-play grunt-slim grunt-ssh --save-dev
mkdir css src js
cp "${grunt_dir}_include.sass" "${grunt_dir}common.sass" "${grunt_dir}fonts.sass" "${grunt_dir}mobile.sass" "${grunt_dir}reset.sass" "${grunt_dir}tablet.sass" ./src/
cp "${grunt_dir}desktop.coffee" "${grunt_dir}functions.coffee" "${grunt_dir}mobile.coffee" ./src/
cp "${grunt_dir}common.html" "${grunt_dir}config.yml" "${grunt_dir}data.py" "${grunt_dir}functions.py" "${grunt_dir}index.html" "${grunt_dir}index.py" "${grunt_dir}index.slim" "${grunt_dir}view.py" ./src/
cp "${grunt_dir}fontello.eot" "${grunt_dir}fontello.svg" "${grunt_dir}fontello.ttf" "${grunt_dir}fontello.woff" "${grunt_dir}mplus-1p-regular.ttf" "${grunt_dir}WebIconFonts.eot" "${grunt_dir}WebIconFonts.otf" "${grunt_dir}WebIconFonts.ttf" "${grunt_dir}WebIconFonts.woff" ./css/
grunt w
실행해보기
터미널에서 개발 폴더에 cd 합니다. 그 후, 다음을 실행하면 소소함과 환경을 정돈해줍니다.
$ /どこか/grunt/grunt.command
매우 편해지네요!
$ /どこか/grunt/grunt.command