Giter Site home page Giter Site logo

code-challenge's Introduction

Component library template

Setup

This template can be used to create a component library repository using stencilJS.

A setup with this component library is recommended for components that are used by more than one project (now or in the future). Business logic should be kept out of this repository.

When you created your own repository with this template please follow the following instructions and change this readme according to your project setup afterwards.

1. After installing the packages, use npm run init to initialize your project. You can customize the preview here: .storybook/manager.js

2. Create new components with npm run generate - Don't forget to use a dash in the component's name! There is already an example component in the components folder where we used Storybook Knobs and Faker, to give you an idea :)

3. Start the build and serve process with npm start.

Features

Tests

Run test:generate-output before running npm start to see the test results for the generated component tests in the preview.

Screenshot Testing

Configure your GitHub repository by code

We provide some GitHub repository configuration standards, like recommended branch protection settings, with this template. You can find the configuration in .github/settings.yml. If you want those settings to be applied to your GitHub repository, install the GitHub Settings app on your repository (more info here). The app will read the settings.yml automatically and apply them to your repository. Afterwards, you can add or customize settings.yml according to your preferences.

Extend component generator

If you want to generate more than the given files for each component, you can add an component-config.js on the project's base level and export an array of functions which take the component's name as value and return an array of objects, for example:

exports.extenderArr = [
  (name) => [
      {
        fileName: `${name}.ts`,
        content: `content for ${name}.ts`,
      },
    ]
];

Commitizen / commitlint config

When adding a new component with the generator, a new scope with the component's title will be automatically added to commitizen and commitlint. If you want additional custom scopes, you can add them manually into the "scopes" property of .cz-config.js.

code-challenge's People

Contributors

dependabot[bot] avatar runzelrosinchen avatar timomayer avatar semantic-release-bot avatar tiagomapmarques avatar karlbaumhauer avatar sheepfromheaven avatar jensdreske avatar clemens-vi 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.