@stencil/dev-server 0.0.19-1 → 5.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,186 @@
1
+ <!doctype html>
2
+ <html dir="ltr" lang="en">
3
+ <head data-tmpl="tmpl-dir">
4
+ <meta charset="utf-8" />
5
+ <title>{{title}}</title>
6
+ <meta
7
+ name="viewport"
8
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
9
+ />
10
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
11
+ <style>
12
+ * {
13
+ box-sizing: border-box;
14
+ }
15
+ html {
16
+ color-scheme: light dark;
17
+ }
18
+ body {
19
+ padding: 40px 140px;
20
+ margin: 0;
21
+ font-family:
22
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
23
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
24
+ font-size: 14px;
25
+ background: #f9f8f8;
26
+ }
27
+ h1 {
28
+ margin-bottom: 15px;
29
+ font-size: 18px;
30
+ color: #343434;
31
+ }
32
+ h1 span {
33
+ padding: 0 6px;
34
+ font-weight: normal;
35
+ color: #9e9b9b;
36
+ }
37
+ a {
38
+ color: #555;
39
+ text-decoration: none;
40
+ }
41
+ a:hover {
42
+ color: #303030;
43
+ }
44
+ ul {
45
+ margin: 0;
46
+ padding: 0;
47
+ }
48
+ li {
49
+ list-style: none;
50
+ margin: 0;
51
+ padding: 0;
52
+ }
53
+ li a {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 6px;
57
+ margin: 0;
58
+ padding: 6px 12px;
59
+ min-width: 50%;
60
+ border-radius: 4px;
61
+ overflow: hidden;
62
+ white-space: nowrap;
63
+ }
64
+ li a:focus,
65
+ li a:hover {
66
+ color: #555;
67
+ background: rgba(221, 235, 255, 0.65);
68
+ }
69
+ .icon {
70
+ display: inline-block;
71
+ width: 14px;
72
+ min-height: 14px;
73
+ opacity: 0.6;
74
+ mask-repeat: no-repeat;
75
+ -webkit-mask-repeat: no-repeat;
76
+ }
77
+ .directory .icon {
78
+ mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjEzLjMzOCA5Nkg3NC42NjZDNTEuMTk3IDk2IDMyIDExNS4xOTggMzIgMTM4LjY2N3YyMzQuNjY2QzMyIDM5Ni44MDIgNTEuMTk3IDQxNiA3NC42NjYgNDE2aDM2Mi42NjhDNDYwLjgwMyA0MTYgNDgwIDM5Ni44MDIgNDgwIDM3My4zMzNWMTg2LjY2N0M0ODAgMTYzLjE5OCA0NjAuODAzIDE0NCA0MzcuMzM0IDE0NEgyNTYuMDA2bC00Mi42NjgtNDh6Ii8+PC9zdmc+);
79
+ -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjEzLjMzOCA5Nkg3NC42NjZDNTEuMTk3IDk2IDMyIDExNS4xOTggMzIgMTM4LjY2N3YyMzQuNjY2QzMyIDM5Ni44MDIgNTEuMTk3IDQxNiA3NC42NjYgNDE2aDM2Mi42NjhDNDYwLjgwMyA0MTYgNDgwIDM5Ni44MDIgNDgwIDM3My4zMzNWMTg2LjY2N0M0ODAgMTYzLjE5OCA0NjAuODAzIDE0NCA0MzcuMzM0IDE0NEgyNTYuMDA2bC00Mi42NjgtNDh6Ii8+PC9zdmc+);
80
+ background-position: 0px 2px;
81
+ background-color: currentColor;
82
+ }
83
+ .file .icon {
84
+ mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjg4IDQ4SDEzNmMtMjIuMDkyIDAtNDAgMTcuOTA4LTQwIDQwdjMzNmMwIDIyLjA5MiAxNy45MDggNDAgNDAgNDBoMjQwYzIyLjA5MiAwIDQwLTE3LjkwOCA0MC00MFYxNzZMMjg4IDQ4em0tMTYgMTQ0VjgwbDExMiAxMTJIMjcyeiIvPjwvc3ZnPg==);
85
+ -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjg4IDQ4SDEzNmMtMjIuMDkyIDAtNDAgMTcuOTA4LTQwIDQwdjMzNmMwIDIyLjA5MiAxNy45MDggNDAgNDAgNDBoMjQwYzIyLjA5MiAwIDQwLTE3LjkwOCA0MC00MFYxNzZMMjg4IDQ4em0tMTYgMTQ0VjgwbDExMiAxMTJIMjcyeiIvPjwvc3ZnPg==);
86
+ background-position: 0px 2px;
87
+ background-color: currentColor;
88
+ }
89
+ li a:hover .icon {
90
+ opacity: 1;
91
+ }
92
+
93
+ @media (max-width: 768px) {
94
+ body {
95
+ font-size: 13px;
96
+ line-height: 16px;
97
+ padding: 0;
98
+ }
99
+ h1 {
100
+ font-size: 2em;
101
+ line-height: 1.5em;
102
+ color: #fff;
103
+ background: #000;
104
+ padding: 15px 10px;
105
+ margin: 0;
106
+ }
107
+ h1 a {
108
+ color: #9e9e9e;
109
+ }
110
+ h1 a:hover {
111
+ color: #eaeaea;
112
+ }
113
+ ul {
114
+ border-top: 1px solid #cacaca;
115
+ }
116
+ li {
117
+ display: block;
118
+ border-bottom: 1px solid #cacaca;
119
+ font-size: 2em;
120
+ line-height: 1.2em;
121
+ }
122
+ li:nth-child(odd) {
123
+ background: #e0e0e0;
124
+ }
125
+ li a {
126
+ display: flex;
127
+ border-radius: 0;
128
+ padding: 15px 10px;
129
+ }
130
+ .icon {
131
+ width: 24px;
132
+ min-width: 24px;
133
+ min-height: 24px;
134
+ }
135
+ .directory .icon {
136
+ background-position: 0px 4px;
137
+ }
138
+ }
139
+
140
+ @media (prefers-color-scheme: dark) {
141
+ body {
142
+ background: #000;
143
+ }
144
+ h1 {
145
+ color: #eaeaea;
146
+ }
147
+ a {
148
+ color: #ccc;
149
+ }
150
+ a:hover {
151
+ color: #eaeaea;
152
+ }
153
+ li a:focus,
154
+ li a:hover {
155
+ color: #ccc;
156
+ background: #1c1c1c;
157
+ }
158
+ }
159
+
160
+ @media (max-width: 768px) and (prefers-color-scheme: dark) {
161
+ ul {
162
+ border-top: 1px solid #333;
163
+ }
164
+ li {
165
+ border-bottom: 1px solid #333;
166
+ }
167
+ li:nth-child(odd) {
168
+ background: #333;
169
+ }
170
+ }
171
+ </style>
172
+ <link
173
+ rel="shortcut icon"
174
+ type="image/png"
175
+ href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAB2AAAAdgB+lymcgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFGSURBVHic7dm9TcNQFMXxPzRpaZGYAEIqZkERkzAFSwARSyCGgA2QAqGhTZqYIrJkzEP4GfueyD4/6TavuufEH1IMZmZmZmZm382ABfAOFB3MJzANTfAPV8CGboJX5xU4CczRyox+wpfzDByFpWlhQX/hy3kCJlGBcnV1z/81D8BhUKYsW2IKKICboExZosJHzBtwT+bbR710H7MG5qmwB78UMEQb4AJ4qR7u5UOoJxPgun44pisAdm+44+rB2AooqF31Y7oFIPGDj62AH1yAegE1F6BeQM0FqBdQcwHqBdRcgHoBNRegXkDNBagXUHMB6gXUXIB6ATUXoF5ALVXAkP8W39YPUgV8BCyisqofpAp4DFhEpVG2c3ZfU9VfdPv4QnzWtKn5wEpYA5dNw5emwB2w3IMAbWcJ3AKnueHNzMzMzGzYvgAGC6SjvNl9rAAAAABJRU5ErkJggg=="
176
+ />
177
+ </head>
178
+ <body>
179
+ <main>
180
+ <h1>{{nav}}</h1>
181
+ <ul>
182
+ {{files}}
183
+ </ul>
184
+ </main>
185
+ </body>
186
+ </html>
@@ -0,0 +1,157 @@
1
+ <!doctype html>
2
+ <html dir="ltr" lang="en">
3
+ <head data-tmpl="tmpl-initial-load">
4
+ <meta charset="utf-8" />
5
+ <script>
6
+ if ('serviceWorker' in navigator) {
7
+ navigator.serviceWorker
8
+ .getRegistration()
9
+ .then(function (registration) {
10
+ if (registration) {
11
+ registration.unregister().then(function (hasUnregistered) {
12
+ if (hasUnregistered) {
13
+ console.log('unregistered service worker');
14
+ }
15
+ });
16
+ }
17
+ })
18
+ .catch(function (err) {
19
+ console.error(err.message || err);
20
+ });
21
+ }
22
+ </script>
23
+ <meta
24
+ name="viewport"
25
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
26
+ />
27
+ <meta http-equiv="x-ua-compatible" content="IE=Edge" />
28
+ <title>Initializing First Build...</title>
29
+ <link
30
+ rel="shortcut icon"
31
+ type="image/x-icon"
32
+ href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAAjVBMVEUAAAD8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjL8kjLn7xn3AAAALnRSTlMAsFBgAaDxfPpAdTMcD/fs47kDBhVXJQpvLNbInIiBRvSqIb+TZ2OOONxdzUxpgKSpAAAAA69JREFUeNrt3FtvskAQxvERFQXFioqnCkqth572+3+8947dN00TliF5ZpP53ZOAveg/OzCklFJKKaWUUkoppQTZm77cCGFo+jIhhG/TlwchJAvTk/GIAA6x6Um+JoDti+nJ644A5h+mJ8eMALKj6cnHnAB2r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tYICRRwt7BHqEoppZRSSimllFLqD/8AOXJZHefotiIAAAAASUVORK5CYII="
33
+ />
34
+ <style>
35
+ * {
36
+ box-sizing: border-box;
37
+ }
38
+ html {
39
+ color-scheme: dark light;
40
+ }
41
+ body {
42
+ position: absolute;
43
+ padding: 0;
44
+ margin: 0;
45
+ width: 100%;
46
+ height: 100%;
47
+ font-family:
48
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
49
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
50
+ }
51
+ .toast {
52
+ position: absolute;
53
+ top: 12px;
54
+ right: 10px;
55
+ left: 10px;
56
+ margin: auto;
57
+ max-width: 700px;
58
+ border-radius: 3px;
59
+ background: rgba(0, 0, 0, 0.9);
60
+ transform: translate3d(0px, -60px, 0px);
61
+ transition: transform 75ms ease-out;
62
+ pointer-events: none;
63
+ }
64
+ .active {
65
+ transform: translate3d(0px, 0px, 0px);
66
+ }
67
+ .content {
68
+ display: flex;
69
+ align-items: center;
70
+ pointer-events: auto;
71
+ }
72
+ .message {
73
+ flex: 1;
74
+ padding: 15px;
75
+ font-size: 14px;
76
+ color: #fff;
77
+ }
78
+ .spinner {
79
+ position: relative;
80
+ display: inline-block;
81
+ width: 56px;
82
+ height: 28px;
83
+ }
84
+ svg:not(:root) {
85
+ overflow: hidden;
86
+ }
87
+ svg {
88
+ position: absolute;
89
+ top: 0;
90
+ left: 0;
91
+ width: 100%;
92
+ height: 100%;
93
+ transform: translateZ(0);
94
+ animation: rotate 600ms linear infinite;
95
+ }
96
+ @keyframes rotate {
97
+ 0% {
98
+ transform: rotate(0deg);
99
+ }
100
+ 100% {
101
+ transform: rotate(360deg);
102
+ }
103
+ }
104
+ svg circle {
105
+ fill: transparent;
106
+ stroke: white;
107
+ stroke-width: 4px;
108
+ stroke-dasharray: 128px;
109
+ stroke-dashoffset: 82px;
110
+ }
111
+ .logs {
112
+ position: absolute;
113
+ top: 50px;
114
+ right: 10px;
115
+ left: 10px;
116
+ margin: auto;
117
+ max-width: 700px;
118
+ padding: 32px;
119
+ line-height: 1.5;
120
+ }
121
+
122
+ @media (prefers-color-scheme: dark) {
123
+ .toast {
124
+ background: rgb(49, 49, 49, 0.9);
125
+ }
126
+ }
127
+ </style>
128
+ </head>
129
+ <body>
130
+ <div class="toast">
131
+ <div class="content">
132
+ <div class="message">Initializing First Build...</div>
133
+ <div class="spinner">
134
+ <svg viewBox="0 0 64 64"><circle transform="translate(32,32)" r="26"></circle></svg>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="logs">
140
+ <pre id="log-output"></pre>
141
+ </div>
142
+
143
+ <script>
144
+ setTimeout(function () {
145
+ document.querySelector('.toast').classList.add('active');
146
+ }, 100);
147
+
148
+ var logOutput = document.getElementById('log-output');
149
+ window.addEventListener('devserver:buildlog', function (ev) {
150
+ var buildLog = ev.detail;
151
+ if (buildLog && buildLog.messages) {
152
+ logOutput.innerText = buildLog.messages.join('\n');
153
+ }
154
+ });
155
+ </script>
156
+ </body>
157
+ </html>
package/README.md DELETED
@@ -1,60 +0,0 @@
1
- [![npm][npm-badge]][npm-badge-url]
2
- [![Build Status][circle-badge]][circle-badge-url]
3
-
4
- # Stencil Dev Server
5
-
6
- This is a very simple http-server with a filewatcher and livereload built in. This server
7
- was built with the purpose of making it easy to develop stencil apps and components, but it will work
8
- with about any dev workflow.
9
-
10
- Just provide a directory.
11
-
12
- ```
13
- stencil-dev-server --root public
14
- ```
15
-
16
- There are a number of options available, but all have sane defaults.
17
-
18
- - **--root**
19
- - The directory that should be watched and served
20
- - It defaults to the current directory that the command was executed from.
21
- - **--watchGlob**
22
- - The pattern of files to watch in the root directory for changes.
23
- - The glob defaults to **\*\*/\*\***.
24
- - **--address**
25
- - The ip address that the server should listen to.
26
- - Defaults to *0.0.0.0*. Point your browser to localhost.
27
- - **--httpPort**
28
- - The port that the http server should use. If the number provided is in use it will choose another.
29
- - Defaults to *3333*.
30
- - **--liveReloadPort**
31
- - The port that the live-reload server should use. If the number provided is in use it will choose another.
32
- - Defaults to *35729*.
33
- - **--additionalJsScripts**
34
- - A comma separated list of javascript files that you would like appended to all html page body tags. This allows you to expand the dev server to do additional behaviors.
35
- - **--config**
36
- - The path to a config file for the dev server. This allows you to keep a specific set of default parameters in a configuration file.
37
- - Defaults to *./stencil.config.js*
38
- - **--ssl**
39
- - Enables https for development server with self signed SSL certificate
40
- - Defaults to false
41
- - **--no-open**
42
- - Disables automatically opening a browser.
43
-
44
- Config File Structure
45
-
46
- ```js
47
- exports.devServer = {
48
- root: './',
49
- additionalJSScripts: [
50
- 'http://localhost:3529/debug.js',
51
- './scripts/additionalDebug.js'
52
- ],
53
- watchGlob: '**/*'
54
- };
55
- ```
56
-
57
- [npm-badge]: https://img.shields.io/npm/v/@stencil/dev-server.svg?style=flat-square
58
- [npm-badge-url]: https://www.npmjs.com/package/@stencil/dev-server
59
- [circle-badge]: https://circleci.com/gh/ionic-team/stencil-dev-server.svg?style=shield
60
- [circle-badge-url]: https://circleci.com/gh/ionic-team/stencil-dev-server
package/assets/404.html DELETED
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset='utf-8'>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
- <title>404: Resource not found</title>
7
- <style>{style}</style>
8
- </head>
9
- <body class="directory">
10
- <div id="wrapper">
11
- <h1><a href="/">~</a>{linked-path}</h1>
12
- </div>
13
- </body>
14
- </html>
package/assets/index.html DELETED
@@ -1,39 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset='utf-8'>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
- <title>listing directory {directory}</title>
7
- <link rel="shortcut icon" href="/__stencil-dev-server__/favicon.ico" type="image/x-icon">
8
- <style>
9
- html {
10
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
11
- color: #16161d;
12
- }
13
- body {
14
- margin: 50px auto;
15
- width: 60%;
16
- }
17
- span.denote {
18
- font-weight: 100;
19
- display: inline-block;
20
- width: 8px;
21
- }
22
- h1 > a, h1 > a:visited {
23
- text-decoration: none;
24
- color: #5850ff;
25
- }
26
- a, a:visited {
27
- color: #16161d;
28
- display: inline-block;
29
- margin: 2px 0 2px 6px;
30
- }
31
- </style>
32
- </head>
33
- <body class="directory">
34
- <div id="wrapper">
35
- <h1><a href="/">~</a>{linked-path}</h1>
36
- {files}
37
- </div>
38
- </body>
39
- </html>
@@ -1,16 +0,0 @@
1
- #! /usr/bin/env node
2
- 'use strict';
3
-
4
- process.title = 'stencil-dev-server';
5
- process.on('unhandledRejection', function(r) { console.error(r) });
6
- process.env.TINY_STATIC_LR_BIN = __filename;
7
-
8
- let cmdArgs = process.argv;
9
- const npmRunArgs = process.env.npm_config_argv;
10
- if (npmRunArgs) {
11
- cmdArgs = cmdArgs.concat(JSON.parse(npmRunArgs).original);
12
- }
13
-
14
- const server = require('../dist');
15
-
16
- server.run(cmdArgs);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });