@evokedset/conjure
v0.2.1
Published
Conjure awesome internet from thin air.
Downloads
24
Readme
@evokedset/conjure
Conjure magnificent internet from thin air
Freshly minted component library for EvokedSet.
Private for now.
Install
Conjure is a privately scoped package, so the very first steps before using it is:
Then make sure you are logged in:
npm login
Having done that things work pretty much as expected.
npm install @evokedset/conjure
#or
yarn add @evokedset/conjure
And Bob's your uncle.
Usage
Conjure is meant to be used with themes. Specifically we are using Styled Components (more about that elsewhere).
Wrap your application (or some container to your liking) with the ThemeProvider component for relief from badness.
import { ThemeProvider } from 'emotion-theming';
import defaultTheme from '@evokedset/conjure';
const PageWrapper = ({ children }) =>
(
<ThemeProvider theme={defaultTheme}>
{children}
</ThemeProvider>
);
Then, import and use individual components to your liking.
import { Heading } from '@evokedset/conjure';
//...
<Heading h={3}>I will render as a H3 with themed styles!</Heading>
More better info can be found by perusing the Storybook or the Docz (available soonish) (Also, I didn't come up with that name som don't blame me).
Developing
Built With
This library was bootstrapped from a (pretty good) template, and the somewhat longish list of dev dependencies are still subject to scrutiny, suspicion and merciless yak shaving. The stuff that probably wont change anytime soon is that we're using Webpack to bundle stuff up and Storybook to create docs.
I've also taken an immediate liking to using generact to quickly bootstrap new components, but until further notice this is a flimsy sort of fancy and the aversion to keeping loads of extra files alongside the components might kick in and overrule the current structure.
Other than that, there's no big surprises here. Run yarn
or npm install
and things should work. (Please let me know if my assumptions are making an ass out of me and umption).
Testing
There is no testing. This will be corrected promptly.
I just need to get a basic idea about how to go about it first.
Development
There aren't many of us at the moment, but we're gonna try to do things in a way that won't blow up if we ever scale up and / or decide to make this repo public. That means we will follow a simplified version of git-flow for development.
In short:
- The
master
branch will be treated asrelease
ready and thus be protected. - We do our development in feature branches off of the
develop
branch.
git checkout develop
git checkout -b feature_branch
- When your awesome work is done, merge back into
develop
.
git checkout develop
git merge feature_branch
- Then make a pull request to merge
develop
intomaster
.
When this is all done, its time to publish.
npm run build-storybook
npm run storybook-deploy
npm version patch #unless you're bumping up more than a minor version
npm publish
Style guide
There will be plenty more about this shortly, but the gist of it is:
- ESLint with AirBNB-config + Prettier.
- Single quotes and semicolons on.
- 2 spaces indent.
- Styled components for component-level styling.
- Sass for project-level styling.