Skip to content

Instantly share code, notes, and snippets.

@captaincole
Created February 24, 2018 05:22
Show Gist options
  • Select an option

  • Save captaincole/b81c94e9520a4be7bb7a09357e433618 to your computer and use it in GitHub Desktop.

Select an option

Save captaincole/b81c94e9520a4be7bb7a09357e433618 to your computer and use it in GitHub Desktop.
// side-menu.tsx
@Component({
tag: 'side-menu',
styleUrl: 'side-menu.css',
shadow: true
})
export class SideMenu {
...
// index.html
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial- scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
<title>Stencil Component Starter</title>
<script src="/build/side-menu.js"></script>
</head>
<body>
<side-menu></side-menu>
</body>
</html>
// stencil.config.js
exports.config = {
namespace: 'side-menu',
generateDistribution: true
};
exports.devServer = {
root: 'www',
watchGlob: '**/**'
}
// package.json
"name": "side-menu",
"version": "0.0.1",
"description": "Stencil Component Starter",
"main": "dist/side-menu.js",
"types": "dist/types/index.d.ts","collection": "dist/collection/collection-manifest.json",
"files": [
"dist/"
],
"browser": "dist/side-menu.js",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment