Skip to content

Instantly share code, notes, and snippets.

@dittmaraz
Last active October 5, 2019 03:33
Show Gist options
  • Save dittmaraz/c6eff2efa465138f26d77c6b8fed0cbe to your computer and use it in GitHub Desktop.
Save dittmaraz/c6eff2efa465138f26d77c6b8fed0cbe to your computer and use it in GitHub Desktop.
Bit / Vue.js quick reference

Tutorial Source: https://docs.bit.dev/docs/tutorials/bit-vue-tutorial:

git clone https://github.com/teambit/bit-vue-tutorial
cd bit-vue-tutorial
npm install

Create an account at http://bit.dev.

Create a collection for the component, e.g. vue-tutorial

Install Bit: npm install bit-bin -g

Login: bit login Config: bit config Init: bit init

To add a component: bit add [componentPath] --id [componentId]

$ bit add src/components/productList.vue --id product-list

Status: bit status

To add missing files to the component, make sure id matches with your component: bit add [componentPath] --id [componentId]

bit add src/assets/products.js --id product-list

Status: bit status

To install Bit's Vue compiler: $bit import bit.envs/bundlers/vue --compiler

Now that the compiler's installed, you can build the component: bit build

Tag: bit tag --all 0.0.1

Status: bit status

Now that the component is considered staged, now export it to the bit.dev collection you created in the beginning: bit export dittmaraz.vue-tutorial

User: https://bit.dev/dittmaraz Collection: https://bit.dev/dittmaraz/vue-tutorial Component: https://bit.dev/dittmaraz/vue-tutorial/product-list

Status: bit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment