From f4a01f90e23e2b8af180e6d230109ea08e57d888 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Thu, 1 Jan 2015 18:47:11 +0900 Subject: [PATCH] better organization for blank package --- .../lib/{both.js => custom_fields.js} | 23 +---- packages/telescope-blank/lib/hooks.js | 88 +++++++++++++++++++ packages/telescope-blank/lib/main.js | 5 ++ packages/telescope-blank/lib/settings.js | 14 +++ packages/telescope-blank/package.js | 7 +- 5 files changed, 113 insertions(+), 24 deletions(-) rename packages/telescope-blank/lib/{both.js => custom_fields.js} (50%) create mode 100644 packages/telescope-blank/lib/hooks.js create mode 100644 packages/telescope-blank/lib/main.js create mode 100644 packages/telescope-blank/lib/settings.js diff --git a/packages/telescope-blank/lib/both.js b/packages/telescope-blank/lib/custom_fields.js similarity index 50% rename from packages/telescope-blank/lib/both.js rename to packages/telescope-blank/lib/custom_fields.js index a58562dd3..4db7848d6 100644 --- a/packages/telescope-blank/lib/both.js +++ b/packages/telescope-blank/lib/custom_fields.js @@ -12,25 +12,4 @@ var customProperty = { } } } -addToPostSchema.push(customProperty); - -// Custom Setting - -var customSetting = { - propertyName: 'customSetting', - propertySchema: { - type: String, - optional: true, - autoform: { - group: 'customGroup', // assign custom group (fieldset) in Settings form - private: true // mark as private (not published to client) - } - } -} -addToSettingsSchema.push(customSetting); - -// Global Function - -myFunction = function (a, b) { - return a + b; -} \ No newline at end of file +addToPostSchema.push(customProperty); \ No newline at end of file diff --git a/packages/telescope-blank/lib/hooks.js b/packages/telescope-blank/lib/hooks.js new file mode 100644 index 000000000..51a907b6b --- /dev/null +++ b/packages/telescope-blank/lib/hooks.js @@ -0,0 +1,88 @@ +// ------------------------------------------------------------------------------------------- // +// -------------------------------------- Subscriptions -------------------------------------- // +// ------------------------------------------------------------------------------------------- // + +// add a subscription to be preloaded before the rest of the app +preloadSubscriptions.push(''); + +// ------------------------------------------------------------------------------------------- // +// ------------------------------------------- Nav ------------------------------------------- // +// ------------------------------------------------------------------------------------------- // + +// add templates to the primary nav bar +primaryNav.push({ + template: '', + order: 99 +}); + +// add templates to the secondary nav bar +secondaryNav.push({ + template: '', + order: 99 +}); + +// add items to the view menu +viewNav.push({ + route: '', + label: '', + description: '' +}); + +// add items to the admin menu +adminNav.push({ + route: '', + label: '', + description: '' +}); + +// ------------------------------------------------------------------------------------------- // +// ------------------------------------------ Zones ------------------------------------------ // +// ------------------------------------------------------------------------------------------- // + +// add templates to the hero zone (before posts list) +heroModules.push({ + template: '', + order: 99 +}); + +// add templates to the footer (after posts list) +footerModules.push({ + template: '', + order: 99 +}); + +// ------------------------------------------------------------------------------------------- // +// ------------------------------------------ Posts ------------------------------------------ // +// ------------------------------------------------------------------------------------------- // + +// add templates to the post items +postModules.push({ + template: '', + order: 99 +}); + +// add templates to the post heading zone +postHeading.push({ + template: '', + order: 99 +}); + +// add templates to the post meta zone +postMeta.push({ + template: '', + order: 99 +}); + +// ------------------------------------------------------------------------------------------- // +// -------------------------------------- User Profiles -------------------------------------- // +// ------------------------------------------------------------------------------------------- // + +userProfileDisplay.push({ + template: '', + order: 99 +}); + +userProfileEdit.push({ + template: '', + order: 99 +}); \ No newline at end of file diff --git a/packages/telescope-blank/lib/main.js b/packages/telescope-blank/lib/main.js new file mode 100644 index 000000000..a6d23fbef --- /dev/null +++ b/packages/telescope-blank/lib/main.js @@ -0,0 +1,5 @@ +// Global Function + +myFunction = function (a, b) { + return a + b; +} \ No newline at end of file diff --git a/packages/telescope-blank/lib/settings.js b/packages/telescope-blank/lib/settings.js new file mode 100644 index 000000000..4cc5ae2c2 --- /dev/null +++ b/packages/telescope-blank/lib/settings.js @@ -0,0 +1,14 @@ +// Custom Setting + +var customSetting = { + propertyName: 'customSetting', + propertySchema: { + type: String, + optional: true, + autoform: { + group: 'customGroup', // assign custom group (fieldset) in Settings form + private: true // mark as private (not published to client) + } + } +} +addToSettingsSchema.push(customSetting); \ No newline at end of file diff --git a/packages/telescope-blank/package.js b/packages/telescope-blank/package.js index 66cc7f22f..94bf45600 100644 --- a/packages/telescope-blank/package.js +++ b/packages/telescope-blank/package.js @@ -48,8 +48,11 @@ Package.onUse(function (api) { // both api.add_files([ - 'lib/both.js', - 'lib/routes.js' + 'lib/custom_fields.js', + 'lib/hooks.js', + 'lib/main.js', + 'lib/routes.js', + 'lib/settings.js' ], ['client', 'server']); // client