Skip to content

Commit

Permalink
add dist task
Browse files Browse the repository at this point in the history
  • Loading branch information
axe-me committed Feb 26, 2016
1 parent 11b9f5a commit b408447
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ bower_components

# distribution
dist
build
build
cache
54 changes: 40 additions & 14 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ var minifyCss = require('gulp-minify-css');
var sass = require('gulp-sass');
var gulpLoadPlugins = require('gulp-load-plugins');
var os = require('os');
var packager = require('electron-packager')
var electron = require('gulp-electron');
var packageJson = require('./build/package.json');


var projectDir = jetpack;
Expand Down Expand Up @@ -76,17 +77,42 @@ gulp.task('run', ['build'], function () {
childProcess.spawn(electron, ['./build'], { stdio: 'inherit' });
});

gulp.task('dist',['build'], function () {

// switch (os.platform()) {
// case 'darwin':
// // execute build.osx.js
// break;
// case 'linux':
// //execute build.linux.js
// break;
// case 'win32':
// console.log('sdf')
// return release_windows.build();
// }
gulp.task('clean-cache', function (callback) {
return projectDir.cwd('./cache').dirAsync('.', { empty: true });
});

gulp.task('clean-dist', function (callback) {
return projectDir.cwd('./dist').dirAsync('.', { empty: true });
});

gulp.task('dist', ['clean-cache', 'clean-dist'], function () {
//platforms Support
//['darwin','win32','linux','darwin-x64','linux-ia32','linux-x64','win32-ia32','win64-64']
var platforms = ['win32-ia32', 'darwin-x64', 'linux-ia32'];
gulp.src("")
.pipe(electron({
src: './build',
packageJson: packageJson,
release: './dist',
cache: './cache',
version: 'v0.36.7',
packaging: true,
platforms: platforms,
platformResources: {
darwin: {
CFBundleDisplayName: packageJson.name,
CFBundleIdentifier: packageJson.name,
CFBundleName: packageJson.name,
CFBundleVersion: packageJson.version,
icon: 'icon.icns'
},
win: {
"version-string": packageJson.version,
"file-version": packageJson.version,
"product-version": packageJson.version,
"icon": 'icon.ico'
}
}
}))
.pipe(gulp.dest(""));
});
3 changes: 2 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ Run built application by entering following command
Get the release version with following command:

```
gulp build-electron
gulp dist
```
Files will be generated int dist folder.

#TODO
---
Expand Down
4 changes: 2 additions & 2 deletions app/assets/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/sass/pages/_chatroom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
background-color: $grey-800;
width: 100vw;
height: $chat-room-height;
overflow: scroll;
overflow-y: scroll;

.msg-item {
padding: 0 15px;
Expand Down
2 changes: 1 addition & 1 deletion build/assets/css/app.css

Large diffs are not rendered by default.

Loading

0 comments on commit b408447

Please sign in to comment.