Skip to content

Commit

Permalink
feat(gen): also build test dir (just like generators dir)
Browse files Browse the repository at this point in the history
  • Loading branch information
Awk34 committed May 2, 2016
1 parent 621acec commit e09fb76
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
node_modules
bower_components
test/temp
/generators/*
/test/*
demo
.idea
.DS_Store
release.txt
test/fixtures/bower.json
test/fixtures/package.json
generators
release.txt
16 changes: 14 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,36 @@ var gulp = require('gulp');
var babel = require('gulp-babel');
var del = require('del');
var runSequence = require('run-sequence');
var merge = require('merge-stream');

gulp.task('clean', () => {
return del(['generators/**/*']);
});

gulp.task('babel', () => {
return gulp.src(['src/**/*.js'])
let generators = gulp.src(['src/generators/**/*.js'])
.pipe(babel())
.pipe(gulp.dest('generators'));

let test = gulp.src(['src/test/**/*.js'])
.pipe(babel())
.pipe(gulp.dest('test'));

return merge(generators);
});

gulp.task('watch', () => {
return gulp.watch('src/**/*.js', ['babel']);
});

gulp.task('copy', () => {
return gulp.src(['src/**/*', '!src/**/*.js'])
let nonJsGen = gulp.src(['src/generators/**/*', '!src/generators/**/*.js'], {dot: true})
.pipe(gulp.dest('generators'));

let nonJsTest = gulp.src(['src/test/**/*', '!src/test/**/*.js'], {dot: true})
.pipe(gulp.dest('test'));

return merge(nonJsGen, nonJsTest);
});

gulp.task('build', cb => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"grunt-release": "^0.13.0",
"gulp": "^3.9.1",
"jit-grunt": "~0.10.0",
"merge-stream": "^1.0.0",
"mocha": "^2.2.5",
"q": "^1.0.1",
"recursive-readdir": "^2.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/test/fixtures/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
36 changes: 36 additions & 0 deletions src/test/fixtures/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"generator-angular-fullstack": {
"endpointDirectory": "server/api/",
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,
"registerSocketsFile": "server/config/socketio.js",
"socketsNeedle": "// Insert sockets below",
"insertModels": true,
"registerModelsFile": "server/sqldb/index.js",
"modelsNeedle": "// Insert models below",
"filters": {
"babel": true,
"html": true,
"less": true,
"uirouter": true,
"bootstrap": false,
"uibootstrap": false,
"socketio": true,
"auth": true,
"models": true,
"mongooseModels": true,
"mongoose": true,
"oauth": true,
"googleAuth": true,
"grunt": true,
"mocha": true,
"jasmine": false,
"should": true,
"expect": false
}
}
}
File renamed without changes.

0 comments on commit e09fb76

Please sign in to comment.