From 7246bd9985b48fbd54b27b762f858b5470001ef4 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Sat, 14 May 2016 21:58:37 +0200 Subject: [PATCH] Add documentation, put version back, reuse a variable properly --- gulpfile.js | 14 ++++++++++---- package.json | 4 ++-- resource-compile/package.json | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bceff48a..553d8f71 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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 })) @@ -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)), diff --git a/package.json b/package.json index c9066e96..d93d887f 100644 --- a/package.json +++ b/package.json @@ -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 ", "license": "MIT", "repository": { diff --git a/resource-compile/package.json b/resource-compile/package.json index bc9f5bb9..e38e1ee1 100644 --- a/resource-compile/package.json +++ b/resource-compile/package.json @@ -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 ", "license": "MIT",