generator-folklore 3.0.17 → 3.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/generators/app/index.js +4 -4
- package/lib/generators/docs/index.js +4 -4
- package/lib/generators/html-project/index.js +4 -0
- package/lib/generators/laravel/index.js +4 -4
- package/lib/generators/laravel-project/index.js +8 -6
- package/lib/generators/react-app/index.js +4 -4
- package/lib/generators/react-app/templates/index.js +3 -3
- package/lib/generators/react-app/templates/src/components/App.jsx +28 -32
- package/lib/generators/react-app/templates/src/components/Routes.jsx +46 -0
- package/lib/generators/react-app/templates/src/components/buttons/Button.jsx +3 -0
- package/lib/generators/react-app/templates/src/components/layouts/Main.jsx +1 -3
- package/lib/generators/react-app/templates/src/components/menus/Menu.jsx +2 -3
- package/lib/generators/svgo/index.js +20 -0
- package/lib/generators/svgo/templates/config.js +18 -0
- package/lib/lib/generator.js +3 -4
- package/package.json +2 -2
- package/lib/generators/react-app/templates/src/components/Container.jsx +0 -42
@@ -3,11 +3,11 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
5
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
|
-
function _toPropertyKey(
|
10
|
-
function _toPrimitive(
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
11
11
|
module.exports = class AppGenerator extends _generator.default {
|
12
12
|
// The name `constructor` is important here
|
13
13
|
constructor(...args) {
|
@@ -5,11 +5,11 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8
|
-
function ownKeys(
|
9
|
-
function _objectSpread(
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
function _toPropertyKey(
|
12
|
-
function _toPrimitive(
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
13
13
|
module.exports = class DocsGenerator extends _generator.default {
|
14
14
|
constructor(...args) {
|
15
15
|
super(...args);
|
@@ -100,6 +100,10 @@ module.exports = class HTMLProjectGenerator extends _generator.default {
|
|
100
100
|
'skip-install': true,
|
101
101
|
quiet: true
|
102
102
|
});
|
103
|
+
this.composeWith('folklore:svgo', {
|
104
|
+
quiet: true,
|
105
|
+
'skip-install': true
|
106
|
+
});
|
103
107
|
this.composeWith('folklore:browserslist', {
|
104
108
|
'skip-install': true,
|
105
109
|
quiet: true
|
@@ -8,11 +8,11 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
8
|
var _passwordGenerator = _interopRequireDefault(require("password-generator"));
|
9
9
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
function ownKeys(
|
12
|
-
function _objectSpread(
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
16
16
|
module.exports = class LaravelGenerator extends _generator.default {
|
17
17
|
static safeDbString(str) {
|
18
18
|
return str.replace(/[-s.]+/gi, '_').replace(/[^a-z0-9]+/gi, '');
|
@@ -8,11 +8,11 @@ var _path = _interopRequireDefault(require("path"));
|
|
8
8
|
var _yeomanRemote = _interopRequireDefault(require("yeoman-remote"));
|
9
9
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
function ownKeys(
|
12
|
-
function _objectSpread(
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
16
16
|
module.exports = class LaravelProjectGenerator extends _generator.default {
|
17
17
|
static safeDbString(str) {
|
18
18
|
return str.replace(/[-s.]+/gi, '_').replace(/[^a-z0-9]+/gi, '');
|
@@ -214,6 +214,10 @@ module.exports = class LaravelProjectGenerator extends _generator.default {
|
|
214
214
|
'skip-install': true,
|
215
215
|
quiet: true
|
216
216
|
});
|
217
|
+
this.composeWith('folklore:svgo', {
|
218
|
+
quiet: true,
|
219
|
+
'skip-install': true
|
220
|
+
});
|
217
221
|
this.composeWith('folklore:browserslist', {
|
218
222
|
'skip-install': true,
|
219
223
|
quiet: true
|
@@ -276,7 +280,6 @@ module.exports = class LaravelProjectGenerator extends _generator.default {
|
|
276
280
|
// });
|
277
281
|
// }
|
278
282
|
}
|
279
|
-
|
280
283
|
get writing() {
|
281
284
|
return {
|
282
285
|
laravel() {
|
@@ -386,7 +389,6 @@ module.exports = class LaravelProjectGenerator extends _generator.default {
|
|
386
389
|
// const destProd = this.destinationPath('.env.prod');
|
387
390
|
// this.fs.copyTpl(srcProd, destProd, prodTemplateData);
|
388
391
|
},
|
389
|
-
|
390
392
|
files() {
|
391
393
|
const templatePath = this.templatePath('laravel');
|
392
394
|
const destinationPath = this.destinationPath();
|
@@ -5,11 +5,11 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8
|
-
function ownKeys(
|
9
|
-
function _objectSpread(
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
function _toPropertyKey(
|
12
|
-
function _toPrimitive(
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
13
13
|
module.exports = class ReactAppGenerator extends _generator.default {
|
14
14
|
// The name `constructor` is important here
|
15
15
|
constructor(...args) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { createRoot } from 'react-dom/client';
|
3
3
|
|
4
|
-
import
|
4
|
+
import App from './components/App';
|
5
5
|
import shouldPolyfill from './polyfills/should';
|
6
6
|
|
7
7
|
function getAppProps() {
|
@@ -10,8 +10,8 @@ function getAppProps() {
|
|
10
10
|
|
11
11
|
function renderApp(props) {
|
12
12
|
const element = document.getElementById('app');
|
13
|
-
const
|
14
|
-
const strictMode = React.createElement(React.StrictMode, {},
|
13
|
+
const app = React.createElement(App, props);
|
14
|
+
const strictMode = React.createElement(React.StrictMode, {}, app);
|
15
15
|
const root = createRoot(element);
|
16
16
|
root.render(strictMode);
|
17
17
|
}
|
@@ -1,42 +1,38 @@
|
|
1
|
+
import { RoutesProvider } from '@folklore/routes';
|
2
|
+
import PropTypes from 'prop-types';
|
1
3
|
import React from 'react';
|
2
|
-
|
3
|
-
import {
|
4
|
-
import { useRoutes } from '@folklore/routes';
|
4
|
+
import { IntlProvider } from 'react-intl';
|
5
|
+
import { BrowserRouter } from 'react-router-dom';
|
5
6
|
|
6
|
-
// import { useUrlGenerator } from '@folklore/routes';
|
7
7
|
// import * as AppPropTypes from '../lib/PropTypes';
|
8
|
-
import
|
9
|
-
import ErrorPage from './pages/Error';
|
10
|
-
import HomePage from './pages/Home';
|
8
|
+
import Routes from './Routes';
|
11
9
|
|
12
|
-
|
10
|
+
const propTypes = {
|
11
|
+
intl: PropTypes.shape({
|
12
|
+
locale: PropTypes.string,
|
13
|
+
messages: PropTypes.oneOfType([
|
14
|
+
PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)),
|
15
|
+
PropTypes.objectOf(PropTypes.string),
|
16
|
+
]),
|
17
|
+
}),
|
18
|
+
routes: PropTypes.objectOf(PropTypes.string),
|
19
|
+
};
|
13
20
|
|
14
|
-
const
|
21
|
+
const defaultProps = {
|
22
|
+
intl: null,
|
23
|
+
routes: {},
|
24
|
+
};
|
15
25
|
|
16
|
-
|
17
|
-
|
18
|
-
function App() {
|
19
|
-
const routes = useRoutes() || {};
|
26
|
+
function App({ intl, routes }) {
|
27
|
+
const { locale = 'fr', messages = {} } = intl || {};
|
20
28
|
return (
|
21
|
-
<
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
</MainLayout>
|
29
|
-
}
|
30
|
-
/>
|
31
|
-
<Route
|
32
|
-
path="*"
|
33
|
-
element={
|
34
|
-
<MainLayout>
|
35
|
-
<ErrorPage />
|
36
|
-
</MainLayout>
|
37
|
-
}
|
38
|
-
/>
|
39
|
-
</Routes>
|
29
|
+
<IntlProvider locale={locale} messages={messages[locale] || messages}>
|
30
|
+
<BrowserRouter>
|
31
|
+
<RoutesProvider routes={routes}>
|
32
|
+
<Routes />
|
33
|
+
</RoutesProvider>
|
34
|
+
</BrowserRouter>
|
35
|
+
</IntlProvider>
|
40
36
|
);
|
41
37
|
}
|
42
38
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
// import PropTypes from 'prop-types';
|
3
|
+
import { Route, Routes } from 'react-router-dom';
|
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
|
+
<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>
|
40
|
+
);
|
41
|
+
}
|
42
|
+
|
43
|
+
Routes.propTypes = propTypes;
|
44
|
+
Routes.defaultProps = defaultProps;
|
45
|
+
|
46
|
+
export default Routes;
|
@@ -9,6 +9,7 @@ import * as AppPropTypes from '../../lib/PropTypes';
|
|
9
9
|
import styles from '<%= getRelativeStylesPath('components/buttons/Button.jsx', 'buttons/button.module.scss') %>';
|
10
10
|
|
11
11
|
const propTypes = {
|
12
|
+
text: PropTypes.string,
|
12
13
|
type: PropTypes.string,
|
13
14
|
href: PropTypes.string,
|
14
15
|
external: PropTypes.bool,
|
@@ -28,6 +29,7 @@ const propTypes = {
|
|
28
29
|
};
|
29
30
|
|
30
31
|
const defaultProps = {
|
32
|
+
text: null,
|
31
33
|
type: 'button',
|
32
34
|
href: null,
|
33
35
|
external: false,
|
@@ -47,6 +49,7 @@ const defaultProps = {
|
|
47
49
|
};
|
48
50
|
|
49
51
|
function Button({
|
52
|
+
text,
|
50
53
|
type,
|
51
54
|
href,
|
52
55
|
external,
|
@@ -5,7 +5,6 @@ import classNames from 'classnames';
|
|
5
5
|
import { Link } from 'react-router-dom';
|
6
6
|
|
7
7
|
import * as AppPropTypes from '../../lib/PropTypes';
|
8
|
-
import Label from '../partials/Label';
|
9
8
|
|
10
9
|
import styles from '<%= getRelativeStylesPath('components/menus/Menu.jsx', 'menus/menu.module.scss') %>';
|
11
10
|
|
@@ -42,11 +41,11 @@ function Menu({ items, className }) {
|
|
42
41
|
>
|
43
42
|
{external ? (
|
44
43
|
<a href={url} target={target} className={styles.link}>
|
45
|
-
|
44
|
+
{label}
|
46
45
|
</a>
|
47
46
|
) : (
|
48
47
|
<Link to={url} className={styles.link}>
|
49
|
-
|
48
|
+
{label}
|
50
49
|
</Link>
|
51
50
|
)}
|
52
51
|
</li>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
4
|
+
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6
|
+
module.exports = class SvgoGenerator extends _generator.default {
|
7
|
+
prompting() {
|
8
|
+
if (this.options.quiet) {
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
console.log(_chalk.default.yellow('\n----------------------'));
|
12
|
+
console.log('SVGO Generator');
|
13
|
+
console.log(_chalk.default.yellow('----------------------\n'));
|
14
|
+
}
|
15
|
+
writing() {
|
16
|
+
const srcPath = this.templatePath('config.js');
|
17
|
+
const destPath = this.destinationPath('svgo.config.js');
|
18
|
+
this.fs.copy(srcPath, destPath);
|
19
|
+
}
|
20
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module.exports = {
|
2
|
+
plugins: [
|
3
|
+
{
|
4
|
+
name: 'preset-default',
|
5
|
+
params: {
|
6
|
+
overrides: {
|
7
|
+
// disable a default plugin
|
8
|
+
removeViewBox: false,
|
9
|
+
|
10
|
+
// // customize the params of a default plugin
|
11
|
+
// inlineStyles: {
|
12
|
+
// onlyMatchedOnce: false,
|
13
|
+
// },
|
14
|
+
},
|
15
|
+
},
|
16
|
+
},
|
17
|
+
],
|
18
|
+
};
|
package/lib/lib/generator.js
CHANGED
@@ -10,8 +10,8 @@ var _path = _interopRequireDefault(require("path"));
|
|
10
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
-
function _toPropertyKey(
|
14
|
-
function _toPrimitive(
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
15
15
|
class Generator extends _yeomanGenerator.default {
|
16
16
|
static getConfigPath() {
|
17
17
|
const home = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
@@ -63,5 +63,4 @@ _defineProperty(Generator, "prompts", {
|
|
63
63
|
}
|
64
64
|
}
|
65
65
|
});
|
66
|
-
var _default = Generator;
|
67
|
-
exports.default = _default;
|
66
|
+
var _default = exports.default = Generator;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "generator-folklore",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.19",
|
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": "
|
43
|
+
"gitHead": "a13caffa03c30420cb515e32448911740ce67c30"
|
44
44
|
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { RoutesProvider } from '@folklore/routes';
|
2
|
-
import PropTypes from 'prop-types';
|
3
|
-
import React from 'react';
|
4
|
-
import { IntlProvider } from 'react-intl';
|
5
|
-
import { BrowserRouter } from 'react-router-dom';
|
6
|
-
|
7
|
-
// import * as AppPropTypes from '../lib/PropTypes';
|
8
|
-
import App from './App';
|
9
|
-
|
10
|
-
const propTypes = {
|
11
|
-
intl: PropTypes.shape({
|
12
|
-
locale: PropTypes.string,
|
13
|
-
messages: PropTypes.oneOfType([
|
14
|
-
PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)),
|
15
|
-
PropTypes.objectOf(PropTypes.string),
|
16
|
-
]),
|
17
|
-
}),
|
18
|
-
routes: PropTypes.objectOf(PropTypes.string),
|
19
|
-
};
|
20
|
-
|
21
|
-
const defaultProps = {
|
22
|
-
intl: null,
|
23
|
-
routes: {},
|
24
|
-
};
|
25
|
-
|
26
|
-
function Container({ intl, routes }) {
|
27
|
-
const { locale = null, messages = null } = intl || {};
|
28
|
-
return (
|
29
|
-
<IntlProvider locale={locale} messages={messages[locale] || messages}>
|
30
|
-
<BrowserRouter>
|
31
|
-
<RoutesProvider routes={routes}>
|
32
|
-
<App />
|
33
|
-
</RoutesProvider>
|
34
|
-
</BrowserRouter>
|
35
|
-
</IntlProvider>
|
36
|
-
);
|
37
|
-
}
|
38
|
-
|
39
|
-
Container.propTypes = propTypes;
|
40
|
-
Container.defaultProps = defaultProps;
|
41
|
-
|
42
|
-
export default Container;
|