Skip to content

Chore: update generator deps #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
'use strict';
var markdown = require('marked');

var semver = require('semver');
var _s = require('underscore.string');
var shell = require('shelljs');
var child_process = require('child_process');
var Q = require('q');
var helpers = require('yeoman-generator').test;
var fs = require('fs-extra');
var fs = require('fs');
var path = require('path');

module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
// Load grunt tasks automatically, when needed
require('jit-grunt')(grunt, {
buildcontrol: 'grunt-build-control',
changelog: 'grunt-conventional-changelog'
});

grunt.initConfig({
config: {
Expand Down Expand Up @@ -218,7 +221,6 @@ module.exports = function (grunt) {
});

grunt.registerTask('updateFixtures', 'updates package and bower fixtures', function() {
var done = this.async();
var packageJson = fs.readFileSync(path.resolve('app/templates/_package.json'), 'utf8');
var bowerJson = fs.readFileSync(path.resolve('app/templates/_bower.json'), 'utf8');

Expand All @@ -231,11 +233,8 @@ module.exports = function (grunt) {
bowerJson = bowerJson.replace(/<%(.*)%>/g, '');

// save files
fs.writeFile(path.resolve(__dirname + '/test/fixtures/package.json'), packageJson, function() {
fs.writeFile(path.resolve(__dirname + '/test/fixtures/bower.json'), bowerJson, function() {
done();
});
});
fs.writeFileSync(path.resolve(__dirname + '/test/fixtures/package.json'), packageJson);
fs.writeFileSync(path.resolve(__dirname + '/test/fixtures/bower.json'), bowerJson);
});

grunt.registerTask('installFixtures', 'install package and bower fixtures', function() {
Expand Down
22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,28 @@
"test": "grunt test"
},
"dependencies": {
"chalk": "~0.4.0",
"chalk": "^1.1.0",
"generator-ng-component": "~0.1.0",
"yeoman-generator": "~0.18.10"
},
"devDependencies": {
"chai": "^1.9.1",
"fs-extra": "^0.9.1",
"chai": "^3.2.0",
"grunt": "~0.4.1",
"grunt-build-control": "DaftMonk/grunt-build-control",
"grunt-build-control": "^0.5.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-jshint": "^0.11.2",
"grunt-conventional-changelog": "~1.0.0",
"grunt-david": "~0.5.0",
"grunt-env": "^0.4.1",
"grunt-mocha-test": "^0.11.0",
"grunt-release": "~0.6.0",
"load-grunt-tasks": "~0.2.0",
"marked": "~0.2.8",
"mocha": "~1.21.0",
"grunt-mocha-test": "^0.12.7",
"grunt-release": "^0.13.0",
"jit-grunt": "^0.9.1",
"mocha": "^2.2.5",
"q": "^1.0.1",
"recursive-readdir": "^1.2.0",
"semver": "~2.2.1",
"shelljs": "^0.3.0",
"underscore.string": "^2.3.3"
"semver": "^5.0.1",
"shelljs": "^0.5.3",
"underscore.string": "^3.1.1"
},
"engines": {
"node": ">=0.10.0",
Expand Down
8 changes: 5 additions & 3 deletions test/test-file-creation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*global describe, beforeEach, it */
'use strict';
var path = require('path');
var fs = require('fs-extra');
var fs = require('fs');
var exec = require('child_process').exec;
var helpers = require('yeoman-generator').test;
var chai = require('chai');
Expand All @@ -25,6 +25,8 @@ describe('angular-fullstack generator', function () {
socketio: true
}, dependenciesInstalled = false;

function copySync(s, d) { fs.writeFileSync(d, fs.readFileSync(s)); }

function generatorTest(generatorType, name, mockPrompt, callback) {
gen.run(function () {
var afGenerator;
Expand Down Expand Up @@ -442,7 +444,7 @@ describe('angular-fullstack generator', function () {

it('should use existing config if available', function(done) {
this.timeout(60000);
fs.copySync(__dirname + '/fixtures/.yo-rc.json', __dirname + '/temp/.yo-rc.json');
copySync(__dirname + '/fixtures/.yo-rc.json', __dirname + '/temp/.yo-rc.json');
var gen = helpers.createGenerator('angular-fullstack:app', [
'../../app',
'../../endpoint',
Expand All @@ -467,7 +469,7 @@ describe('angular-fullstack generator', function () {

it('should add oauth option if existing config had oauth strategy selected', function(done) {
this.timeout(60000);
fs.copySync(__dirname + '/fixtures/.yo-rc.json', __dirname + '/temp/.yo-rc.json');
copySync(__dirname + '/fixtures/.yo-rc.json', __dirname + '/temp/.yo-rc.json');
var gen = helpers.createGenerator('angular-fullstack:app', [
'../../app',
'../../endpoint',
Expand Down