Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor integration #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
geobootstrap:[email protected]_3
[email protected]
[email protected]
1 change: 1 addition & 0 deletions meteor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Packaging Geo for Meteor.js, the [most popular full-stack JavaScript framework](https://github.com/search?o=desc&q=javascript+framework&ref=searchresults&s=stars&type=Repositories&utf8=%E2%9C%93) on GitHub.
29 changes: 29 additions & 0 deletions meteor/package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// package metadata file for Meteor.js

var packageName = 'geobootstrap:geo-bootstrap'; // http://atmospherejs.com/geobootstrap/geo-bootstrap
var where = 'client'; // where to install: 'client', 'server', or ['client', 'server']

var packageJson = JSON.parse(Npm.require("fs").readFileSync('package.json'));

Package.describe({
name: packageName,
summary: 'A timeless Twitter Bootstrap theme built for the modern web',
version: packageJson.version + '_3',
git: 'https://github.com/thomasvanlankveld/geo-bootstrap.git'
});

Package.onUse(function (api) {
api.versionsFrom('[email protected]');
api.addFiles([
'img/flames.gif',
'img/glyphicons-halflings-white.png',
'img/glyphicons-halflings.png',
'img/microfab.gif',
'img/progress.gif',
'img/rainbow.gif',
'img/stars.gif',

'swatch/bootstrap.css',
'swatch/bootstrap-responsive.css'
], where);
});
40 changes: 40 additions & 0 deletions meteor/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
# Publish package to Meteor's repository, Atmospherejs.com

# Make sure Meteor is installed, per https://www.meteor.com/install.
# The curl'ed script is totally safe; takes 2 minutes to read its source and check.
type meteor >/dev/null 2>&1 || { curl https://install.meteor.com/ | sh; }

# sanity check: make sure we're in the root directory of the checkout
cd "$( dirname "$0" )/.."

ALL_EXIT_CODE=0

# test any package*.js packages we may have, e.g. package.js, package-compat.js
for PACKAGE_FILE in meteor/package*.js; do

# Meteor expects package.js to be in the root directory of the checkout, so copy there our package file under that name, temporarily
cp $PACKAGE_FILE ./package.js

# publish package, creating it if it's the first time we're publishing
PACKAGE_NAME=$(grep -i name package.js | head -1 | cut -d "'" -f 2)

echo "Publishing $PACKAGE_NAME..."

# Attempt to re-publish the package - the most common operation once the initial release has
# been made. If the package name was changed (rare), you'll have to pass the --create flag.
meteor publish "$@"; EXIT_CODE=$?
ALL_EXIT_CODE=$(( $ALL_EXIT_CODE + $EXIT_CODE ))
if (( $EXIT_CODE == 0 )); then
echo "Thanks for releasing a new version. You can see it at"
echo "https://atmospherejs.com/${PACKAGE_NAME/://}"
else
echo "We got an error. Please post it at https://github.com/raix/Meteor-community-discussions/issues/14"
fi

# rm the temporary build files and package.js
rm -rf ".build.$PACKAGE_NAME" versions.json package.js

done

exit $ALL_EXIT_CODE