web-components-starter
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"name": "web-components-starter", | ||
@@ -4,0 +4,0 @@ "description": "A Web Components starter project", |
web-components-starter | ||
====== | ||
A Web Components starter project | ||
## A Web Components starter project | ||
@@ -10,22 +10,44 @@ [![web-components-starter-screenshot](https://raw.githubusercontent.com/kherrick/web-components-starter/master/assets/web-components-starter-screenshot.png)](https://kherrick.github.io/web-components-starter/) | ||
## Get started developing with the web-components-starter npm module: | ||
## System requirements: | ||
* [Node.js](https://nodejs.org/) | ||
## Develop using the npm module: | ||
### Create a new project directory | ||
```bash | ||
mkdir -p hello-web-components \ | ||
&& npm init -y \ | ||
&& npm i web-components-starter \ | ||
&& cp node_modules/web-components-starter/dist/build-ie11/index.html ./ \ | ||
&& export C=container I=index N=nomodule WCS=web-components-starter \ | ||
&& sed "s#./$N/$WCS-$C.js#./node_modules/$WCS/dist/build-ie11/$N/$WCS-$C.js#g" ./$I.html > $I.html.new \ | ||
&& mv index.html.new index.html && npx serve -s . | ||
&& cd hello-web-components \ | ||
&& npm init -y | ||
``` | ||
## Get started developing with the web-components-starter git repository: | ||
### Install the npm module | ||
### System requirements: | ||
```bash | ||
npm i web-components-starter | ||
``` | ||
* [Node.js](https://nodejs.org/) | ||
### Copy the starter index.html to the root of the project | ||
### Open a terminal, clone [this repository](https://github.com/kherrick/web-components-starter/), and run the following in the root of the project: | ||
```bash | ||
cp node_modules/web-components-starter/dist/build-ie11/index.html ./ | ||
``` | ||
### Update the path to the module | ||
```bash | ||
export C=container I=index N=nomodule WCS=web-components-starter \ | ||
&& sed "s#./$N/$WCS-$C.js#./node_modules/$WCS/dist/build-ie11/$N/$WCS-$C.js#g" ./$I.html > $I.html.new \ | ||
&& mv index.html.new index.html | ||
``` | ||
### Serve the project | ||
```bash | ||
npx serve -s . | ||
``` | ||
## Develop using the git repository: | ||
### Open a terminal, clone [this repository](https://github.com/kherrick/web-components-starter/), and run one of the following in the root of the project: | ||
* `npm run start` - by default builds [a view targeting IE11+](https://kherrick.github.io/web-components-starter/) (from IE11, to Edge, Chrome, Firefox, and Safari) | ||
@@ -32,0 +54,0 @@ |
76941
57