c8-experiments
February 22, 2015 ยท View on GitHub
This repo shows how you can use component (1.x)
I showed these examples at my talk @ Berlin.JS (2014-06-19): [slides] [video]
Each example is on its own branch. Starting with an empty project and do a progress step by step.
clone and do step by step
- clone this repo:
https://github.com/timaschew/c8-experiments.git - change the directory
cd c8-experiments - start with first example:
git checkout e1thennpm install - next one:
git checkout e2thencomponent-build - etcetera
examples
- e1 - install component
- e2 - use a JS script
- e3 - use CSS
- e4 - use another JS file
- e5 - use 3rd party component
- e6 - add Font Awesome
- e7 - better directory structure & local component
- e7a - test environment (
component-build --dev) - e8 - add reactive component
- e9 - reactive with a list
- e10 - use jade for templating (*)
- e11 - use express as middleware for generating the build (*)
install steps for each example
Youn only need to run npm install once (except for e10 and e11)
Because component is installed locally, you cannot access it with component-build, but
you can create a temporary alias: alias component-build='node_modules/.bin/component-build' otherwise
install it with global option: npm install component@1.*
From e1 until e9 just a component-build
e10 has it's own build script using component API, first install npm install then run node builder.js
e11 uses express to generate the build, install npm install and start express node app.js