mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 22:16:00 -04:00
Improves build process.
This commit is contained in:
parent
a99c28f234
commit
a6a95780da
7 changed files with 29 additions and 110 deletions
|
@ -98,7 +98,7 @@ module.exports = function (make) {
|
||||||
make.target('lint', [], 'lint all JavaScript files with JSHint')
|
make.target('lint', [], 'lint all JavaScript files with JSHint')
|
||||||
.sync(function () {
|
.sync(function () {
|
||||||
|
|
||||||
$(src + '/_h5ai/js: **/*.js, ! *.min.js, ! inc/lib/**')
|
$(src + '/_h5ai/js: **/*.js, ! lib/**')
|
||||||
.jshint(jshint);
|
.jshint(jshint);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ modulejs.define('core/event', ['amplify'], function (amplify) {
|
||||||
|
|
||||||
pub = function (topic, data) {
|
pub = function (topic, data) {
|
||||||
|
|
||||||
console.log('EVENT PUB', topic, data);
|
// console.log('EVENT PUB', topic, data);
|
||||||
amplify.publish(topic, data);
|
amplify.publish(topic, data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
|
|
||||||
(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
|
|
||||||
// @include "core/ajax.js"
|
|
||||||
// @include "core/entry.js"
|
|
||||||
// @include "core/event.js"
|
|
||||||
// @include "core/format.js"
|
|
||||||
// @include "core/langs.js"
|
|
||||||
// @include "core/parser.js"
|
|
||||||
// @include "core/refresh.js"
|
|
||||||
// @include "core/resource.js"
|
|
||||||
// @include "core/settings.js"
|
|
||||||
// @include "core/store.js"
|
|
||||||
// @include "core/types.js"
|
|
||||||
|
|
||||||
// @include "model/entry.js"
|
|
||||||
|
|
||||||
// @include "parser/apache-autoindex.js"
|
|
||||||
// @include "parser/generic-json.js"
|
|
||||||
|
|
||||||
// @include "view/extended.js"
|
|
||||||
// @include "view/spacing.js"
|
|
||||||
// @include "view/viewmode.js"
|
|
||||||
|
|
||||||
// @include "ext/autorefresh.js"
|
|
||||||
// @include "ext/crumb.js"
|
|
||||||
// @include "ext/custom.js"
|
|
||||||
// @include "ext/delete.js"
|
|
||||||
// @include "ext/download.js"
|
|
||||||
// @include "ext/dropbox.js"
|
|
||||||
// @include "ext/filter.js"
|
|
||||||
// @include "ext/folderstatus.js"
|
|
||||||
// @include "ext/google-analytics.js"
|
|
||||||
// @include "ext/l10n.js"
|
|
||||||
// @include "ext/link-hover-states.js"
|
|
||||||
// @include "ext/mode.js"
|
|
||||||
// @include "ext/preview-img.js"
|
|
||||||
// @include "ext/preview-txt.js"
|
|
||||||
// @include "ext/qrcode.js"
|
|
||||||
// @include "ext/select.js"
|
|
||||||
// @include "ext/sort.js"
|
|
||||||
// @include "ext/statusbar.js"
|
|
||||||
// @include "ext/thumbnails.js"
|
|
||||||
// @include "ext/title.js"
|
|
||||||
// @include "ext/tree.js"
|
|
||||||
|
|
||||||
// @include "h5ai-info.js"
|
|
||||||
// @include "h5ai-main.js"
|
|
||||||
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
/*global H5AI_CONFIG, amplify, Base64, jQuery, Modernizr, moment, _ */
|
|
||||||
|
|
||||||
// Register predefined globals on doc ready, so the script order inside
|
|
||||||
// the document doesn't matter. `jQuery`, `moment` and `underscore` are
|
|
||||||
// itself functions, so they have to be wrapped to not be handled as
|
|
||||||
// constructors.
|
|
||||||
modulejs.define('config', H5AI_CONFIG);
|
|
||||||
modulejs.define('amplify', amplify);
|
|
||||||
modulejs.define('base64', Base64);
|
|
||||||
modulejs.define('$', function () { return jQuery; });
|
|
||||||
modulejs.define('modernizr', Modernizr);
|
|
||||||
modulejs.define('moment', function () { return moment; });
|
|
||||||
modulejs.define('_', function () { return _; });
|
|
||||||
|
|
||||||
modulejs.require($('body').attr('id'));
|
|
||||||
});
|
|
||||||
|
|
||||||
}(jQuery));
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
// @include "lib/markdown-0.4.0.js"
|
// @include "lib/markdown-*.js"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
// @include "lib/modernizr-2.6.1.min.js"
|
// @include "lib/modernizr-*.js"
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
|
|
||||||
// jQuery libs
|
// jQuery libs
|
||||||
// -----------
|
// -----------
|
||||||
// @include "lib/jquery-1.8.0.min.js"
|
// @include "lib/jquery-*.js"
|
||||||
// @include "lib/jquery.filedrop-0.1.0.js"
|
// @include "lib/jquery.*.js"
|
||||||
// @include "lib/jquery.fracs-0.11.min.js"
|
|
||||||
// @include "lib/jquery.mousewheel-3.0.6.js"
|
|
||||||
// @include "lib/jquery.qrcode-0.2.min.js"
|
|
||||||
// @include "lib/jquery.scrollpanel-0.1.min.js"
|
|
||||||
|
|
||||||
// other libs
|
// other libs
|
||||||
// ----------
|
// ----------
|
||||||
|
@ -20,4 +16,25 @@
|
||||||
|
|
||||||
// h5ai
|
// h5ai
|
||||||
// ----
|
// ----
|
||||||
// @include "inc/main.js"
|
(function ($) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// @include "inc/**/*.js"
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
/*global H5AI_CONFIG, amplify, Base64, jQuery, Modernizr, moment, _ */
|
||||||
|
|
||||||
|
// `jQuery`, `moment` and `underscore` are itself functions,
|
||||||
|
// so they have to be wrapped to not be handled as constructors.
|
||||||
|
modulejs.define('config', H5AI_CONFIG);
|
||||||
|
modulejs.define('amplify', amplify);
|
||||||
|
modulejs.define('base64', Base64);
|
||||||
|
modulejs.define('$', function () { return jQuery; });
|
||||||
|
modulejs.define('modernizr', Modernizr);
|
||||||
|
modulejs.define('moment', function () { return moment; });
|
||||||
|
modulejs.define('_', function () { return _; });
|
||||||
|
|
||||||
|
modulejs.require($('body').attr('id'));
|
||||||
|
});
|
||||||
|
|
||||||
|
}(jQuery));
|
||||||
|
|
|
@ -1,30 +1,3 @@
|
||||||
|
|
||||||
// @include "lib/sh/shCore.js"
|
// @include "lib/sh/shCore.js"
|
||||||
// @-include "lib/sh/shLegacy.js"
|
// @include "lib/sh/shBrush*.js"
|
||||||
// @-include "lib/sh/shAutoloader.js"
|
|
||||||
|
|
||||||
// @include "lib/sh/shBrushAS3.js"
|
|
||||||
// @include "lib/sh/shBrushAppleScript.js"
|
|
||||||
// @include "lib/sh/shBrushBash.js"
|
|
||||||
// @include "lib/sh/shBrushCSharp.js"
|
|
||||||
// @include "lib/sh/shBrushColdFusion.js"
|
|
||||||
// @include "lib/sh/shBrushCpp.js"
|
|
||||||
// @include "lib/sh/shBrushCss.js"
|
|
||||||
// @include "lib/sh/shBrushDelphi.js"
|
|
||||||
// @include "lib/sh/shBrushDiff.js"
|
|
||||||
// @include "lib/sh/shBrushErlang.js"
|
|
||||||
// @include "lib/sh/shBrushGroovy.js"
|
|
||||||
// @include "lib/sh/shBrushJScript.js"
|
|
||||||
// @include "lib/sh/shBrushJava.js"
|
|
||||||
// @include "lib/sh/shBrushJavaFX.js"
|
|
||||||
// @include "lib/sh/shBrushPerl.js"
|
|
||||||
// @include "lib/sh/shBrushPhp.js"
|
|
||||||
// @include "lib/sh/shBrushPlain.js"
|
|
||||||
// @include "lib/sh/shBrushPowerShell.js"
|
|
||||||
// @include "lib/sh/shBrushPython.js"
|
|
||||||
// @include "lib/sh/shBrushRuby.js"
|
|
||||||
// @include "lib/sh/shBrushSass.js"
|
|
||||||
// @include "lib/sh/shBrushScala.js"
|
|
||||||
// @include "lib/sh/shBrushSql.js"
|
|
||||||
// @include "lib/sh/shBrushVb.js"
|
|
||||||
// @include "lib/sh/shBrushXml.js"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue