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

How do we consume bitstyles #62

Closed
planktonic opened this issue May 3, 2016 · 7 comments
Closed

How do we consume bitstyles #62

planktonic opened this issue May 3, 2016 · 7 comments
Labels

Comments

@planktonic
Copy link
Member

Bitstyles is currently untried in a project; would be great to setup a new project consuming bitstyles to run through the whole process/as much as possible. What can we do better?

@sonniesedge
Copy link
Contributor

sonniesedge commented May 31, 2016

@sonniesedge
Copy link
Contributor

sonniesedge commented May 31, 2016

We need to consider either the release method, or how 3rd party modules are included.

Release method:

  • What alternatives are there to Bower and npm?

3rd party modules:

@sonniesedge
Copy link
Contributor

sonniesedge commented Jun 2, 2016

How do we import Bitstyles modules? Are we assuming that a project will pull in bitstyles.scss only and that it will pull in everything else, or are we assuming that a project will pull in each Bitstyles modules individually?

Single file

Pulling in one file would be neater and easier when setting up a project. We can use a settings override file to turn on and off various components.

Multiple files

Pulling in multiple files would give us fine-gained control over every project, just including what we need. More initial work. Would by pass many of the relative path issues that seem to be cropping up.

@planktonic
Copy link
Member Author

Nice! Thanks for trying this out

single/multiple
I like the single file approach for simplicity — it’s a single package to add to a project — but I really appreciate the control, optimisation & clarity possible with a multiple file approach. Even though both make it possible to include/exclude css components, using a single file import means some other mechanism is needed (e.g. setting sass variables to control with are included) whereas multiple files can be explicitly imported in exactly the same way as a project’s css components.

Multiple files also means we can interweave project components with bitstyles components while sticking to ITCSS-ish principles.

Recent github pricing changes make the multiple approach more tenable I think — like inuit v3 we could use multiple repos. One of those repos could contain only the manifest main.scss with everything commented out to use as a starting point for new projects?

Then we’d have the problem of ensuring all settings & mixins are included when importing a component (as with inuit v3)…

It’d be great to talk this (and 3rd party dependencies etc) through tomorrow/in the next couple of days? I reckon it’d be quicker

@sonniesedge
Copy link
Contributor

Sass module loading

How do we load the Sass modules? Personally I'm for multiple file imports. This allows selective importing, selective ordering and is simpler to maintain than having multiple settings and checks. It's not clever or fancy, but would work and be reliable.

A single file would appear to be a simpler way to import to a project. But we'd still have to copy-and-paste in a settings file. It also has to be balanced out against the time it would take to build and maintain settings and checks.

Multi-repo vs Single-repo

The Inuit multiple-repo system is one of the most confusing setups I have ever seen. I can't see any advantage to splitting each component into a separate repo. It's not like we'd compile the entirety of the single-repo Bitstyles modules into an end-project and have it all built into the final CSS file - we'd selectively load modules, whatever method we used to do that.

3rd party dependencies

These are the current stumbling block. npm is inconsistent in how it imports these across versions - relative paths can change (not a problem for JS, but a problem for CSS/Sass). We'd be using Bitstyles in potentially unfriendly codebases where we can't control node versions or Sass types/versions. The more we can reduce dependencies that can cause complications, the better.

Removing dependencies would also allow us to offer this via Bower, which we currently can't do, due to postinstall scripts and dependency resolution.

@sonniesedge
Copy link
Contributor

Come and talk to me about this if you want to discuss this. I just wanted to get my views recorded before hand.

@planktonic
Copy link
Member Author

👍

This allows selective importing, selective ordering

This and the dependencies seem to me to be the priorities here. Multiple repos is only any good if it fixes one/both of those, while single cannot (definitely a simpler structure than inuit would be good)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants