mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fold the absolute-url package into the meteor package
This commit is contained in:
@@ -28,6 +28,7 @@ put on the screen.
|
||||
});
|
||||
}
|
||||
|
||||
{{> api_box absoluteUrl}}
|
||||
|
||||
<h2 id="publishandsubscribe"><span>Publish and subscribe</span></h2>
|
||||
|
||||
|
||||
@@ -24,6 +24,33 @@ Template.api.startup = {
|
||||
]
|
||||
};
|
||||
|
||||
Template.api.absoluteUrl = {
|
||||
id: "meteor_absoluteUrl",
|
||||
name: "Meteor.absoluteUrl([path], [options])",
|
||||
locus: "Anywhere",
|
||||
descr: ["Generate an absolute URL pointing to the application. The server "
|
||||
+ "reads from the `ROOT_URL` environment variable to determine "
|
||||
+ "where it is running. This is taken care of automatically for "
|
||||
+ "apps deployed with `meteor deploy`, but must be provided when "
|
||||
+ "using `meteor bundle`."],
|
||||
args: [
|
||||
{name: "path",
|
||||
type: "String",
|
||||
descr: 'A path to append to the root URL. Do not include a leading "`/`".'
|
||||
}
|
||||
],
|
||||
options: [
|
||||
{name: "secure",
|
||||
type: "Boolean",
|
||||
descr: "Create an HTTPS URL."
|
||||
},
|
||||
{name: "rootUrl",
|
||||
type: "String",
|
||||
descr: "Override the default ROOT_URL from the server environment. For example: \"`http://foo.example.com`\""
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Template.api.publish = {
|
||||
id: "meteor_publish",
|
||||
name: "Meteor.publish(name, func)",
|
||||
|
||||
@@ -82,7 +82,8 @@ var toc = [
|
||||
"Core", [
|
||||
"Meteor.isClient",
|
||||
"Meteor.isServer",
|
||||
"Meteor.startup"
|
||||
"Meteor.startup",
|
||||
"Meteor.absoluteUrl"
|
||||
],
|
||||
|
||||
"Publish and subscribe", [
|
||||
@@ -205,7 +206,6 @@ var toc = [
|
||||
],
|
||||
|
||||
"Packages", [ [
|
||||
"absolute-url",
|
||||
"amplify",
|
||||
"backbone",
|
||||
"bootstrap",
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<template name="pkg_absolute_url">
|
||||
{{#better_markdown}}
|
||||
## `absolute-url`
|
||||
|
||||
This package allows constructing absolute URLs pointing back to the
|
||||
application. The server reads from the `ROOT_URL` environment variable
|
||||
to determine where it is running. This is taken care of automatically
|
||||
for apps deployed with `meteor deploy`, but must be provided when using
|
||||
`meteor bundle`.
|
||||
|
||||
{{/better_markdown}}
|
||||
|
||||
{{> api_box absoluteUrl}}
|
||||
|
||||
</template>
|
||||
@@ -1,24 +0,0 @@
|
||||
Template.pkg_absolute_url.absoluteUrl = {
|
||||
id: "meteor_absoluteUrl",
|
||||
name: "Meteor.absoluteUrl([path], [options])",
|
||||
locus: "Anywhere",
|
||||
descr: ["Generate an absolute URL pointing to the application."],
|
||||
args: [
|
||||
{name: "path",
|
||||
type: "String",
|
||||
descr: 'A path to append to the root URL. Do not include a leading "`/`".'
|
||||
}
|
||||
],
|
||||
options: [
|
||||
{name: "secure",
|
||||
type: "Boolean",
|
||||
descr: "Create an HTTPS URL."
|
||||
},
|
||||
{name: "rootUrl",
|
||||
type: "String",
|
||||
descr: "Override the default ROOT_URL from the server environment. For example: \"`http://foo.example.com`\""
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
Package.describe({
|
||||
summary: "Generate absolute URLs pointing to the application"
|
||||
summary: "DEPRECATED: Generate absolute URLs pointing to the application"
|
||||
});
|
||||
|
||||
Package.on_use(function (api) {
|
||||
// note server before common. usually it is the other way around, but
|
||||
// in this case server must load first.
|
||||
api.add_files('url_server.js', 'server');
|
||||
api.add_files('url_common.js', ['client', 'server']);
|
||||
});
|
||||
|
||||
Package.on_test(function (api) {
|
||||
api.use('absolute-url', ['client', 'server']);
|
||||
api.use('tinytest');
|
||||
|
||||
api.add_files('url_tests.js', ['client', 'server']);
|
||||
console.log('DEPRECATED. The `absolute-url` package has been folded into '
|
||||
+ 'the `meteor` package and should not be used directly.');
|
||||
});
|
||||
|
||||
@@ -8,11 +8,6 @@ Package.on_use(function (api) {
|
||||
// server has been instantiated.
|
||||
api.use('livedata', 'server');
|
||||
|
||||
// we don't really depend on absolute-url, but we do modify its
|
||||
// behavior. If there were a way to say "if the other package is
|
||||
// loaded, make sure we come after it", we should do that here.
|
||||
api.use('absolute-url', ['client', 'server']);
|
||||
|
||||
api.add_files('force_ssl_common.js', ['client', 'server']);
|
||||
api.add_files('force_ssl_server.js', 'server');
|
||||
|
||||
|
||||
@@ -40,6 +40,11 @@ Package.on_use(function (api, where) {
|
||||
api.use('underscore', ['client', 'server']);
|
||||
api.add_files('dynamics_browser.js', 'client');
|
||||
api.add_files('dynamics_nodejs.js', 'server');
|
||||
|
||||
// note server before common. usually it is the other way around, but
|
||||
// in this case server must load first.
|
||||
api.add_files('url_server.js', 'server');
|
||||
api.add_files('url_common.js', ['client', 'server']);
|
||||
});
|
||||
|
||||
Package.on_test(function (api) {
|
||||
@@ -50,4 +55,6 @@ Package.on_test(function (api) {
|
||||
|
||||
api.add_files('helpers_test.js', ['client', 'server']);
|
||||
api.add_files('dynamics_test.js', ['client', 'server']);
|
||||
|
||||
api.add_files('url_tests.js', ['client', 'server']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user