GithubHelp home page GithubHelp logo

morristech / github-graphql-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giladshoham/github-graphql-template

0.0 1.0 0.0 81 KB

A template project to create the same components described here: https://bitsrc.io/giladshoham/github-graphql

HTML 11.60% CSS 3.21% JavaScript 85.19%

github-graphql-template's Introduction

github-graphql-template

A step by step guide to creating bit Scope for GitHub’s GraphQL API like this one: https://bitsrc.io/giladshoham/github-graphql

From this Scope, any user can easily install these components using NPM or import them into their own projects using Bit to quickly modify them to suit their own use case.

1. Generate GitHub access token

To run this project you will have to generate a github token to access GitHub’s API.
creating-a-personal-access-token-for-the-command-line

Then, copy the generated token into ./src/App.js instead of the 'YOUR TOEKN HERE' string.

2. Running the project

npm i
npm start

Workflow

This project is based on simple create react app. Make sure to run npm install before starting the process.

Also, please create a user and a free Scope with Bit. You can learn more about Bit in this getting started guide.

  1. First, let’s install Bit.
$ npm install bit-bin -g
  1. Let’s initialize Bit for the project.
$ cd github-graphql-template 
$ bit init
  1. Let’s add the components to be tracked by Bit.
$ bit add src/*/*  -t src/{PARENT}/{FILE_NAME}.spec.js  # use a glob pattern to track multiple components in the same path or a single path to track a single component.
  1. Let’s add build and test environments. Here is an example.
$ bit import bit.envs/compilers/react -c
the following component environments were installed
- bit.envs/compilers/[email protected]

$ bit import bit.envs/testers/mocha -t
the following component environments were installed
- bit.envs/testers/[email protected]
  1. Now let’s lock a version and isolate the components from the project.
bit tag --all 1.0.0
  1. Now let’s share the components to a remote Scope.
$ bit export username.scopename  # Share components to this Scope

Note that using the --eject flag you can also remove an exported component from your source-code and add it as a package dependency in your project’s package.json file.

That’s it. You can now install the components using your favorite package manager, or use bit import to bring their source code into any repository, make changes and sync them across your codebase.

github-graphql-template's People

Contributors

giladshoham avatar jonisar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.