Restructure for gulp build of app.js
This commit is contained in:
parent
4b6d11cdc8
commit
6680abdce3
|
@ -0,0 +1,18 @@
|
|||
var gulp = require('gulp'),
|
||||
concat = require('gulp-concat');
|
||||
|
||||
var scripts = [
|
||||
'./src/jquery-1.11.3.min.js',
|
||||
'./src/w2ui-1.4.3.min.js',
|
||||
'./src/chroma.min.js',
|
||||
'./src/index.js'
|
||||
];
|
||||
|
||||
gulp.task('js', function () {
|
||||
'use strict';
|
||||
return gulp.src(scripts)
|
||||
.pipe(concat('app.js'))
|
||||
.pipe(gulp.dest('./js/'));
|
||||
});
|
||||
|
||||
gulp.task('default', ['js']);
|
|
@ -9,16 +9,8 @@
|
|||
<link href="./css/app.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button></button>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="toolbar">
|
||||
</nav>
|
||||
<script src="./js/jquery-1.11.3.min.js"></script>
|
||||
<script src="./js/w2ui-1.4.3.min.js"></script>
|
||||
<script src="./js/chroma.min.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
<script src="./js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -1,10 +0,0 @@
|
|||
var ipcRenderer = require('electron').ipcRenderer,
|
||||
light = {};
|
||||
//console.log(ipcRenderer.sendSync('light', { 'fuck' : true }) );
|
||||
|
||||
|
||||
light.set = function (color) {
|
||||
'use strict';
|
||||
console.log('color: ' + color.join(','));
|
||||
ipcRenderer.sendSync('light', color);
|
||||
};
|
|
@ -25,7 +25,10 @@
|
|||
"devDependencies": {
|
||||
"electron-packager": "^6.0.2",
|
||||
"electron-prebuilt": "^0.37.5",
|
||||
"electron-rebuild": "^1.1.3"
|
||||
"electron-rebuild": "^1.1.3",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-less": "^3.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-notifier": "^4.5.0",
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
var ipcRenderer = require('electron').ipcRenderer,
|
||||
light = {};
|
||||
//console.log(ipcRenderer.sendSync('light', { 'fuck' : true }) );
|
||||
|
||||
|
||||
light.set = function (color) {
|
||||
'use strict';
|
||||
console.log('color: ' + color.join(','));
|
||||
ipcRenderer.sendSync('light', color);
|
||||
};
|
||||
|
||||
|
||||
var init = function () {
|
||||
'use strict';
|
||||
$('#toolbar').w2toolbar({
|
||||
name: 'toolbar',
|
||||
items: [
|
||||
{ type: 'check', id: 'item1', caption: 'Check', img: 'icon-page', checked: true },
|
||||
{ type: 'break', id: 'break0' },
|
||||
{ type: 'menu', id: 'item2', caption: 'Drop Down', img: 'icon-folder', items: [
|
||||
{ text: 'Item 1', icon: 'icon-page' },
|
||||
{ text: 'Item 2', icon: 'icon-page' },
|
||||
{ text: 'Item 3', value: 'Item Three', icon: 'icon-page' }
|
||||
]},
|
||||
{ type: 'break', id: 'break1' },
|
||||
{ type: 'radio', id: 'item3', group: '1', caption: 'Radio 1', icon: 'fa-star', checked: true },
|
||||
{ type: 'radio', id: 'item4', group: '1', caption: 'Radio 2', icon: 'fa-star-empty' },
|
||||
{ type: 'spacer' },
|
||||
{ type: 'button', id: 'item5', caption: 'Item 5', icon: 'fa-home' }
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
Loading…
Reference in New Issue