Medium for ZeroNet
Current Version: 18.01.2
- run
gulp
to combine and move over javascript files tojs
folder, to copy over html files to root, and to compile sass into css and put intocss
folder. - The
src
folder should be ignored by ZeroNet.
Update: ZeroMedium no longer uses Typescript (there were problems with it and vue and I didn't want to spend forever trying to figure them out).
NOTE: This repo uses the GitFlow development model, which you can read about here and here.
TODO:
- Change gulp-minify-css to gulp-clean-css
- Always use camelCase
- Strings should use double quotes
- Always use curly braces ({}) with if statements
- Never use object method shorthand (
functionName() {}
)- Instead use
functionName: function() {}
- Instead use
- Always put semicolons at end of statements
- Use
const
when variable is not modified - Put empty line after declaration lines
- Put 1 space in curly braces (Ex:
{ 'foo': 'bar' }
) - Don't use assignment inside conditions
- Don't put spaces in brackets
- Don't put spaces in function calls (Must be of this form
functionName()
, without spaces) - Don't put spaces inside parentheses
- Don't use
delete
on variables, they can only delete properties - Always put 1 space after initial
//
or/*
of comment - Always put 1 space before blocks (Ex:
function() {}
, notfunction(){}
) - You must have parentheses around arrow function parameters
- Always put 1 space around infix operators (+, -, *, /, ?, etc.)
- Always wrap regexes in parentheses (Ex:
(/[.?!]/)
) - You are only allowed to use
that
as an alias forthis
(don't useself
, etc.) - Never use
alert
,confirm
, orprompt
- Never use
eval()