1. 安裝[nodejs](https://nodejs.org/)
2. 開啟cmd,並執行
```bash
npm install -j less
```
3. sublime安裝 LESS, smart less build
4. 修改smart less build設定檔
```json
{
"source_map": false
"custom_args": "--clean-css=\"--s1 --advanced --compatibility=ie8\""
}
```
2015年4月12日 星期日
sublime 安裝 coffeescript
1. 安裝[nodejs](https://nodejs.org/)
2. 開啟cmd,並執行
```bash
npm install -j coffee-script
```
3. sublime安裝 Better CoffeeScript
4. 修改coffeescript設定檔
```json
{
"checkSyntaxOnSave": true
"lintOnSave": true
"lintConfFile": true
}
```
sublime syncing
windows內如何同步sublime的設定檔至多台電腦呢?
我們可以利用Dropbox加mklink的方式來做設定喔
請使用系統管理者權限開啟cmd
1.將已設定好的sublime的設定檔移至dropbox內
```bash
mkdir %USERPROFILE%\Dropbox\Sublime
cd %APPDATA%\"Sublime Text 3\Packages"
copy /Y User\* %USERPROFILE%\Dropbox\Sublime
```
2.同步所有資料夾
```bash
cd %APPDATA%\"Sublime Text 3\Packages"
rmdir /S /Q User
mklink /D User %USERPROFILE%\Dropbox\Sublime
```
sublime terminail套件使用git bash
1.安裝 [git](http://git-scm.com/download/win)
2.sublime安裝Terminal
3.將Terminal => Settings - Default的內容複製到Terminal => Settings - User
4.修改
```json
{
"terminal": C:\\Program Files\\Git\\git-bash"
}
```


sublime安裝phpcs windows版
1.安裝sublime並安裝好package control
2.安裝phpcs
3.打開command並利用composer安裝
[PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
[PHPMD](https://github.com/phpmd/phpmd)
```bash
composer global require squizlabs/php_codesniffer fabpot/php-cs-fixer phpmd/phpmd
```
4.將PHP Code Sniffer => Settings - Default的內容複製到 PHP Code Sniffer => Settings - User
5.修改Settings - User
```json
{
"phpcs_executable_path": "phpcs.bat",
"php_cs_fixer_on_save": true,
"php_cs_fixer_executable_path": "php-cs-fixer.bat",
"phpcbf_on_save": true,
"phpcbf_executable_path": "phpcbf.bat",
"phpmd_run": true,
"phpmd_executable_path": "phpmd.bat"
}
```
如果進行存檔時還是會提示錯誤訊息修改下列參數即可
```json
{
"phpcs_php_prefix_path": "php路徑\\php.exe"
}
```
參考
[wamp安裝](http://phpwrite.blogspot.tw/2015/04/uniform.html)
[composer安裝](http://phpwrite.blogspot.tw/2015/04/windowscomposer.html)
訂閱:
文章 (Atom)