-
Notifications
You must be signed in to change notification settings - Fork 47
fix: make .ejs more readable #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've decided to close this PR. The goal was to make |
I'm reopening this PR. With some help from others, I'm using the function @malept it's ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine. Can you give some examples of what the generated desktop/spec files look like?
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Here's an example of how the output will look like with : {
name: 'name',
compressionLevel: 2,
version: 3,
revision: 1,
productName: 'productName',
genericName: 'genericName',
description: 'description',
productDescription: 'prodDesc',
license: 'license',
homepage: 'http://homepage.com',
requires: ['r1', 'r2'],
execArguments: undefined,
categories: ['c1', 'c2', 'c3'],
mimeType: ['m1', 'm2'],
icon: 'test/fixtures/scaled-icon.png',
pre: 'pre',
preun: 'preun',
post: 'post',
postun: 'postun'
}
The spacing between sections will stay the same, even if any of the optional sections are |
Another example: {
name: 'name',
compressionLevel: 2,
version: 3,
revision: 1,
productName: 'productName',
genericName: 'genericName',
description: undefined,
productDescription: undefined,
license: undefined,
homepage: 'http://homepage.com',
requires: ['r1', 'r2'],
execArguments: undefined,
categories: ['c1', 'c2', 'c3'],
mimeType: ['m1', 'm2'],
icon: 'test/fixtures/scaled-icon.png',
pre: undefined,
preun: 'preun',
post: undefined,
postun: undefined
}
|
Any difference in how the |
There's no difference for that one. The changes there better show which arguments are optional, and which ones are mandatory |
For both
.ejs
files, I've removed all unnecessaryif
statements, based on options that do have a default so they won't beundefined
.For
spec.ejs
, I'm trying to follow this guide and some other conventions.One of the requirements, keeping two lines between sections, it's impossible to follow when using lodash. We would have to switch to
ejs
in order to fine control the spacing between sections.