generator-folklore 3.0.20 → 3.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/lib/generators/build/index.js +1 -1
  2. package/lib/generators/eslint/index.js +2 -2
  3. package/lib/generators/intl/index.js +1 -1
  4. package/lib/generators/laravel-auth/templates/resources/assets/js/components/Auth.jsx +1 -1
  5. package/lib/generators/laravel-auth/templates/resources/assets/js/components/forms/Login.jsx +2 -2
  6. package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlockResource.php +22 -3
  7. package/lib/generators/laravel-panneau/templates/app/Models/Block.php +1 -1
  8. package/lib/generators/laravel-panneau/templates/app/Models/Page.php +5 -0
  9. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/BlockResource.php +19 -2
  10. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/Panneau.jsx +6 -6
  11. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/PageSlug.jsx +1 -1
  12. package/lib/generators/laravel-panneau/templates/resources/assets/styles/panneau.scss +2 -0
  13. package/lib/generators/micromag-project/index.js +114 -0
  14. package/lib/generators/micromag-project/templates/Home.jsx +33 -0
  15. package/lib/generators/micromag-project/templates/Routes.jsx +34 -0
  16. package/lib/generators/micromag-project/templates/data.json +38 -0
  17. package/lib/generators/micromag-project/templates/home.module.scss +19 -0
  18. package/lib/generators/micromag-project/templates/styles.scss +2 -0
  19. package/lib/generators/prettier/index.js +2 -2
  20. package/lib/generators/react-app/index.js +6 -7
  21. package/lib/generators/react-app/templates/src/components/App.jsx +6 -4
  22. package/lib/generators/react-app/templates/src/components/Routes.jsx +13 -20
  23. package/lib/generators/react-app/templates/src/components/buttons/Button.jsx +2 -2
  24. package/lib/generators/react-app/templates/src/components/menus/Menu.jsx +2 -2
  25. package/lib/generators/react-app/templates/src/components/pages/Error.jsx +2 -2
  26. package/lib/generators/stylelint/index.js +4 -4
  27. package/package.json +2 -2
@@ -80,7 +80,7 @@ module.exports = class AppGenerator extends _generator.default {
80
80
  },
81
81
  dependencies() {
82
82
  this.addDevDependencies({
83
- '@folklore/cli': '^0.0.50'
83
+ '@folklore/cli': '^0.1.9'
84
84
  });
85
85
  }
86
86
  };
@@ -30,8 +30,8 @@ module.exports = class EslintGenerator extends _generator.default {
30
30
  '@babel/eslint-parser': '^7.18.9',
31
31
  eslint: '^8.0.0',
32
32
  'eslint-config-airbnb': '^19.0.4',
33
- 'eslint-config-prettier': '^8.6.0',
34
- 'eslint-plugin-prettier': '^4.2.1',
33
+ 'eslint-config-prettier': '^9.1.0',
34
+ 'eslint-plugin-prettier': '^5.1.3',
35
35
  'eslint-plugin-import': '^2.26.0',
36
36
  'eslint-plugin-jsx-a11y': '^6.6.1',
37
37
  'eslint-plugin-react': '^7.30.1',
@@ -68,7 +68,7 @@ module.exports = class IntlGenerator extends _generator.default {
68
68
  },
69
69
  dependencies() {
70
70
  this.addDevDependencies({
71
- '@folklore/cli': '^0.0.50'
71
+ '@folklore/cli': '^0.1.9'
72
72
  });
73
73
  }
74
74
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  // import PropTypes from 'prop-types';
3
- import { Route, Switch } from 'react-router';
3
+ import { Route, Switch } from 'wouter';
4
4
  import { withUrlGenerator } from '@folklore/react-container';
5
5
 
6
6
  import * as AppPropTypes from '../lib/PropTypes';
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
4
- import { Link } from 'react-router-dom';
4
+ import { Link } from 'wouter';
5
5
  import classNames from 'classnames';
6
6
  import { withUrlGenerator } from '@folklore/react-container';
7
7
  import { useForm } from '@folklore/forms';
@@ -71,7 +71,7 @@ const LoginForm = ({
71
71
  helpText={(
72
72
  <div className={styles.forgot}>
73
73
  <Link
74
- to={urlGenerator.route('auth.password.request')}
74
+ href={urlGenerator.route('auth.password.request')}
75
75
  className={styles.link}
76
76
  >
77
77
  <FormattedMessage {...messages.forgotPassword} />
@@ -6,6 +6,8 @@ use Illuminate\Http\Resources\Json\JsonResource;
6
6
  use Folklore\Contracts\Resources\HasBlocks;
7
7
  use Folklore\Http\Resources\LocalizedResource;
8
8
  use App\Contracts\Resources\Blocks\Text as TextBlock;
9
+ use App\Contracts\Resources\Blocks\ImageBlock as ImageBlock;
10
+ use Folklore\Http\Resources\MediaResource;
9
11
 
10
12
  class BlockResource extends JsonResource
11
13
  {
@@ -18,7 +20,6 @@ class BlockResource extends JsonResource
18
20
  public function toArray($request)
19
21
  {
20
22
  $type = $this->type();
21
- $locale = $request->locale();
22
23
  return [
23
24
  'id' => $this->id(),
24
25
  'type' => $type,
@@ -27,9 +28,27 @@ class BlockResource extends JsonResource
27
28
  return !is_null($blocks) ? new BlocksCollection($blocks) : [];
28
29
  }),
29
30
 
30
- $this->mergeWhen($this->resource instanceof TextBlock, function () use ($locale) {
31
+ $this->mergeWhen($this->resource instanceof TextBlock, function () {
31
32
  return [
32
- 'body' => $this->body($locale),
33
+ 'title' => new LocalizedResource(function ($locale) {
34
+ return $this->title($locale);
35
+ }),
36
+ 'body' => new LocalizedResource(function ($locale) {
37
+ return $this->body($locale);
38
+ }),
39
+ ];
40
+ }),
41
+
42
+ $this->mergeWhen($this->resource instanceof ImageBlock, function () {
43
+ $image = $this->image();
44
+ return [
45
+ 'image' => !empty($image) ? new MediaResource($image) : null,
46
+ 'caption' => new LocalizedResource(function ($locale) {
47
+ return $this->caption($locale);
48
+ }),
49
+ 'credits' => new LocalizedResource(function ($locale) {
50
+ return $this->credits($locale);
51
+ }),
33
52
  ];
34
53
  }),
35
54
  ];
@@ -11,7 +11,7 @@ class Block extends BaseBlock
11
11
  {
12
12
  use HasFactory;
13
13
 
14
- protected $typeResources = [
14
+ protected $typedResources = [
15
15
  'text' => \App\Resources\Blocks\TextBlock::class,
16
16
  'image' => \App\Resources\Blocks\ImageBlock::class,
17
17
  ];
@@ -19,4 +19,9 @@ class Page extends BasePage
19
19
  {
20
20
  return $this->toTypedResource() ?? new PageResource($this);
21
21
  }
22
+
23
+ public function blocks()
24
+ {
25
+ return $this->morphToMany(Block::class, 'blockable', 'blocks_pivot');
26
+ }
22
27
  }
@@ -3,9 +3,11 @@
3
3
  namespace App\Panneau\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
+ use App\Contracts\Resources\Blocks\Image as ImageBlock;
10
+ use Folklore\Http\Resources\MediaResource;
9
11
 
10
12
  class BlockResource extends JsonResource
11
13
  {
@@ -18,7 +20,6 @@ class BlockResource extends JsonResource
18
20
  public function toArray($request)
19
21
  {
20
22
  $type = $this->type();
21
-
22
23
  return [
23
24
  'id' => $this->id(),
24
25
  'type' => $type,
@@ -29,11 +30,27 @@ class BlockResource extends JsonResource
29
30
 
30
31
  $this->mergeWhen($this->resource instanceof TextBlock, function () {
31
32
  return [
33
+ 'title' => new LocalizedResource(function ($locale) {
34
+ return $this->title($locale);
35
+ }),
32
36
  'body' => new LocalizedResource(function ($locale) {
33
37
  return $this->body($locale);
34
38
  }),
35
39
  ];
36
40
  }),
41
+
42
+ $this->mergeWhen($this->resource instanceof ImageBlock, function () {
43
+ $image = $this->image();
44
+ return [
45
+ 'image' => !empty($image) ? new MediaResource($image) : null,
46
+ 'caption' => new LocalizedResource(function ($locale) {
47
+ return $this->caption($locale);
48
+ }),
49
+ 'credits' => new LocalizedResource(function ($locale) {
50
+ return $this->credits($locale);
51
+ }),
52
+ ];
53
+ }),
37
54
  ];
38
55
  }
39
56
  }
@@ -1,12 +1,13 @@
1
- import React, { useState, useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import Panneau from '@panneau/app';
4
1
  import { getCSRFHeaders } from '@folklore/fetch';
5
-
2
+ import Panneau from '@panneau/app';
6
3
  import { FIELDS_NAMESPACE } from '@panneau/core/contexts';
7
- import * as fieldsComponents from './panneau/fields';
4
+ import PropTypes from 'prop-types';
5
+ import React, { useState, useEffect } from 'react';
6
+
8
7
  import * as AppPropTypes from '../lib/PropTypes';
9
8
 
9
+ import * as fieldsComponents from './panneau/fields';
10
+
10
11
  import '../../styles/panneau.scss';
11
12
 
12
13
  const propTypes = {
@@ -26,7 +27,6 @@ const defaultProps = {
26
27
  const PanneauContainer = ({ definition, user, baseUrl, uploadEndpoint, statusCode }) => {
27
28
  const { routes = {} } = definition;
28
29
  const isAuthorized = statusCode !== 401 && statusCode !== 403;
29
-
30
30
  const [localeLoaded, setLocaleLoaded] = useState(false);
31
31
 
32
32
  useEffect(() => {
@@ -4,7 +4,7 @@ import TextField from '@panneau/field-text';
4
4
  import classNames from 'classnames';
5
5
  import PropTypes from 'prop-types';
6
6
  import React from 'react';
7
- import { generatePath } from 'react-router';
7
+ import { generatePath } from '@folklore/routes';
8
8
 
9
9
  const propTypes = {
10
10
  fieldLocale: PropTypes.string,
@@ -1,2 +1,4 @@
1
+ @import '~@panneau/app/scss/styles';
2
+
1
3
  @import '~@panneau/themes/scss/styles';
2
4
  @import '~@panneau/themes/scss/vendor';
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ var _chalk = _interopRequireDefault(require("chalk"));
4
+ var _lodash = _interopRequireDefault(require("lodash"));
5
+ var _path = _interopRequireDefault(require("path"));
6
+ var _generator = _interopRequireDefault(require("../../lib/generator"));
7
+ var _utils = require("../../lib/utils");
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ module.exports = class MicromagProjectGenerator extends _generator.default {
10
+ // The name `constructor` is important here
11
+ constructor(...args) {
12
+ super(...args);
13
+ this.argument('project-name', {
14
+ type: String,
15
+ required: false
16
+ });
17
+ this.option('src-path', {
18
+ type: String,
19
+ desc: 'Path for source',
20
+ defaults: './src'
21
+ });
22
+ this.option('dest-path', {
23
+ type: String,
24
+ desc: 'Path for build',
25
+ defaults: './dist'
26
+ });
27
+ this.srcPath = filePath => this.destinationPath(_path.default.join(this.options['src-path'], filePath));
28
+ }
29
+ get prompting() {
30
+ return {
31
+ welcome() {
32
+ if (this.options.quiet) {
33
+ return;
34
+ }
35
+ console.log(_chalk.default.yellow('\n----------------------'));
36
+ console.log('Micromag Project Generator');
37
+ console.log(_chalk.default.yellow('----------------------\n'));
38
+ },
39
+ prompts() {
40
+ const prompts = [];
41
+ if (!this.options['project-name']) {
42
+ prompts.push(_generator.default.prompts.project_name);
43
+ }
44
+ if (!prompts.length) {
45
+ return null;
46
+ }
47
+ return this.prompt(prompts).then(answers => {
48
+ if (answers['project-name']) {
49
+ this.options['project-name'] = answers['project-name'];
50
+ }
51
+ });
52
+ }
53
+ };
54
+ }
55
+ async configuring() {
56
+ const {
57
+ 'project-name': projectName,
58
+ 'src-path': srcPath,
59
+ 'dest-path': destPath
60
+ } = this.options;
61
+ await this.composeWith('folklore:html-project', {
62
+ 'skip-install': true,
63
+ quiet: true,
64
+ 'project-name': projectName,
65
+ 'src-path': srcPath,
66
+ 'dest-path': destPath
67
+ });
68
+ }
69
+ get conflicts() {
70
+ return {
71
+ home() {
72
+ const {
73
+ 'src-path': srcPath
74
+ } = this.options;
75
+ const templateData = {
76
+ getRelativeStylesPath: (from, src) => _path.default.relative(this.destinationPath(_path.default.dirname(_path.default.join(srcPath, from))), this.destinationPath(_path.default.join(_path.default.join(srcPath, 'styles'), src)))
77
+ };
78
+ this.fs.delete(this.srcPath('components/pages/Home.jsx'));
79
+ this.fs.delete(this.srcPath('styles/pages/home.module.scss'));
80
+ this.fs.copyTpl(this.templatePath('Home.jsx'), this.srcPath('components/pages/Home.jsx'), templateData);
81
+ this.fs.copyTpl(this.templatePath('home.module.scss'), this.srcPath('styles/pages/home.module.scss'), templateData);
82
+ },
83
+ routes() {
84
+ const {
85
+ 'src-path': srcPath
86
+ } = this.options;
87
+ const templateData = {
88
+ getRelativeStylesPath: (from, src) => _path.default.relative(this.destinationPath(_path.default.dirname(_path.default.join(srcPath, from))), this.destinationPath(_path.default.join(_path.default.join(srcPath, 'styles'), src)))
89
+ };
90
+ this.fs.delete(this.srcPath('components/Routes.jsx'));
91
+ this.fs.copyTpl(this.templatePath('Routes.jsx'), this.srcPath('components/Routes.jsx'), templateData);
92
+ },
93
+ styles() {
94
+ this.fs.delete(this.srcPath('styles/styles.scss'));
95
+ this.fs.copyTpl(this.templatePath('styles.scss'), this.srcPath('styles/styles.scss'));
96
+ },
97
+ micromag() {
98
+ this.fs.copyTpl(this.templatePath('data.json'), this.srcPath('micromag/data.json'));
99
+ },
100
+ dependencies() {
101
+ this.addDependencies({
102
+ '@micromag/viewer': '^0.3.492',
103
+ '@micromag/intl': '^0.3.488'
104
+ });
105
+ }
106
+ };
107
+ }
108
+ async install() {
109
+ if (this.options['skip-install']) {
110
+ return;
111
+ }
112
+ await this.spawnCommand('npm', ['install']);
113
+ }
114
+ };
@@ -0,0 +1,33 @@
1
+ import '@micromag/intl/locale/fr';
2
+ import Micromag from '@micromag/viewer';
3
+ import React from 'react';
4
+ import { useIntl } from 'react-intl';
5
+
6
+ // import * as AppPropTypes from '../../lib/PropTypes';
7
+ import story from '../../micromag/data.json';
8
+
9
+ import styles from '<%= getRelativeStylesPath('components/pages/Home.jsx', 'pages/home.module.scss') %>';
10
+
11
+ const propTypes = {
12
+ // intl: AppPropTypes.intl.isRequired,
13
+ };
14
+
15
+ function HomePage() {
16
+ const { locale } = useIntl();
17
+ return (
18
+ <div className={styles.container}>
19
+ <Micromag
20
+ story={story}
21
+ locale={locale}
22
+ // basePath={basePath}
23
+ // memoryRouter
24
+ pathWithIndex
25
+ className={styles.micromag}
26
+ />
27
+ </div>
28
+ );
29
+ }
30
+
31
+ HomePage.propTypes = propTypes;
32
+
33
+ export default HomePage;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ // import PropTypes from 'prop-types';
3
+ import { Route, Switch } from 'wouter';
4
+ import { useRoutes } from '@folklore/routes';
5
+
6
+ // import { useUrlGenerator } from '@folklore/routes';
7
+ // import * as AppPropTypes from '../lib/PropTypes';
8
+ import MainLayout from './layouts/Main';
9
+ import ErrorPage from './pages/Error';
10
+ import HomePage from './pages/Home';
11
+
12
+ import '<%= getRelativeStylesPath('components/App.jsx', 'styles.scss') %>';
13
+
14
+ const propTypes = {};
15
+
16
+ const defaultProps = {};
17
+
18
+ function Routes() {
19
+ const routes = useRoutes() || {};
20
+ return (
21
+ <Switch>
22
+ <Route>
23
+ <MainLayout>
24
+ <HomePage />
25
+ </MainLayout>
26
+ </Route>
27
+ </Switch>
28
+ );
29
+ }
30
+
31
+ Routes.propTypes = propTypes;
32
+ Routes.defaultProps = defaultProps;
33
+
34
+ export default Routes;
@@ -0,0 +1,38 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "id": "screen1",
5
+ "type": "text-title",
6
+ "background": {
7
+ "color": { "color": "#ffcc00", "alpha": 1 },
8
+ "image": null,
9
+ "fit": "contain",
10
+ "repeat": true
11
+ },
12
+ "layout": "middle",
13
+ "title": {
14
+ "body": "<h1>Écran 1</h1>"
15
+ },
16
+ "text": {
17
+ "body": "<p>Texte</p>"
18
+ }
19
+ },
20
+ {
21
+ "id": "screen2",
22
+ "type": "text-title",
23
+ "background": {
24
+ "color": { "color": "#cc0000", "alpha": 1 },
25
+ "image": null,
26
+ "fit": "contain",
27
+ "repeat": true
28
+ },
29
+ "layout": "middle",
30
+ "title": {
31
+ "body": "<h1>Écran 2</h1>"
32
+ },
33
+ "text": {
34
+ "body": "<p>Texte</p>"
35
+ }
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,19 @@
1
+ @import '../commons/variables';
2
+ @import '../commons/placeholders';
3
+ @import '../commons/mixins';
4
+
5
+ .container {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+
12
+ .micromag {
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ width: 100%;
17
+ height: 100%;
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ @import '~@micromag/core/scss/styles';
2
+ @import '~@micromag/viewer/scss/styles';
@@ -25,8 +25,8 @@ module.exports = class PrettierGenerator extends _generator.default {
25
25
  },
26
26
  dependencies() {
27
27
  this.addDevDependencies({
28
- prettier: '^2.8.4',
29
- '@prettier/plugin-php': '^0.19.3',
28
+ prettier: '^3.2.5',
29
+ '@prettier/plugin-php': '^0.22.2',
30
30
  '@trivago/prettier-plugin-sort-imports': '^4.1.1'
31
31
  });
32
32
  }
@@ -92,16 +92,15 @@ module.exports = class ReactAppGenerator extends _generator.default {
92
92
  'react-dom': '^18.0.0',
93
93
  'prop-types': '^15.0.0',
94
94
  'react-intl': '^6.0.0',
95
- 'react-router': '^6.0.0',
96
- 'react-router-dom': '^6.0.0',
95
+ 'wouter': '^3.0.0',
97
96
  'react-helmet': '^6.0.0',
98
97
  classnames: '^2.3.1',
99
- '@folklore/routes': '^0.1.1',
100
- '@folklore/fonts': '^0.0.11',
101
- '@folklore/forms': '^0.0.19',
98
+ '@folklore/routes': '^0.2.31',
99
+ '@folklore/fonts': '^0.0.13',
100
+ '@folklore/forms': '^0.0.22',
102
101
  '@folklore/fetch': '^0.1.15',
103
- '@folklore/hooks': '^0.0.27',
104
- '@folklore/tracking': '^0.0.14',
102
+ '@folklore/hooks': '^0.0.42',
103
+ '@folklore/tracking': '^0.0.16',
105
104
  // Polyfills
106
105
  intl: '^1.2.5',
107
106
  '@formatjs/intl-locale': '^3.0.5',
@@ -2,7 +2,7 @@ import { RoutesProvider } from '@folklore/routes';
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
  import { IntlProvider } from 'react-intl';
5
- import { BrowserRouter } from 'react-router-dom';
5
+ import { Router } from 'wouter';
6
6
 
7
7
  // import * as AppPropTypes from '../lib/PropTypes';
8
8
  import Routes from './Routes';
@@ -20,18 +20,20 @@ const propTypes = {
20
20
 
21
21
  const defaultProps = {
22
22
  intl: null,
23
- routes: {},
23
+ routes: {
24
+ home: '/'
25
+ },
24
26
  };
25
27
 
26
28
  function App({ intl, routes }) {
27
29
  const { locale = 'fr', messages = {} } = intl || {};
28
30
  return (
29
31
  <IntlProvider locale={locale} messages={messages[locale] || messages}>
30
- <BrowserRouter>
32
+ <Router>
31
33
  <RoutesProvider routes={routes}>
32
34
  <Routes />
33
35
  </RoutesProvider>
34
- </BrowserRouter>
36
+ </Router>
35
37
  </IntlProvider>
36
38
  );
37
39
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  // import PropTypes from 'prop-types';
3
- import { Route, Routes } from 'react-router-dom';
3
+ import { Route, Switch } from 'wouter';
4
4
  import { useRoutes } from '@folklore/routes';
5
5
 
6
6
  // import { useUrlGenerator } from '@folklore/routes';
@@ -18,25 +18,18 @@ const defaultProps = {};
18
18
  function Routes() {
19
19
  const routes = useRoutes() || {};
20
20
  return (
21
- <Routes>
22
- <Route
23
- path={routes.home || '/'}
24
- exact
25
- element={
26
- <MainLayout>
27
- <HomePage />
28
- </MainLayout>
29
- }
30
- />
31
- <Route
32
- path="*"
33
- element={
34
- <MainLayout>
35
- <ErrorPage />
36
- </MainLayout>
37
- }
38
- />
39
- </Routes>
21
+ <Switch>
22
+ <Route path={routes.home || '/'}>
23
+ <MainLayout>
24
+ <HomePage />
25
+ </MainLayout>
26
+ </Route>
27
+ <Route>
28
+ <MainLayout>
29
+ <ErrorPage />
30
+ </MainLayout>
31
+ </Route>
32
+ </Switch>
40
33
  );
41
34
  }
42
35
 
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
- import { Link } from 'react-router-dom';
5
+ import { Link } from 'wouter';
6
6
 
7
7
  import * as AppPropTypes from '../../lib/PropTypes';
8
8
 
@@ -140,7 +140,7 @@ function Button({
140
140
  {content}
141
141
  </a>
142
142
  ) : (
143
- <Link to={href} className={buttonClassNames} onClick={onClick}>
143
+ <Link href={href} className={buttonClassNames} onClick={onClick}>
144
144
  {content}
145
145
  </Link>
146
146
  );
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
- import { Link } from 'react-router-dom';
5
+ import { Link } from 'wouter';
6
6
 
7
7
  import * as AppPropTypes from '../../lib/PropTypes';
8
8
 
@@ -44,7 +44,7 @@ function Menu({ items, className }) {
44
44
  {label}
45
45
  </a>
46
46
  ) : (
47
- <Link to={url} className={styles.link}>
47
+ <Link href={url} className={styles.link}>
48
48
  {label}
49
49
  </Link>
50
50
  )}
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable react/jsx-props-no-spreading */
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { Link } from 'react-router-dom';
4
+ import { Link } from 'wouter';
5
5
  import { defineMessages, FormattedMessage } from 'react-intl';
6
6
  import { useUrlGenerator } from '@folklore/routes';
7
7
 
@@ -90,7 +90,7 @@ function ErrorPage({ statusCode }) {
90
90
  <FormattedMessage {...messages[`description${statusCode || 404}`]} />
91
91
  </p>
92
92
  <div className={styles.actions}>
93
- <Link to={url('home')}>
93
+ <Link href={url('home')}>
94
94
  <FormattedMessage {...messages.gotoHome} />
95
95
  </Link>
96
96
  </div>
@@ -31,10 +31,10 @@ module.exports = class StylelintGenerator extends _generator.default {
31
31
  },
32
32
  dependencies() {
33
33
  this.addDevDependencies({
34
- stylelint: '^15.0.0',
35
- 'stylelint-config-standard-scss': '^7.0.1',
36
- 'stylelint-config-idiomatic-order': '^9.0.0',
37
- 'stylelint-config-standard': '^30.0.1'
34
+ stylelint: '^16.2.1',
35
+ 'stylelint-config-standard-scss': '^13.0.0',
36
+ 'stylelint-config-idiomatic-order': '^10.0.0',
37
+ 'stylelint-config-standard': '^36.0.0'
38
38
  });
39
39
  }
40
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-folklore",
3
- "version": "3.0.20",
3
+ "version": "3.0.22",
4
4
  "description": "Yeoman generator for projects at Folklore",
5
5
  "keywords": [
6
6
  "yeoman-generator"
@@ -40,5 +40,5 @@
40
40
  "yeoman-generator": "^5.7.0",
41
41
  "yeoman-remote": "^1.0.1"
42
42
  },
43
- "gitHead": "1a9d97a88dd685576bbe9fb306ea7a10b2ab9f03"
43
+ "gitHead": "299c4d804aaa15455627b5ae353d3936da9fd692"
44
44
  }