mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Change paths.
This commit is contained in:
parent
c6b8beabd3
commit
1a1f222221
4 changed files with 13 additions and 13 deletions
|
@ -13,9 +13,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||||
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
||||||
*/
|
*/
|
||||||
args.app.get(/^\/minified\/plugins\/([^\/]+)\/static\/(.*)/, function(req, res, next) {
|
args.app.get(/^\/javascripts\/lib\/([^\/]+)\/static\/(.*)/, function(req, res, next) {
|
||||||
var plugin_name = req.params[0];
|
var plugin_name = req.params[0];
|
||||||
var modulePath = req.url.split("?")[0].substr("/minified/plugins/".length);
|
var modulePath = req.url.split("?")[0].substr("/javascripts/lib/".length);
|
||||||
var fullPath = require.resolve(modulePath);
|
var fullPath = require.resolve(modulePath);
|
||||||
|
|
||||||
if (plugins.plugins[plugin_name] == undefined) {
|
if (plugins.plugins[plugin_name] == undefined) {
|
||||||
|
@ -35,7 +35,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
|
|
||||||
// Cache both minified and static.
|
// Cache both minified and static.
|
||||||
var assetCache = new CachingMiddleware;
|
var assetCache = new CachingMiddleware;
|
||||||
args.app.all('/(minified|static)/*', assetCache.handle);
|
args.app.all('/(javascripts|static)/*', assetCache.handle);
|
||||||
|
|
||||||
// Minify will serve static files compressed (minify enabled). It also has
|
// Minify will serve static files compressed (minify enabled). It also has
|
||||||
// file-specific hacks for ace/require-kernel/etc.
|
// file-specific hacks for ace/require-kernel/etc.
|
||||||
|
@ -44,7 +44,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
// Setup middleware that will package JavaScript files served by minify for
|
// Setup middleware that will package JavaScript files served by minify for
|
||||||
// CommonJS loader on the client-side.
|
// CommonJS loader on the client-side.
|
||||||
var jsServer = new (Yajsml.Server)({
|
var jsServer = new (Yajsml.Server)({
|
||||||
rootPath: 'minified/'
|
rootPath: 'javascripts/src/'
|
||||||
, rootURI: 'http://localhost:' + settings.port + '/static/js/'
|
, rootURI: 'http://localhost:' + settings.port + '/static/js/'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ function Ace2Editor()
|
||||||
}
|
}
|
||||||
function pushRequireScriptTo(buffer) {
|
function pushRequireScriptTo(buffer) {
|
||||||
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
||||||
var KERNEL_BOOT = 'require.setRootURI("../minified/");\nrequire.setLibraryURI("../minified/plugins/");\nrequire.setGlobalKeyPath("require");'
|
var KERNEL_BOOT = 'require.setRootURI("../javascripts/src");\nrequire.setLibraryURI("../javascripts/lib");\nrequire.setGlobalKeyPath("require");'
|
||||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
||||||
|
@ -166,8 +166,8 @@ function Ace2Editor()
|
||||||
}
|
}
|
||||||
function pushScriptsTo(buffer) {
|
function pushScriptsTo(buffer) {
|
||||||
/* Folling is for packaging regular expression. */
|
/* Folling is for packaging regular expression. */
|
||||||
/* $$INCLUDE_JS("../minified/plugins/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define"); */
|
/* $$INCLUDE_JS("../javascripts/src/ace2_inner.js?callback=require.define"); */
|
||||||
var ACE_SOURCE = '../minified/plugins/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define';
|
var ACE_SOURCE = '../javascripts/src/ace2_inner.js?callback=require.define';
|
||||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) {
|
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) {
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]);
|
buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]);
|
||||||
|
|
|
@ -260,12 +260,12 @@
|
||||||
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
||||||
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
||||||
<script type="text/javascript" src="../minified/plugins/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
require.setRootURI("../minified/");
|
require.setRootURI("../javascripts/src");
|
||||||
require.setLibraryURI("../minified/plugins/");
|
require.setLibraryURI("../javascripts/lib");
|
||||||
require.setGlobalKeyPath("require");
|
require.setGlobalKeyPath("require");
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
||||||
|
|
|
@ -200,13 +200,13 @@
|
||||||
<script type="text/javascript" src="../../../static/js/require-kernel.js"></script>
|
<script type="text/javascript" src="../../../static/js/require-kernel.js"></script>
|
||||||
<script type="text/javascript" src="../../../static/js/jquery.js"></script>
|
<script type="text/javascript" src="../../../static/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="../../../socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="../../../socket.io/socket.io.js"></script>
|
||||||
<script type="text/javascript" src="../../../minified/plugins/ep_etherpad-lite/static/js/timeslider.js?callback=require.define"></script>
|
<script type="text/javascript" src="../../../javascripts/lib/ep_etherpad-lite/static/js/timeslider.js?callback=require.define"></script>
|
||||||
<script type="text/javascript" src="../../../static/custom/timeslider.js"></script>
|
<script type="text/javascript" src="../../../static/custom/timeslider.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
require.setRootURI("../../../minified/");
|
require.setRootURI("../../../javascripts/src");
|
||||||
require.setLibraryURI("../../../minified/plugins/");
|
require.setLibraryURI("../../../javascripts/lib");
|
||||||
require.setGlobalKeyPath("require");
|
require.setGlobalKeyPath("require");
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
||||||
|
|
Loading…
Reference in a new issue