Skip to content

Commit

Permalink
feat(gen:gulp): add TODO tasks in gulpfile. rm 2 old grunt tasks
Browse files Browse the repository at this point in the history
remove updateFixtures & installFixtures tasks from gruntfile since already ported to gulpfile

[skip ci]
  • Loading branch information
Awk34 committed Aug 11, 2016
1 parent a76034b commit 1e25de7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 43 deletions.
43 changes: 0 additions & 43 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,49 +261,6 @@ module.exports = function (grunt) {
}
});

grunt.registerTask('updateFixtures', 'updates package and bower fixtures', function(target) {
var genVer = require('./package.json').version;
var dest = __dirname + ((target === 'deps') ? '/angular-fullstack-deps/' : '/test/fixtures/');
var appName = (target === 'deps') ? 'angular-fullstack-deps' : 'tempApp';

var processJson = function(s, d) {
// read file, strip all ejs conditionals, and parse as json
var json = JSON.parse(fs.readFileSync(path.resolve(s), 'utf8').replace(/<%(.*)%>/g, ''));
// set properties
json.name = appName, json.version = genVer;
if (target === 'deps') { json.private = false; }
// stringify json and write it to the destination
fs.writeFileSync(path.resolve(d), JSON.stringify(json, null, 2));
};

processJson('templates/app/_package.json', dest + 'package.json');
processJson('templates/app/_bower.json', dest + 'bower.json');
});

grunt.registerTask('installFixtures', 'install package and bower fixtures', function() {
var done = this.async();

shell.cd('test/fixtures');
grunt.log.ok('installing npm dependencies for generated app');
child_process.exec('npm install --quiet', {cwd: '../fixtures'}, function (error, stdout, stderr) {

grunt.log.ok('installing bower dependencies for generated app');
child_process.exec('bower install', {cwd: '../fixtures'}, function (error, stdout, stderr) {

if(!process.env.SAUCE_USERNAME) {
grunt.log.ok('running npm run-script update-webdriver');
child_process.exec('npm run-script update-webdriver', function() {
shell.cd('../../');
done();
});
} else {
shell.cd('../../');
done();
}
})
});
});

grunt.registerTask('test', function(target, option) {
if (target === 'fast') {
grunt.task.run([
Expand Down
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,13 @@ gulp.task('test', () => {
return gulp.src(['test/pre.test.js', 'test/*.test.js'])
.pipe(mocha());
});

gulp.task('updateSubmodules', () => console.log('TODO'));
gulp.task('changelog', () => console.log('TODO'));
gulp.task('generateDemo', () => console.log('TODO'));
gulp.task('demo', () => console.log('TODO')); // ['clean:demo', 'generateDemo']
gulp.task('releaseDemo', () => console.log('TODO')); //['demo', 'releaseDemoBuild', 'buildcontrol:release']
gulp.task('releaseDemoBuild', () => console.log('TODO'));
gulp.task('deps', () => console.log('TODO')); // updateFixtures, david
gulp.task('release', () => console.log('TODO'));
gulp.task('lint', () => console.log('TODO'));

0 comments on commit 1e25de7

Please sign in to comment.