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
1 parent
cdb699d
commit 100079c
Showing
4 changed files
with
93 additions
and
81 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 |
---|---|---|
@@ -1,50 +1,45 @@ | ||
"use strict"; | ||
|
||
var gulp = require('gulp'), | ||
watch = require('gulp-watch'), | ||
to5 = require('gulp-6to5'), | ||
runSequence = require('run-sequence'), | ||
sourcemaps = require('gulp-sourcemaps'), | ||
clean = require('gulp-clean'), | ||
less = require('gulp-less'), | ||
path = require('path'); | ||
|
||
var exec = require('child_process').exec; | ||
|
||
gulp.task('clean', function() { | ||
return gulp.src('./dist', {read: false}) | ||
.pipe(clean()); | ||
}); | ||
|
||
gulp.task('build:styles', function() { | ||
return gulp.src('./stylesheets/style.less') | ||
.pipe(less()) | ||
.pipe(gulp.dest('./dist/css')); | ||
}); | ||
|
||
gulp.task('rebuild', function(cb) { | ||
return runSequence('clean', 'build', cb); | ||
}); | ||
|
||
gulp.task('build:js', function() { | ||
return gulp.src(['./js/**/*.js']) | ||
.pipe(sourcemaps.init()) | ||
.pipe(to5()) | ||
.pipe(sourcemaps.write()) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('build', ['build:js', 'build:styles']); | ||
|
||
gulp.task('build:post', function() { | ||
return gulp.src('./node_modules/nodewebkit/package.json', {read: false}) | ||
.pipe(clean()); | ||
}); | ||
|
||
gulp.task('run', function() { | ||
exec(path.normalize('./node_modules/.bin/nodewebkit')); | ||
}); | ||
|
||
gulp.task('default', function(cb) { | ||
return runSequence('build', 'build:post', 'run', cb); | ||
}); | ||
"use strict"; | ||
|
||
var gulp = require('gulp'), | ||
watch = require('gulp-watch'), | ||
to5 = require('gulp-6to5'), | ||
runSequence = require('run-sequence'), | ||
sourcemaps = require('gulp-sourcemaps'), | ||
clean = require('gulp-clean'), | ||
less = require('gulp-less'), | ||
path = require('path'); | ||
|
||
var exec = require('child_process').exec; | ||
|
||
gulp.task('clean', function() { | ||
return gulp.src('./dist', {read: false}) | ||
.pipe(clean()); | ||
}); | ||
|
||
gulp.task('build:styles', function() { | ||
return gulp.src('./stylesheets/style.less') | ||
.pipe(less()) | ||
.pipe(gulp.dest('./dist/css')); | ||
}); | ||
|
||
gulp.task('rebuild', function(cb) { | ||
return runSequence('clean', 'build', cb); | ||
}); | ||
|
||
gulp.task('build:js', function() { | ||
return gulp.src(['./js/**/*.js']) | ||
.pipe(sourcemaps.init()) | ||
.pipe(to5()) | ||
.pipe(sourcemaps.write()) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('build', ['build:js', 'build:styles']); | ||
|
||
gulp.task('run', function() { | ||
exec(path.normalize('./node_modules/.bin/electron') + ' .'); | ||
}); | ||
|
||
gulp.task('default', function(cb) { | ||
return runSequence('build', 'run', cb); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use strict"; | ||
|
||
var globalShortcut = require('global-shortcut'); | ||
|
||
process.on('error', function(err) { | ||
console.log(err); | ||
}); | ||
|
||
var app = require('app'); | ||
var BrowserWindow = require('browser-window'); | ||
|
||
var mainWindow; | ||
|
||
app.on('window-all-closed', function() { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
app.on('ready', function() { | ||
globalShortcut.register('ctrl+shift+i', function() { | ||
console.log('opening debugger') | ||
BrowserWindow.getFocusedWindow().toggleDevTools(); | ||
}); | ||
|
||
mainWindow = new BrowserWindow({width: 1000, height: 800, icon: "./icon.png"}); | ||
|
||
mainWindow.loadUrl('file://' + __dirname + '/index.html'); | ||
mainWindow.on('closed', function() { | ||
mainWindow = null; | ||
}); | ||
}); |
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,15 +1,12 @@ | ||
"use strict"; | ||
import '6to5/polyfill'; | ||
global.document = global.window.document; | ||
global.navigator = global.window.navigator; | ||
|
||
import angular from './lib/angular'; | ||
|
||
angular.module('phoenixmatrix', ['bgDirectives', 'ui.bootstrap']); | ||
|
||
import './services'; | ||
import './filters'; | ||
import './directives'; | ||
import './controllers'; | ||
|
||
|
||
"use strict"; | ||
import '6to5/polyfill'; | ||
import angular from './lib/angular'; | ||
|
||
angular.module('phoenixmatrix', ['bgDirectives', 'ui.bootstrap']); | ||
|
||
import './services'; | ||
import './filters'; | ||
import './directives'; | ||
import './controllers'; | ||
|
||
|
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