mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Inline all JavaScript when Vulcanizing.
Removes RequireJS dependency, and means no JS files need to be shipped.
This commit is contained in:
@@ -39,7 +39,6 @@ LOOT's UI relies on a few web libraries:
|
||||
* [Jed](https://github.com/SlexAxton/Jed)
|
||||
* [Jed Gettext Parser](https://github.com/WrinklyNinja/jed-gettext-parser)
|
||||
* [Marked](https://github.com/chjj/marked)
|
||||
* [RequireJS](http://requirejs.org/)
|
||||
|
||||
These dependencies are most easily managed using [Bower](http://bower.io/), and are built for distribution using [Vulcanize](https://github.com/Polymer/vulcanize).
|
||||
|
||||
|
||||
@@ -514,8 +514,7 @@ var {
|
||||
<a href="https://github.com/WrinklyNinja/libloadorder">libloadorder</a>,
|
||||
<a href="https://github.com/chjj/marked">Marked</a>,
|
||||
<a href="https://github.com/WrinklyNinja/pseudosem">pseudosem</a>,
|
||||
<a href="https://www.polymer-project.org/">Polymer</a>,
|
||||
<a href="http://requirejs.org">RequireJS</a> and
|
||||
<a href="https://www.polymer-project.org/">Polymer</a> and
|
||||
<a href="https://github.com/WrinklyNinja/yaml-cpp">yaml-cpp</a> libraries, and the <a href="https://bitbucket.org/chromiumembedded/cef">Chromium Embedded Framework</a>. Copyright license information for all these may be found <a href="licenses/Licenses.txt">here</a>.
|
||||
|
||||
<h2 id="license">License</h2>
|
||||
|
||||
@@ -12,7 +12,6 @@ LOOT uses a number of libraries, and their licenses are listed in this file.
|
||||
* Marked - MIT License; see "MIT License (Marked).txt" for the text.
|
||||
* Pseudosem - MIT License; see "MIT License (Pseudosem).txt" for the text.
|
||||
* Polymer - BSD license; see "BSD License (Polymer).txt" for the text.
|
||||
* RequireJS - MIT License; see "MIT License (RequireJS).txt" for the text.
|
||||
* yaml-cpp - MIT License; see "MIT License (yaml-cpp).txt" for the text.
|
||||
|
||||
Source code for all libraries and binaries can be found on the websites linked to in the main LOOT readme.
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
RequireJS is released under two licenses: new BSD, and MIT. You may pick the
|
||||
license that best suits your development needs. The text of both licenses are
|
||||
provided below.
|
||||
|
||||
|
||||
The "New" BSD License:
|
||||
----------------------
|
||||
|
||||
Copyright (c) 2010-2014, The Dojo Foundation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the Dojo Foundation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
Copyright (c) 2010-2013, The Dojo Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -28,7 +28,6 @@
|
||||
"paper-menu-button": "Polymer/paper-menu-button#~0.5.0",
|
||||
"Jed": "SlexAxton/Jed#a9d03e1bbca9211a8b29a93a298a7ee9ddb353f0",
|
||||
"marked": "~0.3.2",
|
||||
"requirejs": "jrburke/requirejs-bower#~2.1.15",
|
||||
"paper-progress": "Polymer/paper-progress#~0.5.0",
|
||||
"core-pages": "Polymer/core-pages#~0.5.1",
|
||||
"paper-toast": "Polymer/paper-toast#~0.5.1",
|
||||
|
||||
+10
-15
@@ -184,21 +184,16 @@ window.addEventListener('polymer-ready', function(e) {
|
||||
/* Set the plugin list's scroll target to its parent. */
|
||||
document.getElementById('main').lastElementChild.scrollTarget = document.getElementById('main');
|
||||
|
||||
require(['bower_components/marked/lib/marked', 'js/l10n', 'js/plugin', 'js/helpers', 'js/loot', 'js/filters', 'js/events'], function(markedResponse, l10nResponse) {
|
||||
/* Register object observers. */
|
||||
Object.observe(loot, loot.observer);
|
||||
Object.observe(loot.game, loot.gameObserver);
|
||||
|
||||
/* Register object observers. */
|
||||
Object.observe(loot, loot.observer);
|
||||
Object.observe(loot.game, loot.gameObserver);
|
||||
|
||||
marked = markedResponse;
|
||||
l10n = l10nResponse;
|
||||
/* Make sure settings are what I want. */
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
tables: true,
|
||||
sanitize: true
|
||||
});
|
||||
setupEventHandlers();
|
||||
initVars();
|
||||
/* Make sure settings are what I want. */
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
tables: true,
|
||||
sanitize: true
|
||||
});
|
||||
setupEventHandlers();
|
||||
initVars();
|
||||
}, false);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
define(['bower_components/Jed/jed', 'bower_components/jed-gettext-parser/jedGettextParser'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
root.amdWeb = factory(root.jed, root.jedGettextParser);
|
||||
root.l10n = factory(root.Jed, root.jedGettextParser);
|
||||
}
|
||||
}(this, function (jed, jedGettextParser) {
|
||||
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
<link rel="import" href="bower_components/paper-progress/paper-progress.html">
|
||||
<link rel="import" href="bower_components/paper-toast/paper-toast.html">
|
||||
<link rel="import" href="bower_components/paper-toggle-button/paper-toggle-button.html">
|
||||
|
||||
<script src="bower_components/requirejs/require.js"></script>
|
||||
</head>
|
||||
<!-- oncontextmenu attribute disables the right-click menu. -->
|
||||
<body oncontextmenu="return false" unresolved fullbleed vertical layout >
|
||||
@@ -314,5 +312,14 @@
|
||||
<p>LOOT is free, but if you want to show your appreciation with some money, donations may be made to WrinklyNinja (LOOT's creator and main developer) using <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDR3YBGGYCLBG">PayPal</a>, <a href="https://wrinklyninja.github.io/bitcoin/">Bitcoin</a> or <a href="https://flattr.com/submit/auto?user_id=OliverHamlet&url=https://wrinklyninja.github.io&title=LOOT">Flattr</a>.</p>
|
||||
<paper-button affirmative autofocus>OK</paper-button>
|
||||
</loot-dialog>
|
||||
<script src="bower_components/marked/lib/marked.js"></script>
|
||||
<script src="bower_components/Jed/jed.js"></script>
|
||||
<script src="bower_components/jed-gettext-parser/jedGettextParser.js"></script>
|
||||
<script src="js/l10n.js"></script>
|
||||
<script src="js/plugin.js"></script>
|
||||
<script src="js/helpers.js"></script>
|
||||
<script src="js/loot.js"></script>
|
||||
<script src="js/filters.js"></script>
|
||||
<script src="js/events.js"></script>
|
||||
<script src="js/init.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -148,23 +148,10 @@ def createAppArchive(archive_path):
|
||||
|
||||
# UI files.
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report') )
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report', 'bower_components', 'marked', 'lib') )
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report', 'bower_components', 'Jed') )
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report', 'bower_components', 'jed-gettext-parser') )
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
os.makedirs( os.path.join(temp_path, 'resources', 'report', 'css') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'index.html'), os.path.join(temp_path, 'resources', 'report') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'bower_components', 'marked', 'lib', 'marked.js'), os.path.join(temp_path, 'resources', 'report', 'bower_components', 'marked', 'lib') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'bower_components', 'Jed', 'jed.js'), os.path.join(temp_path, 'resources', 'report', 'bower_components', 'Jed') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'bower_components', 'jed-gettext-parser', 'jedGettextParser.js'), os.path.join(temp_path, 'resources', 'report', 'bower_components', 'jed-gettext-parser') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'css', 'dark-theme.css'), os.path.join(temp_path, 'resources', 'report', 'css') )
|
||||
shutil.copytree( os.path.join('..', 'resources', 'report', 'fonts'), os.path.join(temp_path, 'resources', 'report', 'fonts') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'events.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'filters.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'helpers.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'l10n.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'loot.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
shutil.copy( os.path.join('..', 'resources', 'report', 'js', 'plugin.js'), os.path.join(temp_path, 'resources', 'report', 'js') )
|
||||
|
||||
# Docs.
|
||||
shutil.copytree( os.path.join('..', 'docs', 'images'), os.path.join(temp_path, 'docs', 'images') )
|
||||
|
||||
@@ -103,26 +103,8 @@ DestDir: "{app}\docs\images"; Flags: ignoreversion
|
||||
|
||||
Source: "resources\report\index.html"; \
|
||||
DestDir: "{app}\resources\report"; Flags: ignoreversion
|
||||
Source: "resources\report\bower_components\marked\lib\marked.js"; \
|
||||
DestDir: "{app}\resources\report\bower_components\marked\lib"; Flags: ignoreversion
|
||||
Source: "resources\report\bower_components\Jed\jed.js"; \
|
||||
DestDir: "{app}\resources\report\bower_components\Jed"; Flags: ignoreversion
|
||||
Source: "resources\report\bower_components\jed-gettext-parser\jedGettextParser.js"; \
|
||||
DestDir: "{app}\resources\report\bower_components\jed-gettext-parser"; Flags: ignoreversion
|
||||
Source: "resources\report\css\dark-theme.css"; \
|
||||
DestDir: "{app}\resources\report\css"; Flags: ignoreversion
|
||||
Source: "resources\report\js\events.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\js\filters.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\js\helpers.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\js\l10n.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\js\loot.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\js\plugin.js"; \
|
||||
DestDir: "{app}\resources\report\js"; Flags: ignoreversion
|
||||
Source: "resources\report\fonts\*"; \
|
||||
DestDir: "{app}\resources\report\fonts"; Flags: ignoreversion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user