Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
First attempt to make neutron configurable (as of #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-foto committed Aug 7, 2015
1 parent 2206a82 commit a4f4abb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .neutronrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"baseDir": "src",
"sources": {
"scripts": ["js", "jsx"],
"styles": ["scss", "css"],
"fonts": ["eot", "ttf", "woff", "woff2"],
"views": ["jade"]
}
}
21 changes: 12 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ var fs = require('fs');
var del = require('del');
var spawn = require('child_process').spawn;
var electron = require('electron-prebuilt');
var config = JSON.parse(fs.readFileSync('./.neutronrc'));

var sources = {
scripts: 'src/**/*.js',
views: 'src/**/*.jade',
styles: 'src/**/*.{scss,css}',
fonts: 'src/**/*.{eot, ttf, woff, woff2}',
bower: 'bower.json'
};
// Prepare sources
var sources = {};
Object.keys(config.sources).forEach(function(type) {
sources[type] = config.sources[type].map(function(src) {
return config.baseDir + '/**/*.' + src;
});
sources[type].push('!' + config.baseDir + '/node_modules/**');
});
sources.bower = 'bower.json';

gulp.task('jshint', function() {
return gulp.src([sources.scripts , 'gulpfile.js'])
return gulp.src(sources.scripts.concat('gulpfile.js'))
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.jshint.reporter('fail'));
});

gulp.task('jscs', function() {
return gulp.src([sources.scripts , 'gulpfile.js'])
return gulp.src(sources.scripts.concat('gulpfile.js'))
.pipe($.jscs())
.pipe($.jshint.reporter('fail'));
});
Expand Down

0 comments on commit a4f4abb

Please sign in to comment.