slush-component
A Slush generator for web components.
Introduction
Web components should be simple. To that end, this generator creates the following files:
docker-compose.yml
: A Docker Compose file that defines an instance of the component-workshop.index.js
: The component implementation.package.json
: The NPM metadata and dependencies.README.md
: Something for your users to read by candlelight in the bath.spec.js
: Tests for the component.test.js
: A Jasmine test runner (invoked vianpm test
).
Getting Started
- Run the following command to install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Using Homebrew, install NPM and Docker Toolbox:
brew install npm docker-toolbox
- Using NPM, install Slush and
slush-component
globally:
npm install -g slush slush-component
- Generate a component using the
slush-component
generator:
slush component
- Navigate to the directory of your web component (
hello-component
in this example):
cd hello-component
- Run the docker container container via
docker-compose
:
docker-compose up