@liascript/devserver 1.0.5--0.10.4 β†’ 1.0.6--0.10.8

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.
package/README.md CHANGED
@@ -78,8 +78,8 @@ updated separately, we use two different version, one for the devServer and one
78
78
  for LiaScript.
79
79
 
80
80
  ```text
81
- DevServer: 1.0.5
82
- LiaScript: 0.10.4
81
+ DevServer: 1.0.6
82
+ LiaScript: 0.10.8
83
83
  ```
84
84
 
85
85
  ### `--input`
package/dist/index.js CHANGED
@@ -1,4 +1,207 @@
1
1
  #!/usr/bin/env node
2
- parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"QCba":[function(require,module,exports) {
3
- "use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),require("dotenv").config();var o=e(require("express")),r=o.default(),t=e(require("open")),i=e(require("fs")),s=e(require("path")),n=require("cors"),l=require("express-handlebars"),a=require("minimist")(process.argv.slice(2)),c=require("ip"),d=s.default.normalize(__dirname+"/../node_modules/@liascript/editor/dist"),p=s.default.normalize(__dirname+"/../node_modules/reloadsh.js/reloader.browser.js");function u(){console.log(" _ _ ____ _ _"),console.log("| | (_) __ _/ ___| ___ _ __(_)_ __ | |_"),console.log("| | | |/ _` \\___ \\ / __| '__| | '_ \\| __|"),console.log("| |___| | (_| |___) | (__| | | | |_) | |_ "),console.log("|_____|_|\\__,_|____/ \\___|_| |_| .__/ \\__|"),console.log(" |_|"),console.log()}(a.v||a.version)&&(console.log("DevServer: 1.0.5"),console.log("LiaScript: 0.10.4"),process.exit()),(a.h||a.help)&&(u(),console.log("-h --help show this help"),console.log("-v --version show version information"),console.log("-i --input input README.md file or folder (default: .)"),console.log("-n --hostname hostname of your server (default: localhost)"),console.log("-p --port used port number (default: 3000)"),console.log("-l --live do live reload on file change"),console.log("-o --open open in default browser"),console.log("-t --test test online on https://LiaScript.github.io"),console.log(),console.log("-r --responsiveVoice add optional responsiveVoice support,"),console.log(" or pass your own responsiveVoice key."),console.log(" Adding this feature might slow down"),console.log(" the reloading speed."),console.log(" For more information visit:"),console.log(" https://responsivevoice.org"),process.exit());var _,h=a.p||a.port||3e3,f=a.n||a.hostname||"localhost",m=a.o||a.open,g=a.i||a.input||".",v=a.l||a.live||!1,y=a.t||a.test;if(a.r||a.responsiveVoice){var x=a.r||a.responsiveVoice;_="string"==typeof x?x:process.env.RESPONSIVE_VOICE_KEY}var w={path:null,readme:null};if(g){var j=i.default.lstatSync(g);j.isDirectory()?w.path=g:j.isFile()&&(w.path=s.default.dirname(g),w.readme=s.default.basename(g))}r.set("view engine","hbs"),r.engine("hbs",l({layoutsDir:s.default.normalize(__dirname+"/../views/layouts"),defaultLayout:"main",extname:"hbs"})),r.set("views",s.default.normalize(__dirname+"/../views")),r.get("/",function(e,o){o.redirect("/home")}),r.get("/home*",function(e,o){var r=w.path+"/"+e.params[0],t=i.default.lstatSync(r);if(t.isDirectory()){for(var s=i.default.readdirSync(r).filter(function(e){return"."!==e[0]}),n="/home",l=e.params[0].split("/").filter(function(e){return""!==e}),a=[],c=0;c<l.length;c++)n+="/"+l[c],a.push({name:l[c],href:n});o.render("main",{layout:"index",path:a,file:s.map(function(o){return{name:o,href:"http://"+f+":"+h+"/home"+e.params[0]+"/"+o,isDirectory:i.default.lstatSync(r+"/"+o).isDirectory()}}).sort(function(e,o){return e.isDirectory&&!o.isDirectory?-1:!e.isDirectory&&o.isDirectory?1:e.name.toLocaleLowerCase()<o.name.toLocaleLowerCase()?-1:1})})}else t.isFile()?e.params[0].toLocaleLowerCase().endsWith(".md")?y?o.redirect("https://LiaScript.github.io/course/?http://"+f+":"+h+"/"+e.params[0]):o.redirect("/liascript/index.html?http://"+f+":"+h+"/"+e.params[0]):o.sendFile(e.params[0],{root:w.path}):o.send("ups, something went wrong")}),r.get("/liascript/",function(e,o){o.redirect("/liascript/index.html")}),r.get("/liascript/index.html",function(e,o){v&&_?i.default.readFile(d+"/index.html","utf8",function(e,r){o.send(r.replace("</head>","<script type='text/javascript' src='/reloader/reloader.js'><\/script>\n <script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key="+_+"'><\/script>\n </head>"))}):v?i.default.readFile(d+"/index.html","utf8",function(e,r){o.send(r.replace("</head>","<script type='text/javascript' src='/reloader/reloader.js'><\/script></head>"))}):_?i.default.readFile(d+"/index.html","utf8",function(e,r){o.send(r.replace("</head>","<script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key="+_+"'><\/script></head>"))}):o.sendFile(d+"/index.html")}),r.get("/liascript/*",function(e,o){o.sendFile(e.params[0],{root:d})}),r.get("/sw.js",function(e,o){}),r.get("/favicon.ico",function(e,o){}),r.get("/reloader/reloader.js",function(e,o){o.sendFile(p)}),r.get("/*",n(),function(e,o){o.sendFile(e.originalUrl,{root:w.path})});var b="http://"+f+":"+h;w.path&&w.readme&&(b+="/liascript/index.html?http://"+f+":"+h+"/"+w.readme),y&&w.readme&&(b="https://LiaScript.github.io/course/?http://"+f+":"+h+"/"+w.readme),u();var D=require("reloadsh.js")(r,v?[s.default.join(w.path,w.readme||"")]:[]);v&&console.log('✨ watching for changes on: "'+s.default.join(w.path,w.readme||"")+'"'),D.on("error",function(e){console.error("🚨 error =>",e.message),process.exit()}),D.listen(h),m&&t.default(b),console.log("πŸ“‘ starting server"),console.log(" - local: "+b),console.log(" - on your network: "+b.replace(b,c.address())),console.log("✨ hit Ctrl-c to close the server");
4
- },{}]},{},["QCba"], null)
2
+
3
+ var $8zHUo$express = require("express");
4
+ var $8zHUo$open = require("open");
5
+ var $8zHUo$fs = require("fs");
6
+ var $8zHUo$path = require("path");
7
+ var $8zHUo$process = require("process");
8
+ var $8zHUo$dotenv = require("dotenv");
9
+ var $8zHUo$cors = require("cors");
10
+ var $8zHUo$expresshandlebars = require("express-handlebars");
11
+ var $8zHUo$minimist = require("minimist");
12
+ var $8zHUo$ip = require("ip");
13
+ var $8zHUo$reloadshjs = require("reloadsh.js");
14
+
15
+ function $parcel$interopDefault(a) {
16
+ return a && a.__esModule ? a.default : a;
17
+ }
18
+
19
+
20
+
21
+
22
+
23
+
24
+ $8zHUo$dotenv.config();
25
+ const $882b6d93070905b3$var$app = ($parcel$interopDefault($8zHUo$express))();
26
+
27
+
28
+
29
+ const $882b6d93070905b3$var$argv = $8zHUo$minimist($8zHUo$process.argv.slice(2));
30
+
31
+ const $882b6d93070905b3$var$liascriptPath = ($parcel$interopDefault($8zHUo$path)).resolve(($parcel$interopDefault($8zHUo$path)).join("/home/andre/Workspace/Projects/Freinet/liascript-devserver", 'node_modules/@liascript/editor/dist'));
32
+ const $882b6d93070905b3$var$reloadPath = ($parcel$interopDefault($8zHUo$path)).resolve(($parcel$interopDefault($8zHUo$path)).join("/home/andre/Workspace/Projects/Freinet/liascript-devserver", 'node_modules/reloadsh.js/reloader.browser.js'));
33
+ function $882b6d93070905b3$var$liascript() {
34
+ console.log(' _ _ ____ _ _');
35
+ console.log('| | (_) __ _/ ___| ___ _ __(_)_ __ | |_');
36
+ console.log("| | | |/ _` \\___ \\ / __| '__| | '_ \\| __|");
37
+ console.log('| |___| | (_| |___) | (__| | | | |_) | |_ ');
38
+ console.log('|_____|_|\\__,_|____/ \\___|_| |_| .__/ \\__|');
39
+ console.log(' |_|');
40
+ console.log();
41
+ }
42
+ if ($882b6d93070905b3$var$argv.v || $882b6d93070905b3$var$argv.version) {
43
+ console.log('DevServer: 1.0.6');
44
+ console.log('LiaScript: 0.10.8');
45
+ $8zHUo$process.exit();
46
+ }
47
+ if ($882b6d93070905b3$var$argv.h || $882b6d93070905b3$var$argv.help) {
48
+ $882b6d93070905b3$var$liascript();
49
+ console.log('-h --help show this help');
50
+ console.log('-v --version show version information');
51
+ console.log('-i --input input README.md file or folder (default: .)');
52
+ console.log('-n --hostname hostname of your server (default: localhost)');
53
+ console.log('-p --port used port number (default: 3000)');
54
+ console.log('-l --live do live reload on file change');
55
+ console.log('-o --open open in default browser');
56
+ console.log('-t --test test online on https://LiaScript.github.io');
57
+ console.log();
58
+ console.log('-r --responsiveVoice add optional responsiveVoice support,');
59
+ console.log(' or pass your own responsiveVoice key.');
60
+ console.log(' Adding this feature might slow down');
61
+ console.log(' the reloading speed.');
62
+ console.log(' For more information visit:');
63
+ console.log(' https://responsivevoice.org');
64
+ $8zHUo$process.exit();
65
+ }
66
+ const $882b6d93070905b3$var$port = $882b6d93070905b3$var$argv.p || $882b6d93070905b3$var$argv.port || 3000;
67
+ const $882b6d93070905b3$var$hostname = $882b6d93070905b3$var$argv.n || $882b6d93070905b3$var$argv.hostname || 'localhost';
68
+ const $882b6d93070905b3$var$openInBrowser = $882b6d93070905b3$var$argv.o || $882b6d93070905b3$var$argv.open;
69
+ const $882b6d93070905b3$var$input = $882b6d93070905b3$var$argv.i || $882b6d93070905b3$var$argv.input || '.';
70
+ const $882b6d93070905b3$var$liveReload = $882b6d93070905b3$var$argv.l || $882b6d93070905b3$var$argv.live || false;
71
+ const $882b6d93070905b3$var$testOnline = $882b6d93070905b3$var$argv.t || $882b6d93070905b3$var$argv.test;
72
+ let $882b6d93070905b3$var$responsiveVoice;
73
+ if ($882b6d93070905b3$var$argv.r || $882b6d93070905b3$var$argv.responsiveVoice) {
74
+ let active = $882b6d93070905b3$var$argv.r || $882b6d93070905b3$var$argv.responsiveVoice;
75
+ if (typeof active === 'string') $882b6d93070905b3$var$responsiveVoice = active;
76
+ else $882b6d93070905b3$var$responsiveVoice = undefined;
77
+ }
78
+ var $882b6d93070905b3$var$project = {
79
+ path: null,
80
+ readme: null
81
+ };
82
+ if ($882b6d93070905b3$var$input) {
83
+ const stats = ($parcel$interopDefault($8zHUo$fs)).lstatSync($882b6d93070905b3$var$input);
84
+ // Is it a directory?
85
+ if (stats.isDirectory()) $882b6d93070905b3$var$project.path = $882b6d93070905b3$var$input;
86
+ else if (stats.isFile()) {
87
+ $882b6d93070905b3$var$project.path = ($parcel$interopDefault($8zHUo$path)).dirname($882b6d93070905b3$var$input);
88
+ $882b6d93070905b3$var$project.readme = ($parcel$interopDefault($8zHUo$path)).basename($882b6d93070905b3$var$input);
89
+ }
90
+ }
91
+ $882b6d93070905b3$var$app.set('view engine', 'hbs');
92
+ $882b6d93070905b3$var$app.engine('hbs', $8zHUo$expresshandlebars({
93
+ layoutsDir: ($parcel$interopDefault($8zHUo$path)).normalize("/home/andre/Workspace/Projects/Freinet/liascript-devserver/views/layouts"),
94
+ defaultLayout: 'main',
95
+ extname: 'hbs'
96
+ }));
97
+ $882b6d93070905b3$var$app.set('views', ($parcel$interopDefault($8zHUo$path)).normalize("/home/andre/Workspace/Projects/Freinet/liascript-devserver/views"));
98
+ $882b6d93070905b3$var$app.get('/', function(req, res) {
99
+ res.redirect('/home');
100
+ });
101
+ $882b6d93070905b3$var$app.get('/home*', function(req, res) {
102
+ const currentPath = $882b6d93070905b3$var$project.path + '/' + req.params[0];
103
+ const stats = ($parcel$interopDefault($8zHUo$fs)).lstatSync(currentPath);
104
+ // Is it a directory?
105
+ if (stats.isDirectory()) {
106
+ const files = ($parcel$interopDefault($8zHUo$fs)).readdirSync(currentPath).filter((e)=>{
107
+ return e[0] !== '.';
108
+ });
109
+ let basePath = '/home';
110
+ let pathNames = req.params[0].split('/').filter((e)=>{
111
+ return e !== '';
112
+ });
113
+ let paths = [];
114
+ for(let i = 0; i < pathNames.length; i++){
115
+ basePath += '/' + pathNames[i];
116
+ paths.push({
117
+ name: pathNames[i],
118
+ href: basePath
119
+ });
120
+ }
121
+ res.render('main', {
122
+ layout: 'index',
123
+ path: paths,
124
+ file: files.map((file)=>{
125
+ return {
126
+ name: file,
127
+ href: `http://${$882b6d93070905b3$var$hostname}:${$882b6d93070905b3$var$port}/home${req.params[0]}/${file}`,
128
+ isDirectory: ($parcel$interopDefault($8zHUo$fs)).lstatSync(currentPath + '/' + file).isDirectory()
129
+ };
130
+ }).sort((a, b)=>{
131
+ if (a.isDirectory && !b.isDirectory) return -1;
132
+ else if (!a.isDirectory && b.isDirectory) return 1;
133
+ else {
134
+ if (a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase()) return -1;
135
+ else return 1;
136
+ }
137
+ return 0;
138
+ })
139
+ });
140
+ } else if (stats.isFile()) {
141
+ if (req.params[0].toLocaleLowerCase().endsWith('.md')) {
142
+ if ($882b6d93070905b3$var$testOnline) res.redirect(`https://LiaScript.github.io/course/?http://${$882b6d93070905b3$var$hostname}:${$882b6d93070905b3$var$port}/${req.params[0]}`);
143
+ else res.redirect(`/liascript/index.html?http://${$882b6d93070905b3$var$hostname}:${$882b6d93070905b3$var$port}/${req.params[0]}`);
144
+ } else res.sendFile(req.params[0], {
145
+ root: $882b6d93070905b3$var$project.path
146
+ });
147
+ } else res.send('ups, something went wrong');
148
+ });
149
+ $882b6d93070905b3$var$app.get('/liascript/', function(req, res) {
150
+ res.redirect('/liascript/index.html');
151
+ });
152
+ $882b6d93070905b3$var$app.get('/liascript/index.html', function(req, res) {
153
+ // ------------------------------------
154
+ if ($882b6d93070905b3$var$liveReload && $882b6d93070905b3$var$responsiveVoice) ($parcel$interopDefault($8zHUo$fs)).readFile($882b6d93070905b3$var$liascriptPath + '/index.html', 'utf8', function(err, data) {
155
+ res.send(data.replace('</head>', `<script type='text/javascript' src='/reloader/reloader.js'></script>
156
+ <script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key=${$882b6d93070905b3$var$responsiveVoice}'></script>
157
+ </head>`));
158
+ });
159
+ else if ($882b6d93070905b3$var$liveReload) ($parcel$interopDefault($8zHUo$fs)).readFile($882b6d93070905b3$var$liascriptPath + '/index.html', 'utf8', function(err, data) {
160
+ res.send(data.replace('</head>', `<script type='text/javascript' src='/reloader/reloader.js'></script></head>`));
161
+ });
162
+ else if ($882b6d93070905b3$var$responsiveVoice) ($parcel$interopDefault($8zHUo$fs)).readFile($882b6d93070905b3$var$liascriptPath + '/index.html', 'utf8', function(err, data) {
163
+ res.send(data.replace('</head>', `<script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key=${$882b6d93070905b3$var$responsiveVoice}'></script></head>`));
164
+ });
165
+ else res.sendFile($882b6d93070905b3$var$liascriptPath + '/index.html');
166
+ });
167
+ // load everything from the liascript folder
168
+ $882b6d93070905b3$var$app.get('/liascript/*', function(req, res) {
169
+ res.sendFile(req.params[0], {
170
+ root: $882b6d93070905b3$var$liascriptPath
171
+ });
172
+ });
173
+ // ignore this one
174
+ $882b6d93070905b3$var$app.get('/sw.js', function(req, res) {});
175
+ $882b6d93070905b3$var$app.get('/favicon.ico', function(req, res) {});
176
+ // pass the reloader, to be used for live updates
177
+ $882b6d93070905b3$var$app.get('/reloader/reloader.js', function(req, res) {
178
+ res.sendFile($882b6d93070905b3$var$reloadPath);
179
+ });
180
+ // everything else comes from the current project folder
181
+ $882b6d93070905b3$var$app.get('/*', $8zHUo$cors(), function(req, res) {
182
+ res.sendFile(req.originalUrl, {
183
+ root: $882b6d93070905b3$var$project.path
184
+ });
185
+ });
186
+ let $882b6d93070905b3$var$localURL = 'http://' + $882b6d93070905b3$var$hostname + ':' + $882b6d93070905b3$var$port;
187
+ if ($882b6d93070905b3$var$project.path && $882b6d93070905b3$var$project.readme) $882b6d93070905b3$var$localURL += '/liascript/index.html?http://' + $882b6d93070905b3$var$hostname + ':' + $882b6d93070905b3$var$port + '/' + $882b6d93070905b3$var$project.readme;
188
+ if ($882b6d93070905b3$var$testOnline && $882b6d93070905b3$var$project.readme) $882b6d93070905b3$var$localURL = 'https://LiaScript.github.io/course/?http://' + $882b6d93070905b3$var$hostname + ':' + $882b6d93070905b3$var$port + '/' + $882b6d93070905b3$var$project.readme;
189
+ $882b6d93070905b3$var$liascript();
190
+
191
+ const $882b6d93070905b3$var$server = $8zHUo$reloadshjs($882b6d93070905b3$var$app, $882b6d93070905b3$var$liveReload ? [
192
+ ($parcel$interopDefault($8zHUo$path)).join($882b6d93070905b3$var$project.path, $882b6d93070905b3$var$project.readme || '')
193
+ ] : []);
194
+ if ($882b6d93070905b3$var$liveReload) console.log(`✨ watching for changes on: "${($parcel$interopDefault($8zHUo$path)).join($882b6d93070905b3$var$project.path, $882b6d93070905b3$var$project.readme || '')}"`);
195
+ $882b6d93070905b3$var$server.on('error', (e)=>{
196
+ console.error('🚨 error =>', e.message);
197
+ $8zHUo$process.exit();
198
+ });
199
+ $882b6d93070905b3$var$server.listen($882b6d93070905b3$var$port);
200
+ if ($882b6d93070905b3$var$openInBrowser) ($parcel$interopDefault($8zHUo$open))($882b6d93070905b3$var$localURL);
201
+ console.log('πŸ“‘ starting server');
202
+ console.log(` - local: ${$882b6d93070905b3$var$localURL}`);
203
+ console.log(` - on your network: ${$882b6d93070905b3$var$localURL.replace($882b6d93070905b3$var$localURL, $8zHUo$ip.address())}`);
204
+ console.log('✨ hit Ctrl-c to close the server');
205
+
206
+
207
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;AAAA,oBAAwB,EAAE;AAE1B,MAAM,yBAAG,GAAG,wCAAO,EAAE;;;;AA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,CAAC,GAAG,CAAC,CAAC,sBAAsB,EAAE,8BAAQ,CAAC,OAAO,CAAC,8BAAQ,EAAE,iBAAU,EAAE,CAAC,CAAC,CAAC,CAAC;AAChF,OAAO,CAAC,GAAG,CAAC,oCAAkC,CAAC","sources":["src/index.ts"],"sourcesContent":["require('dotenv').config()\nimport express from 'express'\nconst app = express()\nimport doOpen from 'open'\nimport fs from 'fs'\nimport path from 'path'\nconst cors = require('cors')\nconst handlebars = require('express-handlebars')\n\nconst argv = require('minimist')(process.argv.slice(2))\nconst ip = require('ip')\n\nconst liascriptPath = path.resolve(\n path.join(process.env.PWD, 'node_modules/@liascript/editor/dist')\n)\n\nconst reloadPath = path.resolve(\n path.join(process.env.PWD, 'node_modules/reloadsh.js/reloader.browser.js')\n)\n\nfunction liascript() {\n console.log(' _ _ ____ _ _')\n console.log('| | (_) __ _/ ___| ___ _ __(_)_ __ | |_')\n console.log(\"| | | |/ _` \\\\___ \\\\ / __| '__| | '_ \\\\| __|\")\n console.log('| |___| | (_| |___) | (__| | | | |_) | |_ ')\n console.log('|_____|_|\\\\__,_|____/ \\\\___|_| |_| .__/ \\\\__|')\n console.log(' |_|')\n console.log()\n}\n\nif (argv.v || argv.version) {\n console.log('DevServer: 1.0.6')\n console.log('LiaScript: 0.10.8')\n process.exit()\n}\n\nif (argv.h || argv.help) {\n liascript()\n\n console.log('-h --help show this help')\n console.log('-v --version show version information')\n console.log('-i --input input README.md file or folder (default: .)')\n console.log('-n --hostname hostname of your server (default: localhost)')\n console.log('-p --port used port number (default: 3000)')\n console.log('-l --live do live reload on file change')\n console.log('-o --open open in default browser')\n console.log('-t --test test online on https://LiaScript.github.io')\n console.log()\n console.log('-r --responsiveVoice add optional responsiveVoice support,')\n console.log(' or pass your own responsiveVoice key.')\n console.log(' Adding this feature might slow down')\n console.log(' the reloading speed.')\n console.log(' For more information visit:')\n console.log(' https://responsivevoice.org')\n\n process.exit()\n}\n\nconst port = argv.p || argv.port || 3000\nconst hostname = argv.n || argv.hostname || 'localhost'\nconst openInBrowser = argv.o || argv.open\nconst input = argv.i || argv.input || '.'\nconst liveReload = argv.l || argv.live || false\nconst testOnline = argv.t || argv.test\n\nlet responsiveVoice: string | undefined\n\nif (argv.r || argv.responsiveVoice) {\n let active = argv.r || argv.responsiveVoice\n\n if (typeof active === 'string') {\n responsiveVoice = active\n } else {\n responsiveVoice = process.env.RESPONSIVE_VOICE_KEY\n }\n}\n\nvar project = {\n path: null,\n readme: null,\n}\n\nif (input) {\n const stats = fs.lstatSync(input)\n\n // Is it a directory?\n if (stats.isDirectory()) {\n project.path = input\n } else if (stats.isFile()) {\n project.path = path.dirname(input)\n project.readme = path.basename(input)\n }\n}\n\napp.set('view engine', 'hbs')\napp.engine(\n 'hbs',\n handlebars({\n layoutsDir: path.normalize(process.env.PWD + '/views/layouts'),\n defaultLayout: 'main',\n extname: 'hbs',\n })\n)\napp.set('views', path.normalize(process.env.PWD + '/views'))\n\napp.get('/', function (req, res) {\n res.redirect('/home')\n})\n\napp.get('/home*', function (req, res) {\n const currentPath = project.path + '/' + req.params[0]\n\n const stats = fs.lstatSync(currentPath)\n\n // Is it a directory?\n if (stats.isDirectory()) {\n const files = fs.readdirSync(currentPath).filter((e) => {\n return e[0] !== '.'\n })\n\n let basePath = '/home'\n let pathNames = req.params[0].split('/').filter((e) => {\n return e !== ''\n })\n\n let paths: { name: string; href: string }[] = []\n for (let i = 0; i < pathNames.length; i++) {\n basePath += '/' + pathNames[i]\n paths.push({ name: pathNames[i], href: basePath })\n }\n\n res.render('main', {\n layout: 'index',\n path: paths,\n file: files\n .map((file) => {\n return {\n name: file,\n href: `http://${hostname}:${port}/home${req.params[0]}/${file}`,\n isDirectory: fs.lstatSync(currentPath + '/' + file).isDirectory(),\n }\n })\n .sort((a, b) => {\n if (a.isDirectory && !b.isDirectory) {\n return -1\n } else if (!a.isDirectory && b.isDirectory) {\n return 1\n } else {\n if (a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase()) {\n return -1\n } else {\n return 1\n }\n }\n return 0\n }),\n })\n } else if (stats.isFile()) {\n if (req.params[0].toLocaleLowerCase().endsWith('.md')) {\n if (testOnline) {\n res.redirect(\n `https://LiaScript.github.io/course/?http://${hostname}:${port}/${req.params[0]}`\n )\n } else {\n res.redirect(\n `/liascript/index.html?http://${hostname}:${port}/${req.params[0]}`\n )\n }\n } else {\n res.sendFile(req.params[0], { root: project.path })\n }\n } else {\n res.send('ups, something went wrong')\n }\n})\n\napp.get('/liascript/', function (req, res) {\n res.redirect('/liascript/index.html')\n})\n\napp.get('/liascript/index.html', function (req, res) {\n // ------------------------------------\n if (liveReload && responsiveVoice) {\n fs.readFile(liascriptPath + '/index.html', 'utf8', function (err, data) {\n res.send(\n data.replace(\n '</head>',\n `<script type='text/javascript' src='/reloader/reloader.js'></script>\n <script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key=${responsiveVoice}'></script>\n </head>`\n )\n )\n })\n }\n // ------------------------------------\n else if (liveReload) {\n fs.readFile(liascriptPath + '/index.html', 'utf8', function (err, data) {\n res.send(\n data.replace(\n '</head>',\n `<script type='text/javascript' src='/reloader/reloader.js'></script></head>`\n )\n )\n })\n }\n // ------------------------------------\n else if (responsiveVoice) {\n fs.readFile(liascriptPath + '/index.html', 'utf8', function (err, data) {\n res.send(\n data.replace(\n '</head>',\n `<script type='text/javascript' src='https://code.responsivevoice.org/responsivevoice.js?key=${responsiveVoice}'></script></head>`\n )\n )\n })\n }\n // ------------------------------------\n else {\n res.sendFile(liascriptPath + '/index.html')\n }\n})\n\n// load everything from the liascript folder\napp.get('/liascript/*', function (req, res) {\n res.sendFile(req.params[0], { root: liascriptPath })\n})\n// ignore this one\napp.get('/sw.js', function (req, res) {})\napp.get('/favicon.ico', function (req, res) {})\n\n// pass the reloader, to be used for live updates\napp.get('/reloader/reloader.js', function (req, res) {\n res.sendFile(reloadPath)\n})\n\n// everything else comes from the current project folder\napp.get('/*', cors(), function (req, res) {\n res.sendFile(req.originalUrl, { root: project.path })\n})\n\nlet localURL = 'http://' + hostname + ':' + port\n\nif (project.path && project.readme) {\n localURL +=\n '/liascript/index.html?http://' +\n hostname +\n ':' +\n port +\n '/' +\n project.readme\n}\n\nif (testOnline && project.readme) {\n localURL =\n 'https://LiaScript.github.io/course/?http://' +\n hostname +\n ':' +\n port +\n '/' +\n project.readme\n}\n\nliascript()\nconst server = require('reloadsh.js')(\n app,\n liveReload ? [path.join(project.path, project.readme || '')] : []\n)\n\nif (liveReload) {\n console.log(\n `✨ watching for changes on: \"${path.join(\n project.path,\n project.readme || ''\n )}\"`\n )\n}\n\nserver.on('error', (e: any) => {\n console.error('🚨 error =>', e.message)\n process.exit()\n})\n\nserver.listen(port)\n\nif (openInBrowser) {\n doOpen(localURL)\n}\n\nconsole.log('πŸ“‘ starting server')\nconsole.log(` - local: ${localURL}`)\nconsole.log(` - on your network: ${localURL.replace(localURL, ip.address())}`)\nconsole.log('✨ hit Ctrl-c to close the server')\n"],"names":[],"version":3,"file":"index.js.map"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@liascript/devserver",
3
- "version": "1.0.5--0.10.4",
3
+ "version": "1.0.6--0.10.8",
4
4
  "description": "Run a development server for LiaScript locally",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
- "build": "npx parcel build --target node --no-source-maps --log-level 4 src/index.ts",
7
+ "build": "npx parcel build src/index.ts && npm run shebang",
8
+ "shebang": "sed -i '1i #!/usr/bin/env node\\n' dist/index.js && chmod +x dist/index.js",
8
9
  "test": "echo \"Error: no test specified\" && exit 1"
9
10
  },
10
11
  "repository": {
@@ -30,28 +31,19 @@
30
31
  "author": "AndrΓ© Dietrich",
31
32
  "license": "MIT",
32
33
  "dependencies": {
33
- "@liascript/editor": "^1.1.0--0.10.4",
34
+ "@liascript/editor": "^1.1.0--0.10.8",
34
35
  "cors": "^2.8.5",
35
36
  "dotenv": "^5.0.1",
36
- "express": "^4.17.1",
37
- "express-handlebars": "^5.2.0",
37
+ "express": "^4.17.3",
38
+ "express-handlebars": "^5.3.5",
38
39
  "ip": "^1.1.5",
39
- "minimist": "^1.2.5",
40
- "open": "^7.4.0",
40
+ "minimist": "^1.2.6",
41
+ "open": "^7.4.2",
41
42
  "reloadsh.js": "^2.2.1"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@types/express": "^4.17.11",
45
- "parcel": "^1.12.4",
46
- "parcel-plugin-shebang": "^1.3.2",
47
- "typescript": "^4.1.3"
48
- },
49
- "shebang": [
50
- {
51
- "interpreter": "node",
52
- "files": [
53
- "src/index.ts"
54
- ]
55
- }
56
- ]
46
+ "parcel": "^2.4.1",
47
+ "typescript": "^4.6.3"
48
+ }
57
49
  }
package/views/main.hbs CHANGED
@@ -7,7 +7,7 @@
7
7
  | |___| | (_| |___) | (__| | | | |_) | |_
8
8
  |_____|_|\__,_|____/ \___|_| |_| .__/ \__|
9
9
  |_|
10
- [ DevServer: 1.0.5--0.10.4 ]
10
+ [ DevServer: 1.0.6--0.10.8 ]
11
11
  </pre>
12
12
  </code>
13
13
  </h4>