Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ff16f2d
update readme, phase 1
rcpeters May 28, 2015
737f504
remove uneeded command
rcpeters May 28, 2015
f908bf9
add express and live reload
rcpeters May 29, 2015
3b0a015
reorg layout
rcpeters May 29, 2015
bf62abc
reorg layout
rcpeters May 29, 2015
408ac7c
add non-minimized css
rcpeters May 29, 2015
51ff59e
Merge pull request #1 from ORCID/addExpressAndLiveReload
rcpeters May 29, 2015
87770d4
add standard styles
rcpeters May 29, 2015
949f9ff
add standard styles
rcpeters May 29, 2015
0182caa
add index view, fix gulp public watch
rcpeters May 29, 2015
bc3d419
add ability to toggle minimization
rcpeters May 29, 2015
b2e38ef
mark the gulp derived files
rcpeters May 29, 2015
577d110
clean up for gulp derived
rcpeters May 29, 2015
9b41aba
add gulp-nodemon
rcpeters May 29, 2015
5b19eb4
remove lint
rcpeters May 29, 2015
8d33075
rename to make client server clearer
rcpeters May 29, 2015
21a0665
clean up
rcpeters May 29, 2015
3f648ca
add server side OAuth2
rcpeters Jun 1, 2015
e7f76a8
try different url to test openshift
rcpeters Jun 3, 2015
33e6e8d
try another type npm link that might work with OpenShift
rcpeters Jun 3, 2015
71079ce
additional tries with openshift
rcpeters Jun 3, 2015
4b8166f
enable live reload
rcpeters Jun 4, 2015
2f9a73b
Doing a get using the bearer auth
amontenegro Jun 4, 2015
343fdca
Able to get the record
amontenegro Jun 4, 2015
b6decdf
Merge branch 'master' of github.com:ORCID/orcid-api-walkthrough
amontenegro Jun 4, 2015
2fdafd5
Adding some views
amontenegro Jun 4, 2015
32f7f37
Trying to display the record
amontenegro Jun 4, 2015
5d46a16
Displaying the record
amontenegro Jun 4, 2015
44a3b33
Displaying record
amontenegro Jun 4, 2015
3e149bc
Adding the style sheets
amontenegro Jun 4, 2015
b5577b3
Moving pages to the new format
amontenegro Jun 4, 2015
d1fc510
Adding introduction pages
amontenegro Jun 4, 2015
2594f69
Allow to get the token using form info
amontenegro Jun 4, 2015
6aca2f1
Displaying the record in xml
amontenegro Jun 4, 2015
bed351d
Adding link
amontenegro Jun 4, 2015
152e20b
Able to post work!!
amontenegro Jun 4, 2015
27c6631
change width so content doesn't fall below nav
lizkrznarich Jun 5, 2015
9e4604a
Removing duplicate entry for Gulp in package.json
hexplus Jun 5, 2015
1ad441b
hide menu if mobile
lizkrznarich Jun 5, 2015
5386a98
Merge branch 'master' of github.com:ORCID/orcid-api-walkthrough
lizkrznarich Jun 5, 2015
c8b37e1
Showing token
amontenegro Jun 5, 2015
ba9054a
add menu toggle button for mobile
lizkrznarich Jun 5, 2015
1ba38e2
move head and menu toggle to partials
lizkrznarich Jun 5, 2015
b2ba521
Getting headers so we can update the work later
amontenegro Jun 5, 2015
03db941
Merge branch 'master' of github.com:ORCID/orcid-api-walkthrough
amontenegro Jun 5, 2015
75008c7
More changes
amontenegro Jun 5, 2015
0cc9300
Getting work info
amontenegro Jun 5, 2015
a812e8f
update left nav to match pages
lizkrznarich Jun 5, 2015
7bf6295
style action links as buttons
lizkrznarich Jun 5, 2015
f222309
Editting work
amontenegro Jun 5, 2015
715c6d0
Edit work is working!
amontenegro Jun 5, 2015
c3c1bc8
Add buttons
amontenegro Jun 5, 2015
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
hackathon.sublime-project
hackathon.sublime-workspace
node_modules
node_modules
.sass-cache/
**/.DS_Store
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
An step by step live demo to explain how the Oauth2 dance works in the ORCID API and how to use the access tokens to edit an ORCID record.

#### Install NodeJS or Upgrade

[Install it!](https://nodejs.org/)
or
[Upgrade it!](http://davidwalsh.name/upgrade-nodejs)
if the version if less then 0.12.0

### Install Gulp

```
sudo npm install --global gulp
```

### Install dependencies

```
npm install
```

### Run gulp, includes express web server

```
gulp
```

Source JavaScript and SCSS files are under /src folder, do not modify files that are in (/public/gulp_derived)

### Production minimize mode
The default view doesn't reference minimized js and css to make development easier. To enable css and javascript minimization
for production set the `MINIMIZE` environment variable to `true`;

```
export MINIMIZE=true
```
1 change: 0 additions & 1 deletion css/fonts.min.css

This file was deleted.

1 change: 0 additions & 1 deletion css/style.min.css

This file was deleted.

56 changes: 42 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,53 @@ var gulp = require('gulp'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
nodemon = require('gulp-nodemon'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),
livereload = require('gulp-livereload'),
plumber = require('gulp-plumber');


// run livereload
gulp.task('livereload', function() {
tinylr = require('tiny-lr')();
tinylr.listen(35729);
});


function notifyLiveReload(event) {
var fileName = require('path').relative(__dirname, event.path);

tinylr.changed({
body: {
files: [fileName]
}
});
};


// Styles gulp task
gulp.task('styles', function () {
return (sass('./src/scss'))
.on('error', function (err) { console.log(err.message); })
.pipe(plumber())
.pipe(gulp.dest('./public/gulp_derived/css'))
.pipe(rename({ suffix: '.min' }))
.pipe(minifycss())
.pipe(gulp.dest('./css'))
.pipe(gulp.dest('./public/gulp_derived/css'))
.pipe(notify({ message: 'Styles task complete' }));
});


// Scripts
gulp.task('scripts', function() {
return gulp.src('./src/js/*.js')
.pipe(plumber())
.pipe(concat('app.js'))
.pipe(gulp.dest('./js'))
.pipe(concat('client.js'))
.pipe(gulp.dest('./public/gulp_derived/js'))
.pipe(rename({ suffix: '.min' }))
.pipe(uglify())
.pipe(gulp.dest('./js'))
.pipe(gulp.dest('./public/gulp_derived/js'))
.pipe(notify({ message: 'Custom Scripts task complete' }));
});

Expand All @@ -38,17 +60,23 @@ gulp.task('scripts', function() {
gulp.task('watch', function() {
gulp.watch('./src/scss/*.scss', ['styles']);
gulp.watch('./src/js/*.js', ['scripts']);
gulp.watch('./public/**', notifyLiveReload);
gulp.watch('./views/**', notifyLiveReload);
});

// Default task
gulp.task('default', ['watch'], function() {
gulp.start('styles','scripts');
});







// run express
gulp.task('express', function () {
nodemon({ script: 'server.js'
, ext: 'html js'
, ignore: ['ignored.js']
, tasks: ['lint'] })
.on('restart', function () {
console.log('restarted!')
})
});

// Default task
gulp.task('default', ['express','livereload','watch'], function() {
gulp.start('styles','scripts');
});
Binary file removed js/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion js/app.min.js

This file was deleted.

112 changes: 0 additions & 112 deletions js/controllers.js

This file was deleted.

21 changes: 17 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,39 @@
"description": "A walkthrough page that will show you how the orcid api works and how you can interact with it",
"main": "gulpfile.js",
"dependencies": {
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.2.0",
"gulp-cache": "^0.2.9",
"gulp-concat": "^2.5.2",
"gulp-livereload": "^3.8.0",
"gulp-minify-css": "^1.1.1",
"gulp-notify": "^2.2.0",
"gulp-nodemon": "^2.0.3",
"gulp-plumber": "^1.0.0",
"gulp-ruby-sass": "^1.0.5",
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.2.0",
"gulp-jshint": "^1.10.0"
"ejs": "^1.0.0",
"nodelint": "^0.6.2",
"simple-oauth2": "https://github.com/ORCID/simple-oauth2/archive/MASTER_2015_06_03.tar.gz",
"body-parser": "^1.12.4"
},
"devDependencies": {
"connect-livereload": "^0.5.3",
"express": "^4.12.4",
"gulp": "^3.8.11",
"tiny-lr": "^0.1.5"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hexplus/orcid-api-walkthrough.git"
},
"engines": {
"node": ">= 0.12.0",
"npm": ">= 2.0.0"
},
"keywords": [
"orcid",
"hackaton",
Expand All @@ -36,5 +48,6 @@
"bugs": {
"url": "https://github.com/hexplus/orcid-api-walkthrough/issues"
},
"homepage": "https://github.com/hexplus/orcid-api-walkthrough#readme"
"homepage": "https://github.com/hexplus/orcid-api-walkthrough#readme",
"main": "server.js"
}
Empty file added public/gulp_derived/css/.keep
Empty file.
Loading