GithubHelp home page GithubHelp logo

lit-challenge's Introduction

<lit-challenge>

nothing yet

<lit-challenge>
</lit-challenge>

Usage

Add notes on the usage of your component here.

Styling

Custom property Description Default
--custom-property What it does value

Development

Clone the repo

git clone https://github.com/westbrook/lit-challenge.git

Getting started

Make sure you have both yarn installed locally. Then run yarn in the repo's directory to get all of your dependancies installed.

Testing your component

You'll find some failing tests pre populated in your testing files. This is both an example of how to write tests and an immediate blocker to CircleCI based continuous integration processes. Also, note the availability of should in the test context.

element.tests.passing.should.be.true;

Web Component Tester + Sauce Labs based x-browser tests

By default WCT is configured to run your tests in your local headless Chrome and Firefox browsers. This can sometimes be an issue when running in various CI environments as the default Firefox installation may be outside of your support matrix. Update the plugins.local.browsers entry to wct.conf.json to ["chrome", "firefox"] as needed to support your development workflow.

When looking to expand your x-browser testing suite to include real browsers on saucelabs.com, make sure the edit wct.conf.json appropriately.

"sauce": {
  "disabled": false, // <--- change to `true`
  "username": "username",  // <--- add your username here
  "accessKey": "accessKey",  // <--- add your access key here

Learn more about working with Sauce Labs and web-component-tester to take full advantage of it in your project.

Yarn scripting

To build component documentation use:

yarn analyze

Linting

To lint your styles, JS, and HTML use:

yarn lint

This is great for when you're refactoring file connections.

Serve locally

To serve your component in a browser, and have your default automatically opened to the component documentation, use:

yarn serve

While this is running you can access the following helpful URLs:

URL Description
/ The analysis.json documentation and demos of the component.
/test Your WTC tests rum in the browser of your choice. (ignore the lodash errors...)
/demo Direct path to main demo page, no navigation will be present.

Deploy gh-pages

To publish the current version of your documentation of GitHub pages use:

yarn pages

Create and tag a GitHub release

To release a new version of your code to Github and NPM use:

yarn release

By default this will create a "bug fix", meaning it will bump the last number of the semver 0.0.x. Adding minor, major, or an explicit semver 1.1.2 is also available when making more precise releases. Visit the release-it documentation site for more information on the underlying API.

Once the release process is complete this command will also trigger the yarn pages command deploying your component documentation to GitHub.

Testing

To run web-component-tester with Istanbul based test coverage:

yarn test

Update your settings in wct.conf.json if you want to attach to Sauce Labs or other browsers, etc.

Changes across multiple repos

To make it easier to make changed to your project configurations across multiple repos the command yarn update-settings has been provided to batch update a number of configuration files in the repo. If you want to diverge from the expected settings there in, but would still like to do so in batch, you can make changes to scripts/update-settings in order to point to an separate package of configuration files.

PROTIP

If any of these commands fail through the course of your development, it's possible that required yarn post* commands won't be called correctly. If you have trouble activating subsequent commands, try manually calling the yarn post* to clean up any incomplete tasks.

lit-challenge's People

Contributors

westbrook avatar

Watchers

James Cloos avatar  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.