All Projects → PolymerX → polymerx-cli

PolymerX / polymerx-cli

Licence: MIT License
⚡ Unlock the power of Polymer 3, Web Components and modern web tools.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to polymerx-cli

Polymer Skeleton
💀 Skeleton for Polymer 3 app with Webpack, PostCSS and Service Workers ready.
Stars: ✭ 185 (+516.67%)
Mutual labels:  polymer, postcss, workbox
redux-connect-element
Redux HTMLElement Connector
Stars: ✭ 16 (-46.67%)
Mutual labels:  webcomponents, lit-html, lit-element
Wired Elements
Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
Stars: ✭ 8,848 (+29393.33%)
Mutual labels:  webcomponents, lit-html, lit-element
lit-components
Moved to https://github.com/vaadin/component-mixins
Stars: ✭ 59 (+96.67%)
Mutual labels:  webcomponents, lit-html, lit-element
rollup-plugin-lit-css
Moved to https://github.com/bennypowers/lit-css
Stars: ✭ 35 (+16.67%)
Mutual labels:  webcomponents, lit-html, lit-element
pattern-library
AXA CH UI component library. Please share, comment, create issues and work with us!
Stars: ✭ 103 (+243.33%)
Mutual labels:  webcomponents, lit-html, lit-element
highcharts-webcomponent
Highcharts Web Component usable with any Framework
Stars: ✭ 21 (-30%)
Mutual labels:  webcomponents, lit-html, lit-element
polytimer
polytimer.rocks
Stars: ✭ 24 (-20%)
Mutual labels:  polymer, webcomponents, service-worker
create-evergreen-app
Get up and running with an evergreen web application development stack designed by, and for, today's modern web.
Stars: ✭ 16 (-46.67%)
Mutual labels:  webcomponents, lit-html, lit-element
bui
‹b› Web components for creating applications – built by Blackstone Publishing using lit-html and lit-element
Stars: ✭ 29 (-3.33%)
Mutual labels:  lit-html, lit-html-element, lit-element
toggle-icon
toggle-icon is a custom element created with Polymer. It provides an extremely powerful and customizable switch that looks like a paper-icon-button.
Stars: ✭ 21 (-30%)
Mutual labels:  polymer, webcomponents
wheat-ui
Web Components 组件库;拍平框架差异
Stars: ✭ 17 (-43.33%)
Mutual labels:  webcomponents, lit-html
hello-web-components
A simple starter <hello-world /> web component written in typescript, using lit-html and lit-element. Unit tested with jest and e2e tested with puppeteer and jest-puppeteer.
Stars: ✭ 15 (-50%)
Mutual labels:  lit-html, lit-element
pharos
JSTOR's design system
Stars: ✭ 48 (+60%)
Mutual labels:  lit-html, lit-element
multiselect-combo-box
A multi select combo box web component based on Polymer and the vaadin-combo-box
Stars: ✭ 41 (+36.67%)
Mutual labels:  polymer, webcomponents
auth-ajax
Auth token handling for Polymer
Stars: ✭ 15 (-50%)
Mutual labels:  polymer, webcomponents
vaadin-context-menu
The responsive Web Component for showing context dependent items for any element on the page. Part of the Vaadin components.
Stars: ✭ 26 (-13.33%)
Mutual labels:  polymer, webcomponents
skeleton-carousel
Carousel component. Horizontal and vertical swipe navigation
Stars: ✭ 31 (+3.33%)
Mutual labels:  polymer, webcomponents
vaadin-split-layout
The Web Component which allows you to partition a layout into resizeable areas. Part of the Vaadin components.
Stars: ✭ 40 (+33.33%)
Mutual labels:  polymer, webcomponents
vaadin-icons
Vaadin Icons is a collection of 600+ unique icons designed for web applications
Stars: ✭ 59 (+96.67%)
Mutual labels:  polymer, webcomponents

PolymerX CLI

Greenkeeper badge

npm

Build Status Build status codecov GitHub issues XO code style PolymerX CLI

Unlock the power of Polymer 3, Web Components and modern web tools.

Features

  • Generate a Polymer Skeleton for your next project in 30 seconds.
  • Build using Webpack 4 under the hood producing Service Worker with WorkboxJs.
  • Develop with ease with hot-reload and error layer enabled.
  • Support for PostCSS (with personal configuration) when getting CSS from external files.
  • https certificate generation on the fly for development.
  • No magic, just using the tools.

More to come...

Install

NOTE: Node.js >= 8.x required.

$ yarn global add polymerx-cli

Or with NPM

$ npm install -g polymerx-cli

Switch from polymer-cli and pwa-starter-kit

If you want to change your builder from the official polymer-cli for pwa-starter-kit to our polymerx-cli you need to make sure your imports are correctly declared without relative path.

Also, you need to make sure your chunksSortMode is set to none for the HtmlWebpackPlugin because a known bug html-webpack-plugin#870.

Create a polymerx.config.js and add the following code:

export default function (config, env, helpers) {
  let { plugin } = helpers.getPluginsByName(config, "HtmlWebpackPlugin")[0];
  plugin.options.chunksSortMode = 'none'
}

Refer to polymerx-cli#179 for more info about the topic.

Templates

Official templates are available at https://github.com/Polymerx-skeleton-templates

Usage

$ polymerx create <template-name> <project-name>

IMPORTANT: currently supported only default as template.

Example:

$ polymerx create default my-awesome-project

CLI commands

⚙️ polymerx create

$ polymerx create --help

  --version   Show version number                                      [boolean]
  --cwd       A directory to use instead of $PWD.                                [default: "."]
  --name      The application's name
  --author    Author of the app                                                  [default: null]
  --force     Force option to create the directory for the new app               [default: false]
  --yarn      Use 'yarn' instead of 'npm'                              [boolean] [default: false]
  --git       Initialize version control using git                     [boolean] [default: false]
  --https     Use HTTPS?                                               [boolean] [default: false]
  --install   Install dependencies                                     [boolean] [default: true]

NOTE: the required data will be asked if not specified.

🕶 polymerx watch

Easy development with hot-reload and "friendly" error layers.

IMPORTANT: postcss configuration file must be present.
$ polymerx watch --help

  --cwd           A directory to use instead of $PWD.              [string]   [default: .]
  --src           Entry file (index.js)                            [string]   [default: "src"]
  --config, -c    Path to custom polymerx.config.js.           [string]   [default: null]
  --port, -p      Port to start a server on                        [string]   [default: "8080"]
  --host,         Hostname to start a server on                    [string]   [default: "0.0.0.0"]

NOTE: You can run the dev server on a different port using PORT=8091 polymerx watch

📦 polymerx build

Create a production build with (or without) Service Workers.

IMPORTANT: postcss configuration file must be present.
$ polymerx build --help

  --cwd             A directory to use instead of $PWD.          [string]   [default: .]
  --src             Entry file (index.js).                       [string]   [default: "src"]
  --dest            Directory root for output.                   [string]   [default: "dist"]
  --config, -c      Path to custom polymerx.config.js.           [string]   [default: null]
  --workers, -w     Add a service worker to application.         [boolean]  [default: true]
  --clean           Clear output directory before building.      [boolean]  [default: true]

Custom Configuration

Webpack

For customizing your webpack configuration create a polymerx.config.js what will exports a function like this:

/**
 * Function that mutates original webpack config.
 * Supports asynchronous changes when promise is returned.
 *
 * @param {object} config - original webpack config.
 * @param {object} env - options passed to CLI.
 * @param {WebpackConfigHelpers} helpers - object with useful helpers when working with config.
 **/
export default function (config, env, helpers) {
  /** you can change config here **/
}

Since we are using the WebpackConfigHelpers by preact-cli you can checkout also their awesome Wiki to get more info about the helper.

About this tool

This CLI is heavily inspired by the awesome preact-cli and aims to became a stable tool for developing Polymer 3 PWA easily and with modern web tools.

License

MIT © LasaleFamine

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].