Skip to content

feat(modules support): add node.js modules support to cli#360

Merged
kaosat-dev merged 13 commits intomasterfrom
require-cli
Mar 9, 2018
Merged

feat(modules support): add node.js modules support to cli#360
kaosat-dev merged 13 commits intomasterfrom
require-cli

Conversation

@kaosat-dev
Copy link
Copy Markdown
Contributor

@kaosat-dev kaosat-dev commented Mar 5, 2018

This PR adds support for using designs defined as node.js modules (ie with require() & module.exports etc) as inputs to the command line

  • it also cleans up & add some common code in the core package
  • very minor naming tweak in the web package
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?

to add module support
* removed local test module (now moved to examples)
* renamed a few modules for more coherence with their contents
* getParameterDefinitionsCLI => getParameterValuesFromParameters (still not good name...)
* getParameterValues => getParameterValuesFromUIControls
* split up scriptLoading into requireDesignFromModule & requireDesignFromString
* added related helpers
* updated imports
* added helpers for node module support for cli , desktop & co
 * .jscad extension support
 * utilities to find entry points from files/ folders
* updated dependencies
@z3dev
Copy link
Copy Markdown
Member

z3dev commented Mar 9, 2018

I just remembered something... UPPER CASE file extensions don’t work. For example, myfile.STL There are some programs out there that do this still.

Otherwise, the code looks fine.

I think some parts of the README could go on the WIKI.

@kaosat-dev
Copy link
Copy Markdown
Contributor Author

which file is that ? (in uppercase ?)

feel free to copy & paste to the wiki of course :) but I like clear and self contained READMEs with all needed information
if you mean the whole part about node modules: that will need to be fleshed out & expanded uppon, and put into the main README & wiki for sure (once I add the 'fake' require() to the web variant in particular, since then we will have 100% useability )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants