-
Notifications
You must be signed in to change notification settings - Fork 249
New: customscriptsdir added to migrations grunt task (fixes #3677) #3680
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
base: master
Are you sure you want to change the base?
Conversation
minimatch(filePath, '**/' + fileNameIncludes) This should do what you're doing with the regex. It just uses globs to define the regex. I'm not clear on how the behaviour is changed. https://github.com/isaacs/minimatch The use of includes as well as glob matching is by design. It was originally just includes https://github.com/adaptlearning/adapt-migrations/blame/831052bb4b3bf06ed8bb4d0e8b57961fa6e282aa/examples/migrations.js#L55 and Joe R had gotten used to it. I replaced it with the globs check because it made more sense to me and then Joe R requested a reversion, so I implemented both. You should be able to write
I think this is acceptable. We're specify files/folder names with The code for the custom folder looks good. |
My thought process was to avoid any potential issue with naming custom tasks in the authoring tool. Regex change reveretd. |
There is currently no API for getting all of the existing tasks and running a specific one (other than --file). If you need the AAT to be able do that then you can add new stuff in here for that specific purpose?
|
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.
👀
Adding the customscriptdir is to allow a custom folder to be specified, this allows us to load custom migration scripts for the authoring tool.
Changed the fileNameIncludes matching from .includes() to RegExp, this is to make it more accurate when targetting a specific file. For example when using .includes() the flag --file=text will also pull through textInput.
#3677
Fix
New