Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
370 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,3 +78,4 @@ telescope-invites | |
telescope-post-by-feed | ||
|
||
# Custom Packages | ||
telescope-releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.build* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"translation_key": "translation string" | ||
} |
Empty file.
7 changes: 7 additions & 0 deletions
7
packages/telescope-releases/lib/client/templates/current_release.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template name="currentRelease"> | ||
{{#with currentRelease}} | ||
<div class='current-release'> | ||
{{#markdown}}{{notes}}{{/markdown}} | ||
</div> | ||
{{/with}} | ||
</template> |
9 changes: 9 additions & 0 deletions
9
packages/telescope-releases/lib/client/templates/current_release.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Meteor.startup(function () { | ||
|
||
Template[getTemplate('currentRelease')].helpers({ | ||
currentRelease: function () { | ||
return Releases.find({read: false}).fetch()[0]; | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Releases = new Meteor.Collection('releases'); | ||
|
||
heroModules.push({ | ||
template: 'currentRelease' | ||
}); | ||
|
||
preloadSubscriptions.push('currentRelease'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
importRelease = function (number) { | ||
if (!Releases.findOne({number: number})) { | ||
var releaseNotes = Assets.getText("releases/" + number + ".md"); | ||
release = { | ||
number: number, | ||
notes: releaseNotes, | ||
createdAt: new Date(), | ||
read: false | ||
} | ||
Releases.insert(release); | ||
} | ||
}; | ||
|
||
Meteor.startup(function () { | ||
importRelease('0.11.0'); | ||
importRelease('0.11.1'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Meteor.publish('currentRelease', function() { | ||
if(isAdminById(this.userId)){ | ||
return Releases.find({}, {sort: {createdAt: -1}, limit: 1}); | ||
} | ||
return []; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"translation_function_name": "__", | ||
"helper_name": "_", | ||
"namespace": "project" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
Package.describe({ | ||
summary: 'Show Telescope release notes.', | ||
version: '0.1.0', | ||
name: 'telescope-releases' | ||
}); | ||
|
||
Npm.depends({ | ||
// NPM package dependencies | ||
}); | ||
|
||
Package.onUse(function (api) { | ||
|
||
// --------------------------- 1. Meteor packages dependencies --------------------------- | ||
|
||
// automatic (let the package specify where it's needed) | ||
|
||
api.use([ | ||
'tap:i18n', // internationalization package | ||
'iron:router', // routing package | ||
'telescope-base', // basic Telescope hooks and objects | ||
'telescope-lib', // useful functions | ||
'telescope-i18n', // internationalization wrapper | ||
'fourseven:scss' // SCSS compilation package | ||
]); | ||
|
||
// client | ||
|
||
api.use([ | ||
'jquery', // useful for DOM interactions | ||
'underscore', // JavaScript swiss army knife library | ||
'templating' // required for client-side templates | ||
], ['client']); | ||
|
||
// server | ||
|
||
api.use([ | ||
// | ||
], ['server']); | ||
|
||
// ---------------------------------- 2. Files to include ---------------------------------- | ||
|
||
// i18n config (must come first) | ||
|
||
api.add_files([ | ||
'package-tap.i18n' | ||
], ['client', 'server']); | ||
|
||
// both | ||
|
||
api.add_files([ | ||
'lib/releases.js', | ||
], ['client', 'server']); | ||
|
||
// client | ||
|
||
api.add_files([ | ||
'lib/client/templates/current_release.html', | ||
'lib/client/templates/current_release.js', | ||
'lib/client/scss/releases.scss' | ||
], ['client']); | ||
|
||
// server | ||
|
||
api.add_files([ | ||
'lib/server/publications.js', | ||
'lib/server/import_releases.js' | ||
], ['server']); | ||
|
||
api.addFiles('releases/0.11.0.md', 'server', { isAsset: true }); | ||
api.addFiles('releases/0.11.1.md', 'server', { isAsset: true }); | ||
|
||
// i18n languages (must come last) | ||
|
||
api.add_files([ | ||
'i18n/en.i18n.json' | ||
], ['client', 'server']); | ||
|
||
// -------------------------------- 3. Variables to export -------------------------------- | ||
|
||
api.export([ | ||
'Releases' | ||
]); | ||
|
||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.