1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00

switched to ECMAScript modules

This commit is contained in:
Falk Werner 2019-02-20 20:23:56 +01:00
parent 2f6dc13f76
commit f22a1dfd5e
7 changed files with 12 additions and 17 deletions

View File

@ -3,11 +3,7 @@
<title>LWS Example</title> <title>LWS Example</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style/main.css"> <link rel="stylesheet" type="text/css" href="style/main.css">
<script type="text/javascript" src="js/connection.js"></script> <script type="module" src="js/startup.js"></script>
<script type="text/javascript" src="js/connection_view.js"></script>
<script type="text/javascript" src="js/filesystem.js"></script>
<script type="text/javascript" src="js/filesystem_handler.js"></script>
<script type="text/javascript" src="js/startup.js"></script>
</head> </head>
<body> <body>

View File

@ -9,7 +9,8 @@ module.exports = {
"SharedArrayBuffer": "readonly" "SharedArrayBuffer": "readonly"
}, },
"parserOptions": { "parserOptions": {
"ecmaVersion": 2018 "ecmaVersion": 2018,
"sourceType": "module"
}, },
"rules": { "rules": {
"accessor-pairs": "error", "accessor-pairs": "error",

View File

@ -1,6 +1,4 @@
/* exported Connection */ export class Connection {
class Connection {
constructor() { constructor() {
this.ws = null; this.ws = null;

View File

@ -1,6 +1,4 @@
/* exported ConnectionView */ export class ConnectionView {
class ConnectionView {
constructor(connection) { constructor(connection) {
this.connection = connection; this.connection = connection;
this.connection.onclose = () => { this.onConnectionClosed(); }; this.connection.onclose = () => { this.onConnectionClosed(); };

View File

@ -1,7 +1,6 @@
/* exported FileSystem */
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ /* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */
class FileSystem { export class FileSystem {
static get GOOD() { return 0; } static get GOOD() { return 0; }
static get BAD() { return 1; } static get BAD() { return 1; }

View File

@ -1,7 +1,6 @@
/* exported FileSystemHandler */
/* eslint no-console: "off" */ /* eslint no-console: "off" */
class FileSystemHandler { export class FileSystemHandler {
constructor(filesystem, connection) { constructor(filesystem, connection) {
this._fs = filesystem; this._fs = filesystem;

View File

@ -1,4 +1,8 @@
/* global Connection, ConnectionView, FileSystem, FileSystemHandler */ import { Connection } from "./connection.js";
import { ConnectionView } from "./connection_view.js";
import { FileSystem } from "./filesystem.js";
import { FileSystemHandler } from "./filesystem_handler.js";
function mode(value) { function mode(value) {
return parseInt(value, 8); return parseInt(value, 8);