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

aiur #20

Merged
merged 9 commits into from
Nov 23, 2018
Merged

aiur #20

merged 9 commits into from
Nov 23, 2018

Conversation

moonglum
Copy link
Member

@moonglum moonglum commented Nov 20, 2018

  • Fix watch mode
  • Move the examples to an example folder
  • Rename internally to aiur
  • Add LICENSE, COC, CHANGELOG
  • Rename repository to aiur
  • Setup Travis
  • Provide a CLI (CLI executable #14)
  • Set language, title and description in aiur.config.js
  • Add basic documentation
  • Release on NPM as version 0.2.0

},
"dependencies": {
"aiur": "..",
"prismjs": "^1.15.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users of the package won't need to do that... but for this example it is necessary due to the .. package in the line above.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean because installing a local package like that doesn't pull in its dependencies? What about all the other dependencies then?

Might be easier (as in more straightforward for end users) to reference aiur-the-npm-package instead of trying to optimize via a local path. For my part, I tend to copy such examples into a separate directory anyway (as in npm install foo; cp -R node_modules/foo/sample ./), which wouldn't work here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need this one dependency here, because we import the CSS from that package and assume that it is located in the node_modules folder.

The optimization to the local path means that I can try out changes via that example folder. When I want to try out if file watching works as expected, it is very easy to just cd in that folder and try it out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moonglum moonglum changed the title Aiur aiur Nov 20, 2018
@moonglum moonglum force-pushed the aiur branch 3 times, most recently from fc599a0 to f51dc87 Compare November 22, 2018 11:40
@moonglum
Copy link
Member Author

@FND I will merge this now and release version 0.2.0 so I can show it to some people tomorrow. Your review will still be appreciated, and I will adjust it in a follow up.

@moonglum moonglum merged commit 355d3ea into master Nov 23, 2018
@moonglum moonglum deleted the aiur branch November 23, 2018 21:55
Copy link
Collaborator

@FND FND left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a quick look; seems solid to me. Just a few general observations, but nothing that needs immediate attention; from here on out, we can let real-world experience guide the way.

};

return { referenceDir: process.cwd(), config, options };
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason you're not reusing faucet-core's parseCLI; is there something we could (and should) make more flexible over there to promote reuse?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. How should that work? We are adding option to the CLI, how can we use parseCLI then? 🤔
We should definitely mark the boolean flags as boolean. Otherwise you can't accept parameters at the end of the CLI. For example: aiur --watch foo would set "watch" to "foo" without it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we could make parseCLI accept an object that's been generated by minimist's parseArgs, for example. (There might be a better abstraction.) But perhaps that's pursuing DRY to an excessive extent; I can't really tell right now - so if you're perfectly comfortable maintaining this, there's no problem to solve.

I'm assuming the boolean thing is essentially a bug report for faucet-core?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll say: Let's keep it like this for now. I'm pretty sure that this is an optimization that doesn't help that much.

It is indeed, sir.

@@ -10,3 +10,6 @@ module.exports = {
}
}
};

exports.title = "Example Styleguide";
exports.language = "en";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easy to miss this down here; I'd move these up top, i.e. above pages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean all three of them, right? I agree.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you gaslighting me?


assetURI(filepath) {
return path.join(this.baseURI, this.assetPath, filepath); // TODO: validate?
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are URIs being generated now? I've noticed Navigation concatenates baseURI and slug, so the lack of encapsulation makes me uncomfortable once more (based on actual real-world experience).

Having said that: It's probably not important right now; we'll deal with it if and when it comes up during actual use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I need to think about that again. I think the current solution is a little fiddly.

},
"dependencies": {
"aiur": "..",
"prismjs": "^1.15.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean because installing a local package like that doesn't pull in its dependencies? What about all the other dependencies then?

Might be easier (as in more straightforward for end users) to reference aiur-the-npm-package instead of trying to optimize via a local path. For my part, I tend to copy such examples into a separate directory anyway (as in npm install foo; cp -R node_modules/foo/sample ./), which wouldn't work here.

@moonglum
Copy link
Member Author

I also found a bug: The <h1> from the layout is now Page Title | Site Title, it should only be the page title. But this also made me think we maybe don't want to put in the h1 at all, but let the users do it themselves via Markdown.

@FND
Copy link
Collaborator

FND commented Nov 26, 2018

I'm not at all keen on moving the title into Markdown; I consider it essential (i.e. mandatory) metadata.

Granted, I've tripped over this page-vs.-site-title issue quite a few times over the years, but it's worth addressing.

@moonglum
Copy link
Member Author

moonglum commented Dec 3, 2018

I've collected everything I found here to #23. Please redirect all further discussions about the issues raised here over there 😄

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