Skip to content

Commit fa5113c

Browse files
add cs_console and gulp-util for when I break stuff
moved setup.sh to the root and added a check for the BOWER env. If it's present it will `bower install` and compile cs_console.
1 parent a8762ee commit fa5113c

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ npm install -g gulp
1313
npm install
1414
```
1515

16+
If you set the `BOWER` ENV the setup script will download the bower components and compile cs_console (requires ruby!)
17+
1618
This app authenticates with GitHub, so you'll need to create a GitHub Application and set ENVs for `GH_CLIENT_ID` and `GH_CLIENT_SECRET`.
1719

1820
## Running

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var rename = require('gulp-rename');
1616
var autoprefixer = require('gulp-autoprefixer');
1717
var uglify = require('gulp-uglify');
1818
var concat = require('gulp-concat');
19+
var gutil = require('gulp-util');
1920

2021
// -------------------------------------
2122
// Variables
@@ -96,7 +97,7 @@ gulp.task('uglify', function() {
9697
options.js.files.push('!public/javascripts/application.js');
9798

9899
gulp.src(options.js.files)
99-
.pipe(concat('application.js'))
100100
.pipe(uglify())
101+
.pipe(concat('application.js'))
101102
.pipe(gulp.dest(options.js.destDir));
102103
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"scripts": {
99
"start": "node --harmony_object_literals ./bin/www",
10-
"postinstall": "./db/setup.sh"
10+
"postinstall": "./setup.sh"
1111
},
1212
"dependencies": {
1313
"body-parser": "~1.10.2",
@@ -34,6 +34,7 @@
3434
"gulp-rename": "^1.2.0",
3535
"gulp-sass": "^1.3.3",
3636
"gulp-uglify": "^1.1.0",
37+
"gulp-util": "^3.0.4",
3738
"gulp-watch": "^4.1.1"
3839
}
3940
}

db/setup.sh renamed to setup.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@ else
99
psql javascriptcom < db/schema.sql
1010
fi
1111

12+
# download bower assets & setup cs_console
13+
14+
if $BOWER
15+
then
16+
echo "installing bower assets"
17+
bower install
18+
19+
echo "compiling cs_console"
20+
pushd bower_components/cs_console
21+
bundle
22+
bundle exec ./bin/cs_console build -t no_cm
23+
popd
24+
fi

0 commit comments

Comments
 (0)