Skip to content

Commit

Permalink
Add documentation, put version back, reuse a variable properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Hentges committed May 14, 2016
1 parent 6f64d44 commit 7246bd9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ gulp.task('css', () => {
.pipe(gulp.dest('build'));
});

// There's two separate `resource-*` directories.
// `resource-runtime` contains actual files which will exist in the same
// directory as James at runtime, in production (e.g. the browser images).
// `resource-compile` has resources that we don't necessarily want taking space with James, because they're compiled
// in in a special way (e.g. icons), they're not used in the build (e.g. the screenshot) or aren't just directly
// copied, and are modified along the way
gulp.task('resources', () => {
const dest = 'build';

return es.merge([
gulp.src('node_modules/font-awesome/fonts/**').pipe(gulp.dest('build/fonts')),
gulp.src('node_modules/font-awesome/fonts/**').pipe(gulp.dest(`${dest}/fonts`)),
gulp.src('resource-runtime/**')
.pipe(changed('build'))
.pipe(changed(dest))
.pipe(gulp.dest(dest)),
gulp.src('resource-compile/package.json')
.pipe(jeditor({ version }))
Expand All @@ -61,8 +67,8 @@ gulp.task('dist-resources', ['css'], () => {
const dest = 'package';

return es.merge([
gulp.src('node_modules/font-awesome/fonts/**').pipe(gulp.dest('package/fonts')),
gulp.src('build/james.css').pipe(gulp.dest('package')),
gulp.src('node_modules/font-awesome/fonts/**').pipe(gulp.dest(`${dest}/fonts`)),
gulp.src('build/james.css').pipe(gulp.dest(dest)),
gulp.src('resource-runtime/**')
.pipe(gulpif('*.html', useref()))
.pipe(gulp.dest(dest)),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "james",
"version": "0.0.1",
"description": "HTTP/HTTPS proxy built in Electron and ReactJS",
"version": "1.4.5",
"description": "HTTP/HTTPS proxy built in Electron and React",
"author": "Julian Hollmann <[email protected]>",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion resource-compile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "james",
"description": "HTTP/HTTPS proxy built in Electron and ReactJS",
"description": "HTTP/HTTPS proxy built in Electron and React",
"main": "electron-app.js",
"author": "Julian Hollmann <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit 7246bd9

Please sign in to comment.