0.3.2 • Published 8 years ago
@brikcss/component v0.3.2
Brikcss Component
A scaffolding / starter repo for brikcss components. Follow these steps to set up a new component.
- Set up the new component repo & test
- Update configs / root files
- Set up dependencies
- Create the component
Set up the new component repo & test
- Clone (or fork) this repo.
- Create repo in GitHub for new component.
- Configure remote branch tracking as follows: - origin: tracks the new component repo in GitHub. - upstream: tracks this scaffolding repo.
Update configs / root files
.browsersync.js: -filesproperty to watch build files. -serverproperty to set the correctbaseDirandindexvalues. - Any other browsersync settings as desired..gitignore..travis.yml(scripts fields).package.json: - All fields with "component" to the new component name. -description. -keywords. -mainandmodulewith the correct entry files. -releaseandpublishConfigwith the correct branch/dist-tags. -fileswith all files necessary for a release. -scripts: -prod:cleanpaths (and possibly addmkdirpto recreatedistdirs?). -js:watchandjs:lintpaths. -sass:watchandsass:lintandsass:distpaths. - If the component will havedistfiles, or if there are any tasks you want the release process to run prior to publishing, add the following NPM script topackage.json:```json "prepublishOnly": "npm run prod" ``` - [ ] `devDependencies`.README.md: - Update shields to show data for the new component. - Update the rest ofREADME.mdas desired.webpack.config.jsto ensure it compiles the correct files / bundles.
Set up dependencies
- Install NPM packages with
npm install. - Set up
semantic-releaseby runningsemantic-release-cli setup.
Note: Semantic release will publish your first release as version 1.0.0, there's no known way to change this. If you want to start at an earlier version (such as 0.0.1), do the following:
- Update the
versioninpackage.jsonto0.0.1. - Publish your first release manually with
npm publish --tag=<tag> --access=public. - Update
versioninpackage.jsonback to0.0.0-development.
Create the component
Directory structure:
src: Original source code.examples: Code or test examples.tests: UI and unit tests.dist: Files for distribution (if any).lib: Helper scripts (i.e., NPM scripts or git hooks).docs: Documentation.