A front end for osf.io.
You will need the following things properly installed on your computer.
- osf.io back end
- Git
- Node.js (with NPM)
- Ember CLI
- Watchman
git clone https://github.com/CenterForOpenScience/ember-osf-web.git
cd ember-osf-web
yarn --frozen-lockfile
Watchman states "Only applicable on OS X 10.6 and earlier". Though it's been observed this setting can remain incorrect on systems where the operation system was upgraded from a legacy version.
Putting the following into a file named /etc/sysctl.conf on OS X will cause these values to persist across reboots:
kern.maxfiles=10485760
kern.maxfilesperproc=1048576
Configure the application for local development, add the following to your config/local.js
:
module.exports = {
// an ally audit can use 100% of your browsers cpu, so use it wisely
A11Y_AUDIT: false,
// toggle on/off the engine applications you will be working on
COLLECTIONS_ENABLED: false,
// sourcemaps are useful if you need to step through typescript code in the browser
SOURCEMAPS_ENABLED: true,
};
ember serve
- View the ember app (alone) at localhost:4200
To integrate with the legacy front end at localhost:5000, you have two options:
- Enable the waffle flags for each page in your local OSF Admin
- Add routes to your
osf.io/website/settings/local.py
:EXTERNAL_EMBER_APPS = { 'ember_osf_web': { # ... 'routes': [ 'handbook', 'dashboard', # ... ], }, # ...
To enable the developer handbook locally,
add the following to your config/local.js
:
module.exports = {
HANDBOOK_ENABLED: true,
};
The handbook will be available at http://localhost:4200/handbook.
To enable (experimental) auto-generated docs in the handbook, you can also set
HANDBOOK_DOC_GENERATION_ENABLED: true
in your local config.
ssh-keygen -t rsa -b 4096 -C <your@email.com>
- Enter file in which to save the key (~/.ssh/id_rsa):
~/deploy_key
- Press enter twice for no passphrase
- Add the public key in your GitHub repository settings
cat ~/deploy_key.pub | pbcopy
- Go to
https://github.com/<org>/<repo>/settings/keys/new
- Title:
Travis CI
- Key: paste in the public key
- ☑️ Allow write access
- Add the base64-encoded private key to Travis CI
cat ~/deploy_key | base64 | pbcopy
- Go to
https://travis-ci.org/<org>/<repo>/settings
- Under Environment Variables, add
- Name:
DEPLOY_KEY
- Value: paste in the private key
- 'Leave Display Value in Build log' off
- Click Add
- Name:
- Delete the keypair
rm ~/deploy_key ~/deploy_key.pub
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)