All Projects → elmsln → Lrnwebcomponents

elmsln / Lrnwebcomponents

Licence: apache-2.0
@lrnwebcomponents Monorepo for NPM based element definitions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lrnwebcomponents

Flow Mono Cli
A command line interface that aims to solve a few issues while working with flow typed codebases in a mono-repo.
Stars: ✭ 84 (-49.4%)
Mutual labels:  yarn, monorepo
Wc Loader
🚽 Webcomponents webpack loader.
Stars: ✭ 101 (-39.16%)
Mutual labels:  webcomponents, polymer
Vaadin Upload
The Web Component for uploading multiple files with progress indication. Part of the Vaadin components.
Stars: ✭ 87 (-47.59%)
Mutual labels:  webcomponents, polymer
Vitamin Web
Decathlon Design System libraries for web applications
Stars: ✭ 70 (-57.83%)
Mutual labels:  yarn, monorepo
Yerna
A Lerna-like tool for managing Javascript monorepos using Yarn
Stars: ✭ 140 (-15.66%)
Mutual labels:  yarn, monorepo
Create React App
Yarn Workspaces Monorepo support for Create-React-App / React-Scripts.
Stars: ✭ 76 (-54.22%)
Mutual labels:  yarn, monorepo
Frontend
🍭 Frontend for Home Assistant
Stars: ✭ 1,366 (+722.89%)
Mutual labels:  webcomponents, polymer
Gwt Api Generator
Generator for creating GWT JSInterop clients from Polymer Web Components
Stars: ✭ 49 (-70.48%)
Mutual labels:  webcomponents, polymer
The Grid
Grid layout custom element with drag and drop capabilities
Stars: ✭ 122 (-26.51%)
Mutual labels:  webcomponents, polymer
Webdash
🔥 Orchestrate your web project with Webdash the customizable web dashboard
Stars: ✭ 1,528 (+820.48%)
Mutual labels:  webcomponents, polymer
Login Fire
An element that allows simple configuration of multiple provider login for firebase
Stars: ✭ 58 (-65.06%)
Mutual labels:  webcomponents, polymer
Vaadin Date Picker
The Web Component providing a date selection field with scrollable month calendar. Part of the Vaadin components.
Stars: ✭ 158 (-4.82%)
Mutual labels:  webcomponents, polymer
Eslint Plugin Monorepo
ESLint Plugin for monorepos
Stars: ✭ 56 (-66.27%)
Mutual labels:  yarn, monorepo
Redux Store Element
A custom element allowing a more declarative use of Redux.
Stars: ✭ 83 (-50%)
Mutual labels:  webcomponents, polymer
Next Express Monorepo Starter
NextJS, Express and Now as Microservices with Yarn & Lerna Workspaces
Stars: ✭ 50 (-69.88%)
Mutual labels:  yarn, monorepo
Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (-41.57%)
Mutual labels:  webcomponents, polymer
Lancie Frontend
Website for Area FiftyLAN
Stars: ✭ 5 (-96.99%)
Mutual labels:  yarn, polymer
Vaadin Form Layout
The Web Component providing configurable responsive layout for form elements. Part of the Vaadin components.
Stars: ✭ 15 (-90.96%)
Mutual labels:  webcomponents, polymer
Vaadin Combo Box
The Web Component for displaying a list of items with filtering. Part of the Vaadin components.
Stars: ✭ 113 (-31.93%)
Mutual labels:  webcomponents, polymer
App Datepicker
Datepicker element built with Google's lit-element and Material Design 2
Stars: ✭ 142 (-14.46%)
Mutual labels:  webcomponents, polymer

lrnwebcomponents

Published on npm build Dependency Status Published on webcomponents.org Welcome to the lrnwebcomponents project! ELMS:LN produced web components for any project

Quick-start

Notice: You will need to use Node version 6.0 or higher. Verify that you have yarn enabled — if not install yarn globally. These web components are written in ES6 and build routines compile to es5 to encompass more browsers.

Install

$ git clone https://github.com/elmsln/lrnwebcomponents.git
$ cd lrnwebcomponents
$ yarn global add @wcfactory/cli
$ yarn global add polymer-cli
$ yarn global add lerna
$ yarn global add web-component-analyzer
$ yarn install

Windows

Cygwin command line is lightly tested, but slower than true Bash environment.

Windows Install

To properly configure git endlines for Windows, run this configuration

$ git config --global core.autocrlf true
$ git clone https://github.com/elmsln/lrnwebcomponents.git
$ cd lrnwebcomponents
$ yarn global add symlink-dir
$ yarn global add @wcfactory/cli
$ yarn global add polymer-cli
$ yarn global add lerna
$ yarn global add web-component-analyzer
$ yarn install

To work on any element in our repo

$ cd elements/ELEMENTNAME
$ yarn start

Edit files in lib/, src/ and demo/ in order to modify the element to contribute back to us via PR.

Scripts

  • $ wcf element

    • Create a new component.
  • $ yarn run rebuild-wcfcache

    • Rebuild caches as to what web component libraries can be used
  • $ yarn test

    • Run tests on ALL lrnwebcomponents.
  • $ yarn run build

    • Run build on ALL lrnwebcomponents.
  • $ yarn run storybook

    • Run storybook
  • $ yarn run build-storybook

    • Build storybook for deployment
  • $ lerna publish

    • Publish ALL lrnwebcomponents' elements to npmjs.com
  • $ lerna run build --no-bail

    • Run build command in all projects in the repo, don't bail if there's an issue

Web Component development

Because this is a monorepo, each web component will need to be independently built in order to actively work on and preview the changes. Every web component has its own Gulp file and Yarn/NPM script.

While still running yarn start in one terminal window (which runs the local server), you will need to open another terminal window, drill into the directory of the web component you'd like to work on, and execute the yarn run dev command. This command will use gulp tasks to watch the files within that web component directory and will automatically re-run the build command and refresh the browser when you make changes to the web component.

Working on elements (new-element)

Run wcf element to make a new element. Go to the new element following the directions generated at the end of the element's creation. To work on the new-element run yarn start from it's directory. If you are pulling in another element to use, run yarn add projectname --save.

Example development on a web component

$ cd /Sites/lrnwebcomponents
$ yarn start

# SHIFT + CTRL + T to open a new tab in Terminal

$ cd elements your-card  # or any other web component
$ yarn run dev

Make a change to the web component and save. The gulpfile will handle transpiling the element down to ES5 and will bring in the HTML and Sass into the template in the web component.

Test

To test all lrnwebcomponents, run yarn test from the root of the repo. If you only want to test the web component you're working on:

$ cd elements/your-card
$ yarn test

Also, if your tests are failing and you want access to a live browser to investigate why, the following flag will keep the browser open.

$ yarn test -- -p

Then open the URL that will be printed in the terminal. It looks something like this: http://localhost:8081/components/@@lrnwebcomponents/lrnwebcomponents/generated-index.html?cli_browser_id=0.

Storybook

We've added Storybook to lrnwebcomponents as a way to preview our web components as they are being developed. We'll also use Storybook to export a static site that will be the demo site for lrnwebcomponents.

To run storybook

$ yarn run storybook

This will start a web server on port 9001. Navigate in your browser to http://localhost:9001 to see Storybook in action. Storybook will watch for file changes and reload the browser automatically for you. This is a little slow at the moment, but we'll look into speeding this up.

To export the storybook static site

$ yarn run build-storybook

This places a build of the storybook site in the .storybook_out directory.

Known Issues with Storybook

For any web component that has a third-party dependency you will need to update the /.storybook/webpack.config.js file. You will need to create an alias for your depedency.

For example:

"../../whatwg-fetch/fetch.js": path.join( // this is the third-party dependency in the lrnwebcomponents
  __dirname,
  "../node_modules/whatwg-fetch/fetch.js" // this is where it lives in node_modules
)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].