介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
#!/bin/sh | |
find . -name '*.sass' -exec sh -c 'git mv "$0" "${0%.sass}.css.sass"' {} \; | |
find . -name '*.coffee' -exec sh -c 'git mv "$0" "${0%.coffee}.js.coffee"' {} \; |
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'livereload', port: '35730' do # Default port is 35729. | |
watch(%r{app/views/.+\.(erb|haml|slim)$}) | |
watch(%r{app/helpers/.+\.rb}) | |
watch(%r{public/.+\.(css|js|html)}) | |
watch(%r{config/locales/.+\.yml}) | |
# Rails Assets Pipeline | |
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } |
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'livereload' do | |
watch(%r{app/views/.+\.(erb|haml|slim)$}) | |
watch(%r{app/helpers/.+\.rb}) | |
watch(%r{public/.+\.(css|js|html)}) | |
watch(%r{config/locales/.+\.yml}) | |
# Rails Assets Pipeline | |
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } |
#!/bin/sh | |
/usr/bin/vimdiff "$2" "$5" |
[alias] | |
f = fetch | |
st = status | |
s = status | |
br = branch | |
rb = svn rebase | |
c = commit | |
ci = commit | |
cp = cherry-pick | |
co = checkout |
{ | |
"arrow_spacing": { | |
"level" : "error" | |
}, | |
"camel_case_classes" : { | |
"level" : "error" | |
}, | |
"coffeescript_error" : { | |
"level" : "error" | |
}, |
# L10N Convention | |
# | |
# - Create category according to routing's 1st segment. (Maybe partial's module name?) | |
# - Keep alphabetical order to avoid duplication. | |
# - Naming with structure instead of directly translating. | |
en: | |
generic: # Reusable | |
actions: | |
cancel_button: 'Cancel' | |
delete_button: 'Delete' |
介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
root = true | |
[*.js] | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
quote_type = double | |
spaces_around_operators = true | |
space_after_control_statements = true |
#!/usr/bin/php | |
<?php | |
// Set constants. | |
$js_pattern = "/\.js$/"; | |
// Set default variables. | |
$return = 0; | |
$exit_status = 0; | |
$output = array(); | |
$matches = array("js" => array()); |