2 Commits c680100fe8 ... 13d0e49664

Author SHA1 Message Date
  Mathieu Lirzin 13d0e49664 build: Use 'rollup-plugin-eslint' 6 years ago
  Mathieu Lirzin 924e8488b5 Add copyright notices and copying permission statements 6 years ago
10 changed files with 137 additions and 28 deletions
  1. 12 6
      js/build-aux/rollup-kawa.js
  2. 12 6
      js/build-aux/rollup.js
  3. 2 1
      js/package.json
  4. 17 1
      js/src/actions.js
  5. 17 1
      js/src/config.js
  6. 17 1
      js/src/iframe.js
  7. 26 10
      js/src/index.js
  8. 17 1
      js/src/main.js
  9. 17 1
      js/src/reducers.js
  10. 0 0
      js/src/sidebar.js

+ 12 - 6
js/build-aux/rollup-kawa.js

@@ -1,12 +1,18 @@
 /* Rollup plugins.  */
-import buble from 'rollup-plugin-buble';
+import buble from "rollup-plugin-buble";
+import eslint from "rollup-plugin-eslint";
 
 export default {
-  entry: 'src/index.js',
-  dest: 'examples/kawa/kawa-ebook.js',
-  format: 'iife',
-  sourceMap: 'inline',
+  entry: "src/index.js",
+  dest: "examples/kawa/kawa-ebook.js",
+  format: "iife",
+  sourceMap: "inline",
   plugins: [
-    buble()
+    eslint ({
+      configFile: "build-aux/eslint.json",
+      formatter: "unix",
+      include: "src/*"
+    }),
+    buble ()
   ]
 };

+ 12 - 6
js/build-aux/rollup.js

@@ -1,12 +1,18 @@
 /* Rollup plugins.  */
-import buble from 'rollup-plugin-buble';
+import buble from "rollup-plugin-buble";
+import eslint from "rollup-plugin-eslint";
 
 export default {
-  entry: 'src/index.js',
-  dest: 'build/info.js',
-  format: 'iife',
-  sourceMap: 'inline',
+  entry: "src/index.js",
+  dest: "build/info.js",
+  format: "iife",
+  sourceMap: "inline",
   plugins: [
-    buble()
+    eslint ({
+      configFile: "build-aux/eslint.json",
+      formatter: "unix",
+      include: "src/*"
+    }),
+    buble ()
   ]
 };

+ 2 - 1
js/package.json

@@ -18,7 +18,8 @@
     "buble": "^0.15.2",
     "eslint": "^3.19.0",
     "rollup": "^0.41.6",
-    "rollup-plugin-buble": "^0.15.0"
+    "rollup-plugin-buble": "^0.15.0",
+    "rollup-plugin-eslint": "^3.0.0"
   },
   "scripts": {
     "build": "rollup --config build-aux/rollup.js",

+ 17 - 1
js/src/actions.js

@@ -1,4 +1,20 @@
-/* actions.js - Actions to dispatch */
+/* actions.js - Actions to dispatch
+   Copyright © 2017 Free Software Foundation, Inc.
+
+   This file is part of GNU Texinfo.
+
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
 
 export const LOAD_PAGE = "load-page";
 

+ 17 - 1
js/src/config.js

@@ -1,4 +1,20 @@
-/* config.js - Define constants */
+/* config.js - Define constants
+   Copyright © 2017 Free Software Foundation, Inc.
+
+   This file is part of GNU Texinfo.
+
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
 
 export default {
   TOC_FILENAME: "ToC.xhtml",

+ 17 - 1
js/src/iframe.js

@@ -1,4 +1,20 @@
-/* iframe.js - Module for iframe containing sub pages */
+/* iframe.js - Handle iframed pages
+   Copyright © 2017 Free Software Foundation, Inc.
+
+   This file is part of GNU Texinfo.
+
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
 
 import * as actions from "./actions";
 import { basename, navigation_links } from "./utils";

+ 26 - 10
js/src/index.js

@@ -1,16 +1,32 @@
-/* index.js - global entry point */
+/* index.js - Global entry point
+   Copyright © 2017 Free Software Foundation, Inc.
 
-/* Depending on the role of the document launching this script, different
-   event handlers are registered.  This script can be used in the context of:
+   This file is part of GNU Texinfo.
 
-   - the index page of the manual which manages the state of the application
-   - the iframe which contains the lateral table of content
-   - other iframes which contain other pages of the manual
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-  This is done to allow referencing the same script inside every HTML page.
-  This has the benefits of reducing the number of HTTP requests required to
-  fetch the Javascript code and simplifying the work of the Texinfo HTML
-  converter.  */
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/** Depending on the role of the document launching this script, different
+    event handlers are registered.  This script can be used in the context of:
+
+    - the index page of the manual which manages the state of the application
+    - the iframe which contains the lateral table of content
+    - other iframes which contain other pages of the manual
+
+    This is done to allow referencing the same script inside every HTML page.
+    This has the benefits of reducing the number of HTTP requests required to
+    fetch the Javascript code and simplifying the work of the Texinfo HTML
+    converter.  */
 
 import "./polyfill";
 import * as main from "./main";

+ 17 - 1
js/src/main.js

@@ -1,4 +1,20 @@
-/* main.js - Entry point for the index page  */
+/* main.js - Handle the index page
+   Copyright © 2017 Free Software Foundation, Inc.
+
+   This file is part of GNU Texinfo.
+
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
 
 import * as actions from "./actions";
 import { Pages } from "./iframe";

+ 17 - 1
js/src/reducers.js

@@ -1,4 +1,20 @@
-/* reducers.js - Reducers to handle actions */
+/* reducers.js - Actions handlers that return a new state
+   Copyright © 2017 Free Software Foundation, Inc.
+
+   This file is part of GNU Texinfo.
+
+   GNU Texinfo is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Texinfo is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.  */
 
 import {
   CACHE_LINKS,

+ 0 - 0
js/src/sidebar.js


Some files were not shown because too many files changed in this diff