RequireJS optimizer
This commit is contained in:
parent
22e1f8c77f
commit
ff7e08b2bc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
chrome-app*
|
||||
.project
|
||||
.settings
|
||||
node_modules
|
||||
|
||||
|
@ -1 +1 @@
|
||||
CACHE MANIFEST
# v35
CACHE:
index.html
css/bootstrap.css
css/jgrowl.css
css/main.css
js/async-runner.js
js/bootstrap.js
js/config.js
js/core.js
js/custo.github.js
js/dropbox-helper.js
js/github-helper.js
js/google-helper.js
js/jgrowl.js
js/jquery.js
js/jquery-ui.js
js/layout.js
js/main.js
js/Markdown.Converter.js
js/Markdown.Editor.js
js/Markdown.Sanitizer.js
js/publisher.js
js/require.js
js/synchronizer.js
js/underscore-min.js
img/ajax-loader.gif
img/glyphicons-halflings.png
img/glyphicons-halflings-white.png
img/icons.png
img/stackedit-32.ico
img/stackedit-promo.png
NETWORK:
*
|
||||
CACHE MANIFEST
# v35
CACHE:
index.html
css/bootstrap.css
css/jgrowl.css
css/main.css
js/main-min.js
js/require.js
NETWORK:
*
|
||||
|
16
index.html
16
index.html
@ -12,7 +12,14 @@
|
||||
<meta name="author" content="Benoit Schweblin">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="css/main.css" rel="stylesheet" media="screen">
|
||||
<script data-main="js/main" src="js/require.js"></script>
|
||||
<script>
|
||||
var dep = "main-min";
|
||||
if (location.search.indexOf("debug") !== -1) {
|
||||
dep = "main";
|
||||
}
|
||||
var require = { baseUrl : "js", deps : [ dep ] };
|
||||
</script>
|
||||
<script src="js/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar" class="navbar navbar-fixed-top ui-layout-north">
|
||||
@ -463,16 +470,15 @@
|
||||
<dd>
|
||||
<a target="_blank" href="http://jquery.com/">jQuery</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a target="_blank" href="http://layout.jquery-dev.net/">jQuery
|
||||
UI Layout</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a target="_blank" href="https://code.google.com/p/pagedown/">PageDown</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a target="_blank" href="http://requirejs.org/">RequireJS</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a target="_blank" href="http://layout.jquery-dev.net/">UI Layout</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Copyright 2013 <a target="_blank"
|
||||
href="http://www.benoitschweblin.com">Benoit Schweblin</a><br />
|
||||
|
15
js/config.js
15
js/config.js
@ -24,3 +24,18 @@ function runDelayedFunction() {
|
||||
delayedFunction();
|
||||
}
|
||||
}
|
||||
|
||||
// Site dependent
|
||||
var BASE_URL = "http://localhost/";
|
||||
var GOOGLE_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";
|
||||
var GOOGLE_CLIENT_ID = '241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com';
|
||||
var GITHUB_CLIENT_ID = 'e47fef6055344579799d';
|
||||
var GATEKEEPER_URL = "http://stackedit-gatekeeper-localhost.herokuapp.com/";
|
||||
|
||||
if(location.hostname.indexOf("benweet.github.io") === 0) {
|
||||
BASE_URL = "http://benweet.github.io/stackedit/";
|
||||
GOOGLE_KEY = "AIzaSyB1Bc1wI_YUWkkOR-5Gri5BFuypgZl0Sxc";
|
||||
GOOGLE_CLIENT_ID = '241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com';
|
||||
GITHUB_CLIENT_ID = 'fa0d09514da8377ee32e';
|
||||
GATEKEEPER_URL = "http://stackedit-gatekeeper.herokuapp.com/";
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
define(
|
||||
[ "jquery", "file-manager", "google-helper", "dropbox-helper",
|
||||
"github-helper", "synchronizer", "publisher", "async-runner",
|
||||
"bootstrap", "jgrowl", "layout", "Markdown.Editor", "config", "custo" ],
|
||||
"bootstrap", "jgrowl", "layout", "Markdown.Editor", "config",
|
||||
"underscore-min" ],
|
||||
function($, fileManager, googleHelper, dropboxHelper, githubHelper,
|
||||
synchronizer, publisher, asyncTaskRunner) {
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
var BASE_URL = "http://benweet.github.io/stackedit/";
|
||||
var GOOGLE_KEY = "AIzaSyB1Bc1wI_YUWkkOR-5Gri5BFuypgZl0Sxc";
|
||||
var GOOGLE_CLIENT_ID = '241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com';
|
||||
var GITHUB_CLIENT_ID = 'fa0d09514da8377ee32e';
|
||||
var GATEKEEPER_URL = "http://stackedit-gatekeeper.herokuapp.com/";
|
@ -1,5 +0,0 @@
|
||||
var BASE_URL = "http://localhost/";
|
||||
var GOOGLE_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";
|
||||
var GOOGLE_CLIENT_ID = '241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com';
|
||||
var GITHUB_CLIENT_ID = 'e47fef6055344579799d';
|
||||
var GATEKEEPER_URL = "http://stackedit-gatekeeper-localhost.herokuapp.com/";
|
@ -25,7 +25,7 @@ define(["jquery", "async-runner"], function($, asyncTaskRunner) {
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url : "lib/dropbox.js",
|
||||
url : "lib/dropbox.min.js",
|
||||
dataType : "script", timeout : AJAX_TIMEOUT
|
||||
}).done(function() {
|
||||
asyncTask.success();
|
||||
|
485
js/main-min.js
vendored
Normal file
485
js/main-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,13 +1,6 @@
|
||||
// Use specific customization for sites
|
||||
var configPaths = {};
|
||||
if(location.hostname.indexOf("benweet.github.") === 0) {
|
||||
configPaths.custo = 'custo.github';
|
||||
}
|
||||
|
||||
// RequireJS configuration
|
||||
requirejs.config({
|
||||
waitSeconds: 0,
|
||||
paths: configPaths,
|
||||
shim: {
|
||||
'jquery-ui': ['jquery'],
|
||||
'bootstrap': ['jquery'],
|
||||
|
5
lib/dropbox.min.js
vendored
Normal file
5
lib/dropbox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
optimize.json
Normal file
8
optimize.json
Normal file
@ -0,0 +1,8 @@
|
||||
// RequireJS optimizer configuration file
|
||||
// Usage: node r.js -o optimize.json
|
||||
({
|
||||
baseUrl: "js",
|
||||
name: "main",
|
||||
out: "js/main-min.js",
|
||||
mainConfigFile: 'js/main.js'
|
||||
})
|
Loading…
Reference in New Issue
Block a user