generator-folklore 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/lib/generators/babel/index.js +8 -1
  2. package/lib/generators/build/index.js +3 -1
  3. package/lib/generators/cli/index.js +4 -1
  4. package/lib/generators/docs/index.js +9 -4
  5. package/lib/generators/eslint/index.js +12 -1
  6. package/lib/generators/intl/index.js +3 -1
  7. package/lib/generators/laravel-panneau/index.js +7 -1
  8. package/lib/generators/laravel-panneau/templates/app/Contracts/Resources/Block.php +10 -0
  9. package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlockResource.php +1 -1
  10. package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlocksCollection.php +2 -0
  11. package/lib/generators/laravel-panneau/templates/app/Http/Resources/PageResource.php +6 -4
  12. package/lib/generators/laravel-panneau/templates/app/Models/Block.php +10 -0
  13. package/lib/generators/laravel-panneau/templates/app/Models/Media.php +11 -0
  14. package/lib/generators/laravel-panneau/templates/app/Models/Page.php +12 -2
  15. package/lib/generators/laravel-panneau/templates/app/Resources/Block.php +10 -0
  16. package/lib/generators/laravel-panneau/templates/app/Resources/Blocks/ImageBlock.php +1 -1
  17. package/lib/generators/laravel-panneau/templates/app/Resources/Blocks/TextBlock.php +1 -1
  18. package/lib/generators/laravel-project/index.js +1 -1
  19. package/lib/generators/laravel-project/templates/laravel/app/Actions/Fortify/CreateNewUser.php +41 -0
  20. package/lib/generators/laravel-project/templates/laravel/app/Actions/Fortify/ResetUserPassword.php +31 -0
  21. package/lib/generators/laravel-project/templates/laravel/app/Actions/Fortify/UpdateUserPassword.php +34 -0
  22. package/lib/generators/laravel-project/templates/laravel/app/Actions/Fortify/UpdateUserProfileInformation.php +61 -0
  23. package/lib/generators/laravel-project/templates/laravel/config/app.php +1 -0
  24. package/lib/generators/lerna-repository/index.js +8 -3
  25. package/lib/generators/npm-package/index.js +6 -2
  26. package/lib/generators/prettier/index.js +5 -1
  27. package/lib/generators/react-app/index.js +22 -2
  28. package/lib/generators/react-package/index.js +14 -5
  29. package/lib/generators/rollup/index.js +8 -1
  30. package/lib/generators/server/index.js +9 -2
  31. package/lib/generators/storybook/index.js +9 -1
  32. package/lib/generators/stylelint/index.js +6 -1
  33. package/lib/generators/test/index.js +10 -1
  34. package/package.json +3 -3
@@ -56,7 +56,14 @@ module.exports = class BabelGenerator extends _generator.default {
56
56
  },
57
57
 
58
58
  dependencies() {
59
- this.addDevDependencies(['@babel/cli', '@babel/core', '@babel/node', '@babel/plugin-transform-runtime', '@babel/preset-env', '@babel/preset-react']);
59
+ this.addDevDependencies({
60
+ '@babel/core': '^7.19.3',
61
+ '@babel/cli': 'latest',
62
+ '@babel/node': 'latest',
63
+ '@babel/plugin-transform-runtime': 'latest',
64
+ '@babel/preset-env': 'latest',
65
+ '@babel/preset-react': 'latest'
66
+ });
60
67
  }
61
68
 
62
69
  };
@@ -92,7 +92,9 @@ module.exports = class AppGenerator extends _generator.default {
92
92
  },
93
93
 
94
94
  dependencies() {
95
- this.addDevDependencies(['@folklore/cli@^0.0.47']);
95
+ this.addDevDependencies({
96
+ '@folklore/cli': '^0.0.47'
97
+ });
96
98
  }
97
99
 
98
100
  };
@@ -75,7 +75,10 @@ module.exports = class CliGenerator extends _generator.default {
75
75
  },
76
76
 
77
77
  dependencies() {
78
- this.addDependencies(['commander', 'debug']);
78
+ this.addDependencies({
79
+ 'commander': 'latest',
80
+ 'debug': 'latest'
81
+ });
79
82
  }
80
83
 
81
84
  };
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _chalk = _interopRequireDefault(require("chalk"));
4
+
3
5
  var _lodash = _interopRequireDefault(require("lodash"));
4
6
 
5
7
  var _path = _interopRequireDefault(require("path"));
6
8
 
7
- var _chalk = _interopRequireDefault(require("chalk"));
8
-
9
9
  var _generator = _interopRequireDefault(require("../../lib/generator"));
10
10
 
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -141,10 +141,15 @@ module.exports = class DocsGenerator extends _generator.default {
141
141
  return;
142
142
  }
143
143
 
144
- this.addDevDependencies(['gitbook-cli@latest']);
144
+ this.addDevDependencies({
145
+ 'gitbook-cli': 'latest'
146
+ });
145
147
 
146
148
  if (this.options.language === 'js') {
147
- this.addDevDependencies(['jsdoc@latest', 'jsdoc-babel@latest']);
149
+ this.addDevDependencies({
150
+ jsdoc: 'latest',
151
+ 'jsdoc-babel': 'latest'
152
+ });
148
153
  }
149
154
  }
150
155
 
@@ -32,7 +32,18 @@ module.exports = class EslintGenerator extends _generator.default {
32
32
  },
33
33
 
34
34
  dependencies() {
35
- this.addDevDependencies(['babel-preset-airbnb@^5.0.0', '@babel/eslint-parser@^7.0.0', 'eslint@^8.0.0', 'eslint-config-airbnb@^19.0.0', 'eslint-config-prettier@^8.0.0', 'eslint-plugin-prettier@^4.0.0', 'eslint-plugin-import@^2.0.0', 'eslint-plugin-jsx-a11y@^6.0.0', 'eslint-plugin-react@^7.0.0', 'eslint-plugin-formatjs@^4.0.0']);
35
+ this.addDevDependencies({
36
+ 'babel-preset-airbnb': 'latest',
37
+ '@babel/eslint-parser': 'latest',
38
+ eslint: '^8.0.0',
39
+ 'eslint-config-airbnb': 'latest',
40
+ 'eslint-config-prettier': 'latest',
41
+ 'eslint-plugin-prettier': 'latest',
42
+ 'eslint-plugin-import': 'latest',
43
+ 'eslint-plugin-jsx-a11y': 'latest',
44
+ 'eslint-plugin-react': 'latest',
45
+ 'eslint-plugin-formatjs': 'latest'
46
+ });
36
47
  }
37
48
 
38
49
  };
@@ -76,7 +76,9 @@ module.exports = class IntlGenerator extends _generator.default {
76
76
  },
77
77
 
78
78
  dependencies() {
79
- this.addDevDependencies(['@folklore/cli@^0.0.47']);
79
+ this.addDevDependencies({
80
+ '@folklore/cli': '^0.0.47'
81
+ });
80
82
  }
81
83
 
82
84
  };
@@ -69,7 +69,13 @@ module.exports = class LaravelPanneauGenerator extends _generator.default {
69
69
  },
70
70
 
71
71
  packageJSON() {
72
- this.addDependencies(['@panneau/app@^1.0.3-alpha.1', '@panneau/core@^1.0.3-alpha.1', '@panneau/data@^1.0.3-alpha.1', '@panneau/field-text@^1.0.3-alpha.1', '@panneau/field-localized@^1.0.3-alpha.1']);
72
+ this.addDependencies({
73
+ '@panneau/app': '^1.0.3-alpha.1',
74
+ '@panneau/core': '^1.0.3-alpha.1',
75
+ '@panneau/data': '^1.0.3-alpha.1',
76
+ '@panneau/field-text': '^1.0.3-alpha.1',
77
+ '@panneau/field-localized': '^1.0.3-alpha.1'
78
+ });
73
79
  },
74
80
 
75
81
  config() {
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ namespace App\Contracts\Resources;
4
+
5
+ use Folklore\Contracts\Resources\Block as BaseBlock;
6
+
7
+ interface Block extends BaseBlock
8
+ {
9
+
10
+ }
@@ -3,7 +3,7 @@
3
3
  namespace App\Http\Resources;
4
4
 
5
5
  use Illuminate\Http\Resources\Json\JsonResource;
6
- use App\Contracts\Resources\HasBlocks;
6
+ use Folklore\Contracts\Resources\HasBlocks;
7
7
  use Folklore\Http\Resources\LocalizedResource;
8
8
  use App\Contracts\Resources\Blocks\Text as TextBlock;
9
9
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  namespace App\Http\Resources;
4
4
 
5
+ use Folklore\Http\Resources\Collection;
6
+
5
7
  class BlocksCollection extends Collection
6
8
  {
7
9
  public $collects = BlockResource::class;
@@ -3,10 +3,10 @@
3
3
  namespace App\Http\Resources;
4
4
 
5
5
  use Illuminate\Http\Resources\Json\JsonResource;
6
- use App\Http\Resources\Medias\ImageResource;
7
6
  use App\Contracts\Resources\Page;
8
- use App\Contracts\Resources\HasBlocks;
9
7
  use App\Contracts\Resources\Pages\Home as HomePage;
8
+ use Folklore\Http\Resources\MediaResource;
9
+ use Folklore\Contracts\Resources\HasBlocks;
10
10
 
11
11
  class PageResource extends JsonResource
12
12
  {
@@ -19,6 +19,8 @@ class PageResource extends JsonResource
19
19
  public function toArray($request)
20
20
  {
21
21
  $locale = $request->locale();
22
+ $image = $this->image();
23
+ $parent = $this->parent();
22
24
  return [
23
25
  'id' => $this->id(),
24
26
  'type' => $this->type(),
@@ -26,10 +28,10 @@ class PageResource extends JsonResource
26
28
  'title' => $this->title($locale),
27
29
  'description' => $this->description($locale),
28
30
  'slug' => $this->slug($locale),
29
- 'image' => !is_null($image) ? new ImageResource($image) : null,
31
+ 'image' => !is_null($image) ? new MediaResource($image) : null,
30
32
  'parent' =>
31
33
  !is_null($parent) && $parent instanceof Page
32
- ? new ParentPageResource($parent)
34
+ ? new PageResource($parent)
33
35
  : null,
34
36
 
35
37
  $this->mergeWhen($this->resource instanceof HasBlocks, function () {
@@ -2,12 +2,22 @@
2
2
 
3
3
  namespace App\Models;
4
4
 
5
+ use App\Contracts\Resources\Block as BlockContract;
6
+ use App\Resources\Block as BlockResource;
5
7
  use Folklore\Models\Block as BaseBlock;
8
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
6
9
 
7
10
  class Block extends BaseBlock
8
11
  {
12
+ use HasFactory;
13
+
9
14
  protected $typeResources = [
10
15
  'text' => \App\Resources\Blocks\TextBlock::class,
11
16
  'image' => \App\Resources\Blocks\ImageBlock::class,
12
17
  ];
18
+
19
+ public function toResource(): BlockContract
20
+ {
21
+ return $this->toTypedResource() ?? new BlockResource($this);
22
+ }
13
23
  }
@@ -0,0 +1,11 @@
1
+ <?php
2
+
3
+ namespace App\Models;
4
+
5
+ use Folklore\Models\Media as BaseMedia;
6
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
7
+
8
+ class Media extends BaseMedia
9
+ {
10
+ use HasFactory;
11
+ }
@@ -2,11 +2,21 @@
2
2
 
3
3
  namespace App\Models;
4
4
 
5
+ use App\Contracts\Resources\Page as PageContract;
6
+ use App\Resources\Page as PageResource;
5
7
  use Folklore\Models\Page as BasePage;
8
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
6
9
 
7
10
  class Page extends BasePage
8
11
  {
9
- protected $typeResources = [
10
- 'text' => \App\Resources\Pages\HomePage::class,
12
+ use HasFactory;
13
+
14
+ protected $typedResources = [
15
+ 'home' => \App\Resources\Pages\HomePage::class,
11
16
  ];
17
+
18
+ public function toResource(): PageContract
19
+ {
20
+ return $this->toTypedResource() ?? new PageResource($this);
21
+ }
12
22
  }
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ namespace App\Resources;
4
+
5
+ use Folklore\Resources\Block as BaseBlock;
6
+
7
+ class Block extends BaseBlock
8
+ {
9
+
10
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  namespace App\Resources\Blocks;
4
4
 
5
- use Folklore\Resources\Block;
5
+ use App\Resources\Block;
6
6
  use App\Contracts\Resources\Blocks\Text as TextBlockContract;
7
7
  use Folklore\Contracts\Resources\Image as ImageContract;
8
8
  use Folklore\Resources\Image;
@@ -2,7 +2,7 @@
2
2
 
3
3
  namespace App\Resources\Blocks;
4
4
 
5
- use Folklore\Resources\Block;
5
+ use App\Resources\Block;
6
6
  use App\Contracts\Resources\Blocks\Text as TextBlockContract;
7
7
 
8
8
  class TextBlock extends Block implements TextBlockContract
@@ -373,7 +373,7 @@ module.exports = class LaravelProjectGenerator extends _generator.default {
373
373
  },
374
374
  extra: {
375
375
  laravel: {
376
- 'dont-discover': ['laravel/telescope']
376
+ 'dont-discover': ['laravel/telescope', 'folklore/laravel-folklore']
377
377
  }
378
378
  }
379
379
  });
@@ -0,0 +1,41 @@
1
+ <?php
2
+
3
+ namespace App\Actions\Fortify;
4
+
5
+ use App\Contracts\Repositories\Users;
6
+ use Illuminate\Support\Facades\Hash;
7
+ use Illuminate\Support\Facades\Validator;
8
+ use Illuminate\Validation\Rule;
9
+ use Laravel\Fortify\Contracts\CreatesNewUsers;
10
+
11
+ class CreateNewUser implements CreatesNewUsers
12
+ {
13
+ use PasswordValidationRules;
14
+
15
+ /**
16
+ * Validate and create a newly registered user.
17
+ *
18
+ * @param array $input
19
+ * @return \App\Models\User
20
+ */
21
+ public function create(array $input)
22
+ {
23
+ Validator::make($input, [
24
+ 'name' => ['required', 'string', 'max:255'],
25
+ 'email' => [
26
+ 'required',
27
+ 'string',
28
+ 'email',
29
+ 'max:255',
30
+ Rule::unique(User::class),
31
+ ],
32
+ 'password' => $this->passwordRules(),
33
+ ])->validate();
34
+
35
+ return resolve(Users::class)->create([
36
+ 'name' => $input['name'],
37
+ 'email' => $input['email'],
38
+ 'password' => Hash::make($input['password']),
39
+ ]);
40
+ }
41
+ }
@@ -0,0 +1,31 @@
1
+ <?php
2
+
3
+ namespace App\Actions\Fortify;
4
+
5
+ use Illuminate\Support\Facades\Hash;
6
+ use Illuminate\Support\Facades\Validator;
7
+ use Laravel\Fortify\Contracts\ResetsUserPasswords;
8
+ use App\Contracts\Repositories\Users;
9
+
10
+ class ResetUserPassword implements ResetsUserPasswords
11
+ {
12
+ use PasswordValidationRules;
13
+
14
+ /**
15
+ * Validate and reset the user's forgotten password.
16
+ *
17
+ * @param mixed $user
18
+ * @param array $input
19
+ * @return void
20
+ */
21
+ public function reset($user, array $input)
22
+ {
23
+ Validator::make($input, [
24
+ 'password' => $this->passwordRules(),
25
+ ])->validate();
26
+
27
+ resolve(Users::class)->update($user->id(), [
28
+ 'password' => Hash::make($input['password']),
29
+ ]);
30
+ }
31
+ }
@@ -0,0 +1,34 @@
1
+ <?php
2
+
3
+ namespace App\Actions\Fortify;
4
+
5
+ use Illuminate\Support\Facades\Hash;
6
+ use Illuminate\Support\Facades\Validator;
7
+ use Laravel\Fortify\Contracts\UpdatesUserPasswords;
8
+ use App\Contracts\Repositories\Users;
9
+
10
+ class UpdateUserPassword implements UpdatesUserPasswords
11
+ {
12
+ use PasswordValidationRules;
13
+
14
+ /**
15
+ * Validate and update the user's password.
16
+ *
17
+ * @param mixed $user
18
+ * @param array $input
19
+ * @return void
20
+ */
21
+ public function update($user, array $input)
22
+ {
23
+ Validator::make($input, [
24
+ 'current_password' => ['required', 'string', 'current_password:web'],
25
+ 'password' => $this->passwordRules(),
26
+ ], [
27
+ 'current_password.current_password' => __('The provided password does not match your current password.'),
28
+ ])->validateWithBag('updatePassword');
29
+
30
+ resolve(Users::class)->update($user->id(), [
31
+ 'password' => Hash::make($input['password']),
32
+ ]);
33
+ }
34
+ }
@@ -0,0 +1,61 @@
1
+ <?php
2
+
3
+ namespace App\Actions\Fortify;
4
+
5
+ use Illuminate\Contracts\Auth\MustVerifyEmail;
6
+ use Illuminate\Support\Facades\Validator;
7
+ use Illuminate\Validation\Rule;
8
+ use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
9
+ use App\Contracts\Repositories\Users;
10
+
11
+ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
12
+ {
13
+ /**
14
+ * Validate and update the given user's profile information.
15
+ *
16
+ * @param mixed $user
17
+ * @param array $input
18
+ * @return void
19
+ */
20
+ public function update($user, array $input)
21
+ {
22
+ Validator::make($input, [
23
+ 'name' => ['required', 'string', 'max:255'],
24
+
25
+ 'email' => [
26
+ 'required',
27
+ 'string',
28
+ 'email',
29
+ 'max:255',
30
+ Rule::unique('users')->ignore($user->id()),
31
+ ],
32
+ ])->validateWithBag('updateProfileInformation');
33
+
34
+ if ($input['email'] !== $user->email() && $user instanceof MustVerifyEmail) {
35
+ $this->updateVerifiedUser($user, $input);
36
+ } else {
37
+ resolve(Users::class)->update($user->id(), [
38
+ 'name' => $input['name'],
39
+ 'email' => $input['email'],
40
+ ]);
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Update the given verified user's profile information.
46
+ *
47
+ * @param mixed $user
48
+ * @param array $input
49
+ * @return void
50
+ */
51
+ protected function updateVerifiedUser($user, array $input)
52
+ {
53
+ $user = resolve(Users::class)->update($user->id(), [
54
+ 'name' => $input['name'],
55
+ 'email' => $input['email'],
56
+ 'email_verified_at' => null,
57
+ ]);
58
+
59
+ $user->sendEmailVerificationNotification();
60
+ }
61
+ }
@@ -185,6 +185,7 @@ return [
185
185
  /*
186
186
  * Package Service Providers...
187
187
  */
188
+ Folklore\ServiceProvider::class,
188
189
 
189
190
  /*
190
191
  * Application Service Providers...
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _chalk = _interopRequireDefault(require("chalk"));
4
+
3
5
  var _lodash = _interopRequireDefault(require("lodash"));
4
6
 
5
7
  var _path = _interopRequireDefault(require("path"));
6
8
 
7
- var _chalk = _interopRequireDefault(require("chalk"));
8
-
9
9
  var _generator = _interopRequireDefault(require("../../lib/generator"));
10
10
 
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -217,7 +217,12 @@ module.exports = class LernaRepositoryGenerator extends _generator.default {
217
217
  return;
218
218
  }
219
219
 
220
- this.addDevDependencies(['lerna@latest', 'glob@latest', 'mkdirp@latest', '@babel/runtime@latest']);
220
+ this.addDevDependencies({
221
+ lerna: 'latest',
222
+ glob: 'latest',
223
+ mkdirp: 'latest',
224
+ '@babel/runtime': 'latest'
225
+ });
221
226
  },
222
227
 
223
228
  bootstrap() {
@@ -240,8 +240,12 @@ module.exports = class NpmPackageGenerator extends _generator.default {
240
240
  return;
241
241
  }
242
242
 
243
- this.addDependencies(['@babel/runtime@latest']);
244
- this.addDevDependencies(['jest@latest']);
243
+ this.addDependencies({
244
+ '@babel/runtime': 'latest'
245
+ });
246
+ this.addDevDependencies({
247
+ jest: 'latest'
248
+ });
245
249
  }
246
250
 
247
251
  };
@@ -31,7 +31,11 @@ module.exports = class PrettierGenerator extends _generator.default {
31
31
  },
32
32
 
33
33
  dependencies() {
34
- this.addDevDependencies(['prettier@^2.0.0', '@prettier/plugin-php@^0.18.0', '@trivago/prettier-plugin-sort-imports@^3.0.0']);
34
+ this.addDevDependencies({
35
+ prettier: 'latest',
36
+ '@prettier/plugin-php': 'latest',
37
+ '@trivago/prettier-plugin-sort-imports': 'latest'
38
+ });
35
39
  }
36
40
 
37
41
  };
@@ -108,8 +108,28 @@ module.exports = class ReactAppGenerator extends _generator.default {
108
108
  },
109
109
 
110
110
  dependencies() {
111
- this.addDependencies(['react@^18.0.0', 'react-dom@^18.0.0', 'prop-types@^15.0.0', 'react-intl@^6.0.0', 'react-router@^6.0.0', 'react-router-dom@^6.0.0', 'react-helmet@^6.0.0', 'classnames@^2.0.0', '@folklore/routes@^0.1.0', '@folklore/fonts@^0.0.1', '@folklore/forms@^0.0.1', '@folklore/fetch@^0.1.0', '@folklore/hooks@^0.0.1', '@folklore/tracking@^0.0.1', // Polyfills
112
- 'intl@^1.0.0', '@formatjs/intl-locale@^3.0.0', '@formatjs/intl-pluralrules@^5.0.0', 'intersection-observer@^0.12.0', 'resize-observer-polyfill@1.0.0']);
111
+ this.addDependencies({
112
+ react: '^18.0.0',
113
+ 'react-dom': '^18.0.0',
114
+ 'prop-types': '^15.0.0',
115
+ 'react-intl': '^6.0.0',
116
+ 'react-router': '^6.0.0',
117
+ 'react-router-dom': '^6.0.0',
118
+ 'react-helmet': '^6.0.0',
119
+ classnames: 'latest',
120
+ '@folklore/routes': '^0.1.1',
121
+ '@folklore/fonts': '^0.0.11',
122
+ '@folklore/forms': '^0.0.19',
123
+ '@folklore/fetch': '^0.1.15',
124
+ '@folklore/hooks': '^0.0.27',
125
+ '@folklore/tracking': '^0.0.14',
126
+ // Polyfills
127
+ intl: 'latest',
128
+ '@formatjs/intl-locale': 'latest',
129
+ '@formatjs/intl-pluralrules': 'latest',
130
+ 'intersection-observer': 'latest',
131
+ 'resize-observer-polyfill': 'latest'
132
+ });
113
133
  }
114
134
 
115
135
  };
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _lodash = _interopRequireDefault(require("lodash"));
4
-
5
- var _path = _interopRequireDefault(require("path"));
6
-
7
3
  var _chalk = _interopRequireDefault(require("chalk"));
8
4
 
9
5
  var _changeCase = require("change-case");
10
6
 
7
+ var _lodash = _interopRequireDefault(require("lodash"));
8
+
9
+ var _path = _interopRequireDefault(require("path"));
10
+
11
11
  var _generator = _interopRequireDefault(require("../../lib/generator"));
12
12
 
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -192,7 +192,16 @@ module.exports = class ReactPackageGenerator extends _generator.default {
192
192
  return;
193
193
  }
194
194
 
195
- this.addDevDependencies(['domready@latest', 'jquery@latest', 'enzyme@latest', 'react-test-renderer@latest', '@storybook/react@latest', '@storybook/addon-actions@latest', 'extract-text-webpack-plugin@latest', 'html-webpack-plugin@latest']);
195
+ this.addDevDependencies({
196
+ domready: 'latest',
197
+ jquery: 'latest',
198
+ enzyme: 'latest',
199
+ 'react-test-renderer': 'latest',
200
+ '@storybook/react': 'latest',
201
+ '@storybook/addon-actions': 'latest',
202
+ 'extract-text-webpack-plugin': 'latest',
203
+ 'html-webpack-plugin': 'latest'
204
+ });
196
205
  }
197
206
 
198
207
  };
@@ -37,7 +37,14 @@ module.exports = class RollupGenerator extends _generator.default {
37
37
  },
38
38
 
39
39
  dependencies() {
40
- this.addDevDependencies(['@rollup/plugin-babel', '@rollup/plugin-commonjs', '@rollup/plugin-json', '@rollup/plugin-node-resolve', '@rollup/plugin-replace', 'rollup']);
40
+ this.addDevDependencies({
41
+ '@rollup/plugin-babel': 'latest',
42
+ '@rollup/plugin-commonjs': 'latest',
43
+ '@rollup/plugin-json': 'latest',
44
+ '@rollup/plugin-node-resolve': 'latest',
45
+ '@rollup/plugin-replace': 'latest',
46
+ rollup: '^2.79.1'
47
+ });
41
48
  }
42
49
 
43
50
  };
@@ -60,10 +60,17 @@ module.exports = class ServerGenerator extends _generator.default {
60
60
  const {
61
61
  'socket-io': socketIo
62
62
  } = this.options;
63
- this.addDependencies(['commander', 'debug', 'ejs', 'express']);
63
+ this.addDependencies({
64
+ commander: 'latest',
65
+ debug: 'latest',
66
+ ejs: 'latest',
67
+ express: 'latest'
68
+ });
64
69
 
65
70
  if (socketIo) {
66
- this.addDependencies(['socket.io']);
71
+ this.addDependencies({
72
+ 'socket.io': 'latest'
73
+ });
67
74
  }
68
75
  }
69
76
 
@@ -79,7 +79,15 @@ module.exports = class StorybookGenerator extends _generator.default {
79
79
  return;
80
80
  }
81
81
 
82
- this.addDevDependencies(['@storybook/addon-actions@latest', '@storybook/addon-info@latest', '@storybook/addon-storyshots@latest', '@storybook/addons@latest', '@storybook/react@latest', '@storybook/storybook-deployer@latest', 'glob-loader@latest']);
82
+ this.addDevDependencies({
83
+ '@storybook/addon-actions': 'latest',
84
+ '@storybook/addon-info': 'latest',
85
+ '@storybook/addon-storyshots': 'latest',
86
+ '@storybook/addons': 'latest',
87
+ '@storybook/react': 'latest',
88
+ '@storybook/storybook-deployer': 'latest',
89
+ 'glob-loader': 'latest'
90
+ });
83
91
  }
84
92
 
85
93
  };
@@ -37,7 +37,12 @@ module.exports = class StylelintGenerator extends _generator.default {
37
37
  },
38
38
 
39
39
  dependencies() {
40
- this.addDevDependencies(['stylelint@^14.0.0', 'stylelint-config-standard-scss@^5.0.0', 'stylelint-config-idiomatic-order@^8.0.0', 'stylelint-config-prettier@^9.0.0']);
40
+ this.addDevDependencies({
41
+ stylelint: '^14.0.0',
42
+ 'stylelint-config-standard-scss': 'latest',
43
+ 'stylelint-config-idiomatic-order': 'latest',
44
+ 'stylelint-config-prettier': 'latest'
45
+ });
41
46
  }
42
47
 
43
48
  };
@@ -67,7 +67,16 @@ module.exports = class TestGenerator extends _generator.default {
67
67
  return;
68
68
  }
69
69
 
70
- this.addDevDependencies(['babel-jest@latest', 'enzyme@latest', 'enzyme-adapter-react-16@latest', 'eslint-plugin-jest@latest', 'jest@latest', 'jsdom@latest', 'react-test-renderer@latest', 'sinon@latest']);
70
+ this.addDevDependencies({
71
+ 'babel-jest': 'latest',
72
+ enzyme: 'latest',
73
+ 'enzyme-adapter-react-16': 'latest',
74
+ 'eslint-plugin-jest': 'latest',
75
+ jest: 'latest',
76
+ jsdom: 'latest',
77
+ 'react-test-renderer': 'latest',
78
+ sinon: 'latest'
79
+ });
71
80
  }
72
81
 
73
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-folklore",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Yeoman generator for projects at Folklore",
5
5
  "keywords": [
6
6
  "yeoman-generator"
@@ -37,8 +37,8 @@
37
37
  "is-utf8": "^0.2.1",
38
38
  "lodash": "^4.17.21",
39
39
  "password-generator": "^2.3.2",
40
- "yeoman-generator": "^5.6.1",
40
+ "yeoman-generator": "^5.7.0",
41
41
  "yeoman-remote": "^1.0.1"
42
42
  },
43
- "gitHead": "bc3878a65d256dd8742a6deea2699252d4a4dfb0"
43
+ "gitHead": "a8406b4ff188934ed49c13826cf577968669ed4e"
44
44
  }