- Follow the VF Javascript Style guide.
- Add the standard VF .editorconfig to the project to help automate code style enforcement. Also see the EditorConfig plugin for Atom.
- Use JS-Beautify to automate code formatting and use the standard VF .jsbeautifyrc. Also see the atom-beautify plugin for Atom.
- Be consistent.
- Favour verbosity and clarity over brevity.
- Use comments but don't comment the obvious. Well written coce with descriptive variable & function names should be self documenting.
- Try to stick to Recommended tools & Recommended libraries & frameworks.
- Always use ESLint and fix linting issues when you see them. Do not
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
indent_style = space | |
indent_size = 4 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"indent_size": 4, | |
"indent_char": " ", | |
"eol": "\n", | |
"indent_level": 0, | |
"indent_with_tabs": false, | |
"preserve_newlines": true, | |
"max_preserve_newlines": 10, | |
"jslint_happy": false, | |
"space_after_anon_function": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This gulpfile will copy static libraries and a index.html file as well as | |
* merge, babelify and uglify the rest of the javascript project. | |
* | |
* TODO: | |
* - Separate media, libs and src with different watchers. | |
* - Media and libs should only be copied to dist if they are different sizes. | |
* | |
* The expected project is to be laid out as such: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command -v tich >/dev/null 2>&1 || { echo >&2 "I require tich but it's not installed. Please run '[sudo] npm install -g tich'. Aborting."; exit 1; } | |
command -v appc >/dev/null 2>&1 || { echo >&2 "I require appc but it's not installed. Please run '[sudo] npm install -g appcelerator'. Aborting."; exit 1; } | |
HELP="Usage: ./build.sh ios|android prod|test|device|emu|help [device-id]" | |
# Exit if no args passed and display help message | |
if [ $# -eq 0 ]; then | |
echo >&2 $HELP | |
exit 2 |