Skip to content
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

cli tool bug fix #104

Closed
wants to merge 1 commit into from
Closed

Conversation

Shaobin-Jiang
Copy link
Contributor

I spotted this bug in the cli tool for creating new plugins and extensions:

The line in the template README.md files looks like this:

See [documentation](https://github.com/jspsych/jspsych-contrib/blob/main/packages/{full-name}/docs/jspsych-{name}.md)

It prefixes a "jspsych-" for the documentation file.

However, in the cli source code, it looks like this:

    gulp.task("renameDocsTemplate", function () {
      return gulp
        .src(`${repoRoot}/packages/${destPath}/docs/docs-template.md`)
        .pipe(rename(`${answers.name}.md`))
        .pipe(gulp.dest(`${repoRoot}/packages/${destPath}/docs`))
        .on("end", function () {
          deleteSync(`${repoRoot}/packages/${destPath}/docs/docs-template.md`);
        });
    });

The renaming does not prefix a "jspsych-", which leads to a discrepancy between the url and the actual doc name. This PR fixes that issue.

Copy link

changeset-bot bot commented Feb 24, 2024

⚠️ No Changeset found

Latest commit: 9b69d03

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Shaobin-Jiang
Copy link
Contributor Author

I have also another issue that I want to address when using the cli tool but am unsure as to whether I should include it in a commit. The prompt for naming the package now is "What do you want to call this package?". It can be confusing because I would not know whether to prefix it with a "plugin-" or "extension-". For example, the first time I entered a name "plugin-demo" and it created a package named "plugin-plugin-demo" for me. I personally would prefer that the question includes an additional prompt that users need not add "plugin" or "extension" themselves.

@jodeleeuw jodeleeuw closed this Aug 7, 2024
@jodeleeuw
Copy link
Member

Hi @Shaobin-Jiang,

Thanks very much for pointing out the discrepancy. We rewrote the cli in #125 and fixed this in that PR. To be consistent with current jspsych docs, we dropped the jspsych- prefix in the doc title.

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.

None yet

2 participants