-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
289 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
node_modules | ||
Thumbs.db | ||
.DS_Store | ||
out | ||
dist |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,82 @@ | ||
var gulp = require('gulp'); | ||
var rimraf = require('rimraf'); | ||
var clgulp = require('clgulp'); | ||
var gulp = clgulp(require('gulp')); | ||
var util = clgulp.util; | ||
var electron = require('gulp-atom-electron'); | ||
var symdest = require('gulp-symdest'); | ||
var zip = require('gulp-vinyl-zip'); | ||
var extend = require('util')._extend; | ||
var appdmg = require('appdmg'); | ||
var release = require('gulp-github-release'); | ||
|
||
var electronOptions = { | ||
version: '0.28.2', | ||
winIcon: 'node_modules/classets/images/icon_large.ico', | ||
darwinIcon: 'node_modules/classets/images/icon_large.icns', | ||
version: '0.34.2', | ||
winIcon: 'assets/images/icon.ico', | ||
darwinIcon: 'assets/images/icon.icns', | ||
}; | ||
|
||
gulp.task('default', function() { | ||
return gulp.src(['main.js', 'package.json', 'preload.js']) | ||
var src = [ | ||
'package.json', | ||
'src/*', | ||
'node_modules/spellchecker/**/*', | ||
]; | ||
|
||
gulp.task('clean', function(cb) { | ||
rimraf('./dist', cb); | ||
}); | ||
|
||
gulp.task('clean:osx', function(cb) { | ||
rimraf('./dist/osx', cb); | ||
}); | ||
|
||
gulp.task('build:osx', ['clean:osx'], function() { | ||
return gulp.src(src, { | ||
base: '.' | ||
}) | ||
.pipe(electron(extend({ | ||
platform: 'darwin', | ||
}, electronOptions))) | ||
.pipe(electron.zfsdest('out/classeur-darwin.zip')); | ||
.pipe(symdest('dist/osx')) | ||
.pipe(zip.dest('dist/osx/classeur-osx.zip')); | ||
}); | ||
|
||
gulp.task('pack:osx', ['build:osx'], function(cb) { | ||
var ee = appdmg({ | ||
target: 'dist/osx/classeur-osx.dmg', | ||
basepath: __dirname, | ||
specification: { | ||
title: 'Classeur', | ||
background: 'assets/images/landing-bg.jpg', | ||
icon: 'assets/images/icon.icns', | ||
'icon-size': 80, | ||
contents: [{ | ||
x: 450, | ||
y: 242, | ||
type: 'link', | ||
path: '/Applications' | ||
}, { | ||
x: 190, | ||
y: 242, | ||
type: 'file', | ||
path: 'dist/osx/Classeur.app' | ||
}] | ||
} | ||
}); | ||
ee.on('progress', function(info) { | ||
info.title && util.log(info.title); | ||
}); | ||
ee.on('finish', cb); | ||
ee.on('error', cb); | ||
}); | ||
|
||
gulp.task('publish:osx', function() { | ||
gulp.src([ | ||
'dist/osx/classeur-osx.zip', | ||
'dist/osx/classeur-osx.dmg' | ||
]) | ||
.pipe(release({ | ||
owner: 'classeur', | ||
repo: 'clelectron', | ||
manifest: require('./package.json') | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
{ | ||
"name": "Classeur", | ||
"version": "0.1.0", | ||
"description": "", | ||
"main": "main.js", | ||
"version": "1.0.0", | ||
"main": "src/main.js", | ||
"scripts": { | ||
"start": "electron .", | ||
"clean": "rm -rf ./dist", | ||
"clean:osx": "rm -rf ./dist/osx", | ||
"clean:win": "rm -rf ./dist/win", | ||
"build": "npm run clean && npm run build:osx && npm run build:win", | ||
"build:osx": "npm run clean:osx && electron-packager ./ Classeur --out=dist --overwrite --platform=darwin --arch=x64 --version=0.34.2 --icon=./assets/images/icon.icns", | ||
"pack:osx": "npm run build:osx && electron-builder \"dist/Classeur-darwin-x64/Classeur.app\" --platform=osx --out=\"dist/osx\" --config=packager.json", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"author": "Benoit Schweblin", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"appdmg": "^0.3.5", | ||
"classets": "github:classeur/classets#master", | ||
"clgulp": "^1.0.4", | ||
"electron-builder": "^2.0.2", | ||
"electron-packager": "^5.1.1", | ||
"electron-prebuilt": "^0.34.0", | ||
"classets": "classeur/classets.git#master", | ||
"gulp": "^3.9.0", | ||
"gulp-atom-electron": "^0.12.0" | ||
"gulp-atom-electron": "^1.0.0", | ||
"gulp-github-release": "^1.0.3", | ||
"gulp-symdest": "^1.0.0", | ||
"gulp-vinyl-zip": "^1.1.1", | ||
"rimraf": "^2.4.3" | ||
}, | ||
"dependencies": { | ||
"spellchecker": "^3.1.2" | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/classeur/clelectron.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/classeur/clelectron/issues" | ||
}, | ||
"homepage": "https://github.com/classeur/clelectron#readme", | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.