-
Notifications
You must be signed in to change notification settings - Fork 11
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
OSOE-92: Upgrade module to Node Extensions #59
Conversation
# Conflicts: # Lombiq.VueJs/ResourceManagementOptionsConfiguration.cs
…SOE-92 # Conflicts: # Lombiq.VueJs.Samples/Lombiq.VueJs.Samples.csproj # Lombiq.VueJs.Samples/package.json # Lombiq.VueJs/Lombiq.VueJs.csproj
Co-authored-by: 0liver <0liver@users.noreply.github.com>
const args = process.argv.splice(2); | ||
const argumentOptions = args.length >= 2 ? JSON.parse(args[1]) : undefined; | ||
|
||
async function executeFunctionByCommandLineArgument(functions) { | ||
if (!args[0]) return; |
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.
I'm lost here.
- Is
args
populated when we callexecuteFunctionByCommandLineArgument
directly, as we do in the compiler pipeline scripts? - Does
args
contain anything else thanfunctions
itself? - What is
argumentOptions
going to look like?
Please enlighten me!
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.
- Args is the command line arguments from
process.argv
, basically runtime constants. - It contains the name of the function, see here. Optionally it could contain a JSON that will expand the
defaultOptions
(e.g. custom root path, further rollup aliases). Configuring the options is not needed now, but iirc we needed it in Finitive (with GE) and may need it in the future. { "sfcRootPath": "Assets/Vue", "rollupAlias": { "batman": "../../../batman" } }
(see traditional batman example)
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.
I've refactored the function with more destructuring and explicit error messages to be cleaner and more developer-friendly.
Co-authored-by: 0liver <0liver@users.noreply.github.com>
OSOE-92