npm install
meteor
- Dependencies: Git, Meteor
- Fork and clone project
meteor npm install
andmeteor --settings settings-dev.json
to start the app
- Check if git is already installed by opening
terminal
and typingwhich git
. If you see see something like/usr/bin/git
then git is already installed. If nothing is returned then complete the next step. - Follow the instructions here: https://git-scm.com/downloads
curl https://install.meteor.com/ | sh
To create your own app or to contribute changes to the World Theatre Map, first fork the project and clone the code locally
- Create a GitHub account or sign in with an existing account
- Go to https://github.com/howlround/worldtheatremap and click the
fork
button in the upper-right-hand corner - Follow instructions to Clone or Download: https://help.github.com/articles/cloning-a-repository/
- Make a copy of the
settings-default.json
file (can be any name you like, will be referred to assettings.json
in this documentation) - Currently all options are required
The options used in the settings.json file are:
{
"AWSAccessKeyId": "",
"AWSSecretAccessKey": "",
"AWSRegion": "",
"AWSSourceBucket": "",
"AWSTargetBucket": "",
"SendContentNotifications": false,
"GoogleTranslateAPIKey": "",
"public": {
"AWSShareImageBucket": "",
"WTMDataApi": "/graphql",
"WTMDataApiAuth": "",
"GoogleAnalytics": ""
}
}
- Using a terminal, navigate into the cloned project directory (such as
cd worldtheatremap
) - Type
meteor npm install
- This command installs lots of dependencies and may take a few minutes.
- Type
meteor --settings settings.json
to start the app (wheresettings.json
is the settings file you created in step 4) - Using a browser navigate to http://localhost:3000
If you need to create admin accounts you can either do it directly in the database using Mongo commands or using the Meteor shell
- Create an account on your new local version of the site (http://localhost:3000/join)
- Find the ObjectId of the user (either type Meteor.userId() in a browser console, or look in the user collection in Mongo)
meteor shell
Roles.addUsersToRoles("xxxxxx", ['admin'])
wherexxxxxx
is the Mongo ObjectId of the user.
We use scss for compiled css. All scss files can be found in client/scss
.
If you are editing scss files you will need to use Grunt to compile into css.
- Grunt should already be installed when you ran
meteor npm install
above. You can runwhich grunt
to verify it is installed. - In a new terminal window, make sure you are in the project root directory and run the command
grunt
. - Changes to the scss files will now be automatically compiled and the site should immediately update with the new styles.
There is also a docker container that can be used to run grunt. I know it's overkill since it's not needed for meteor development but simplifies node differences and platform differences.
docker exec -it worldtheatremap_grunt_1 grunt
- Images are hosted on Amazon S3 and use the Slingshot package to upload ().
- Our implementation resizes the images and resaves them on another S3 bucket.
- Our implementation is similar to this tutorial: http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html
- The target bucket name and source bucket name can be configured in the settings.json file
- We use React Intl for translations. If you have added or altered code that uses a translatable string then you need to add it to the
i18n/en.json
file, and add translations to the appropriate translation filesi18n/es.json
,i18n/fr.json
, etc.
If you would like to host your own version of the World Theatre Map, you will need to select a hosting provider and deploy your new app. We host the map on Galaxy: https://www.meteor.com/hosting
The World Theatre Map uses the Chimp testing framework for functional tests. Tests are written in Cucumber and located in the tests
directory.
- Make sure the meteor app is running
- Run
meteor npm run chimp
in a terminal to run all tests - You can run specific tests by adding a
@focus
tag to tests then runningmeteor npm run chimp-watch
npm run lint
- Update interests-list.js
- Update en.json, es.json, and fr.json (both the key and value)
- Deploy
- Run the updateTaxonomyTerm.js script to update existing database values
- Remove old term from database directly