generator-folklore 3.0.21 → 3.0.23
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/generators/app/index.js +3 -3
- package/lib/generators/babel/index.js +1 -1
- package/lib/generators/browserslist/index.js +1 -1
- package/lib/generators/build/index.js +1 -1
- package/lib/generators/cli/index.js +1 -1
- package/lib/generators/docs/index.js +3 -3
- package/lib/generators/editorconfig/index.js +1 -1
- package/lib/generators/eslint/index.js +1 -1
- package/lib/generators/html-project/index.js +1 -1
- package/lib/generators/intl/index.js +1 -1
- package/lib/generators/laravel/index.js +3 -3
- package/lib/generators/laravel-auth/index.js +1 -1
- package/lib/generators/laravel-mediatheque/index.js +1 -1
- package/lib/generators/laravel-package/index.js +1 -1
- package/lib/generators/laravel-panneau/index.js +1 -1
- package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlockResource.php +22 -3
- package/lib/generators/laravel-panneau/templates/app/Models/Block.php +1 -1
- package/lib/generators/laravel-panneau/templates/app/Models/Page.php +5 -0
- package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/BlockResource.php +19 -2
- package/lib/generators/laravel-panneau/templates/resources/assets/js/components/Panneau.jsx +6 -6
- package/lib/generators/laravel-panneau/templates/resources/assets/styles/panneau.scss +2 -0
- package/lib/generators/laravel-project/index.js +3 -3
- package/lib/generators/lerna-package/index.js +1 -1
- package/lib/generators/lerna-repository/index.js +1 -1
- package/lib/generators/micromag-project/index.js +1 -1
- package/lib/generators/node-project/index.js +2 -2
- package/lib/generators/npm-package/index.js +1 -1
- package/lib/generators/prettier/index.js +1 -1
- package/lib/generators/react-app/index.js +3 -3
- package/lib/generators/react-package/index.js +1 -1
- package/lib/generators/rollup/index.js +1 -1
- package/lib/generators/sass-lint/index.js +1 -1
- package/lib/generators/scss/index.js +1 -1
- package/lib/generators/server/index.js +1 -1
- package/lib/generators/storybook/index.js +1 -1
- package/lib/generators/stylelint/index.js +1 -1
- package/lib/generators/svgo/index.js +1 -1
- package/lib/generators/test/index.js +1 -1
- package/lib/lib/generator.js +3 -3
- package/lib/lib/utils.js +1 -1
- package/package.json +2 -2
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
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
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
|
-
function _defineProperty(
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
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
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _path = _interopRequireDefault(require("path"));
|
5
5
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
6
|
-
function _interopRequireDefault(
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
7
|
module.exports = class BabelGenerator extends _generator.default {
|
8
8
|
constructor(...args) {
|
9
9
|
super(...args);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class BrowsersListGenerator extends _generator.default {
|
7
7
|
get prompting() {
|
8
8
|
return {
|
@@ -5,7 +5,7 @@ var _isArray = _interopRequireDefault(require("lodash/isArray"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
7
|
var _utils = require("../../lib/utils");
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class AppGenerator extends _generator.default {
|
10
10
|
// The name `constructor` is important here
|
11
11
|
constructor(...args) {
|
@@ -4,7 +4,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
module.exports = class CliGenerator extends _generator.default {
|
9
9
|
// The name `constructor` is important here
|
10
10
|
constructor(...args) {
|
@@ -4,11 +4,11 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
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
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
|
-
function _defineProperty(
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
12
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) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class EditorConfigGenerator extends _generator.default {
|
7
7
|
prompting() {
|
8
8
|
if (this.options.quiet) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class EslintGenerator extends _generator.default {
|
7
7
|
prompting() {
|
8
8
|
if (this.options.quiet) {
|
@@ -4,7 +4,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
module.exports = class HTMLProjectGenerator extends _generator.default {
|
9
9
|
// The name `constructor` is important here
|
10
10
|
constructor(...args) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _path = _interopRequireDefault(require("path"));
|
5
5
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
6
|
-
function _interopRequireDefault(
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
7
|
module.exports = class IntlGenerator extends _generator.default {
|
8
8
|
constructor(...args) {
|
9
9
|
super(...args);
|
@@ -7,11 +7,11 @@ var _path = _interopRequireDefault(require("path"));
|
|
7
7
|
var _chalk = _interopRequireDefault(require("chalk"));
|
8
8
|
var _passwordGenerator = _interopRequireDefault(require("password-generator"));
|
9
9
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
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
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
|
-
function _defineProperty(
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
15
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) {
|
@@ -5,7 +5,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
5
5
|
var _glob = _interopRequireDefault(require("glob"));
|
6
6
|
var _path = _interopRequireDefault(require("path"));
|
7
7
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class LaravelAuthGenerator extends _generator.default {
|
10
10
|
constructor(...args) {
|
11
11
|
super(...args);
|
@@ -5,7 +5,7 @@ var _glob = _interopRequireDefault(require("glob"));
|
|
5
5
|
var _lodash = _interopRequireDefault(require("lodash"));
|
6
6
|
var _path = _interopRequireDefault(require("path"));
|
7
7
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class LaravelMediathequeGenerator extends _generator.default {
|
10
10
|
constructor(...args) {
|
11
11
|
super(...args);
|
@@ -5,7 +5,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _changeCase = require("change-case");
|
7
7
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class ComposerPackageGenerator extends _generator.default {
|
10
10
|
constructor(...args) {
|
11
11
|
super(...args);
|
@@ -7,7 +7,7 @@ var _glob = _interopRequireDefault(require("glob"));
|
|
7
7
|
var _lodash = _interopRequireDefault(require("lodash"));
|
8
8
|
var _path = _interopRequireDefault(require("path"));
|
9
9
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
11
|
module.exports = class LaravelPanneauGenerator extends _generator.default {
|
12
12
|
constructor(...args) {
|
13
13
|
super(...args);
|
@@ -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 ()
|
31
|
+
$this->mergeWhen($this->resource instanceof TextBlock, function () {
|
31
32
|
return [
|
32
|
-
'
|
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
|
];
|
package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/BlockResource.php
CHANGED
@@ -3,9 +3,11 @@
|
|
3
3
|
namespace App\Panneau\Http\Resources;
|
4
4
|
|
5
5
|
use Illuminate\Http\Resources\Json\JsonResource;
|
6
|
-
use
|
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
|
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(() => {
|
@@ -7,11 +7,11 @@ var _passwordGenerator = _interopRequireDefault(require("password-generator"));
|
|
7
7
|
var _path = _interopRequireDefault(require("path"));
|
8
8
|
var _yeomanRemote = _interopRequireDefault(require("yeoman-remote"));
|
9
9
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
10
|
-
function _interopRequireDefault(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
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
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
|
-
function _defineProperty(
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
15
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) {
|
@@ -6,7 +6,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
6
6
|
var _get = _interopRequireDefault(require("lodash/get"));
|
7
7
|
var _changeCase = require("change-case");
|
8
8
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
9
|
-
function _interopRequireDefault(
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
10
|
module.exports = class LernaPackageGenerator extends _generator.default {
|
11
11
|
constructor(...args) {
|
12
12
|
super(...args);
|
@@ -4,7 +4,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
module.exports = class LernaRepositoryGenerator extends _generator.default {
|
9
9
|
constructor(...args) {
|
10
10
|
super(...args);
|
@@ -5,7 +5,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
7
|
var _utils = require("../../lib/utils");
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class MicromagProjectGenerator extends _generator.default {
|
10
10
|
// The name `constructor` is important here
|
11
11
|
constructor(...args) {
|
@@ -5,7 +5,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
7
|
var _utils = require("../../lib/utils");
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class NodeProjectGenerator extends _generator.default {
|
10
10
|
// The name `constructor` is important here
|
11
11
|
constructor(...args) {
|
@@ -116,7 +116,7 @@ module.exports = class NodeProjectGenerator extends _generator.default {
|
|
116
116
|
const serverEntryPath = _path.default.join(srcPath, serverPath, 'server.js');
|
117
117
|
const scripts = {
|
118
118
|
'build:web': `flklr build --load-env ${(0, _utils.ensureLeadingDotSlash)(webEntryPath)}`,
|
119
|
-
'build:rollup': `rollup --config rollup.config.js`,
|
119
|
+
'build:rollup': `rollup --bundleConfigAsCjs --config rollup.config.js`,
|
120
120
|
'build': 'npm run build:web && npm run build:rollup',
|
121
121
|
'server': `babel-node ${(0, _utils.ensureLeadingDotSlash)(serverEntryPath)}`,
|
122
122
|
'start': `flklr serve --load-env ${(0, _utils.ensureLeadingDotSlash)(webEntryPath)}`
|
@@ -4,7 +4,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
module.exports = class NpmPackageGenerator extends _generator.default {
|
9
9
|
constructor(...args) {
|
10
10
|
super(...args);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class PrettierGenerator extends _generator.default {
|
7
7
|
get prompting() {
|
8
8
|
return {
|
@@ -4,11 +4,11 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
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
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
|
-
function _defineProperty(
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
12
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
|
@@ -5,7 +5,7 @@ var _changeCase = require("change-case");
|
|
5
5
|
var _lodash = _interopRequireDefault(require("lodash"));
|
6
6
|
var _path = _interopRequireDefault(require("path"));
|
7
7
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
module.exports = class ReactPackageGenerator extends _generator.default {
|
10
10
|
constructor(...args) {
|
11
11
|
super(...args);
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _path = _interopRequireDefault(require("path"));
|
5
5
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
6
|
-
function _interopRequireDefault(
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
7
|
module.exports = class RollupGenerator extends _generator.default {
|
8
8
|
constructor(...args) {
|
9
9
|
super(...args);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class SassLintGenerator extends _generator.default {
|
7
7
|
constructor(...args) {
|
8
8
|
super(...args);
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _path = _interopRequireDefault(require("path"));
|
5
5
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
6
|
-
function _interopRequireDefault(
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
7
|
module.exports = class ScssGenerator extends _generator.default {
|
8
8
|
constructor(...args) {
|
9
9
|
super(...args);
|
@@ -4,7 +4,7 @@ var _chalk = _interopRequireDefault(require("chalk"));
|
|
4
4
|
var _lodash = _interopRequireDefault(require("lodash"));
|
5
5
|
var _path = _interopRequireDefault(require("path"));
|
6
6
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
7
|
-
function _interopRequireDefault(
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
8
8
|
module.exports = class ServerGenerator extends _generator.default {
|
9
9
|
// The name `constructor` is important here
|
10
10
|
constructor(...args) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _path = _interopRequireDefault(require("path"));
|
5
5
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
6
|
-
function _interopRequireDefault(
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
7
|
module.exports = class StorybookGenerator extends _generator.default {
|
8
8
|
constructor(...args) {
|
9
9
|
super(...args);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class StylelintGenerator extends _generator.default {
|
7
7
|
constructor(...args) {
|
8
8
|
super(...args);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class SvgoGenerator extends _generator.default {
|
7
7
|
prompting() {
|
8
8
|
if (this.options.quiet) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var _chalk = _interopRequireDefault(require("chalk"));
|
4
4
|
var _generator = _interopRequireDefault(require("../../lib/generator"));
|
5
|
-
function _interopRequireDefault(
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
6
6
|
module.exports = class TestGenerator extends _generator.default {
|
7
7
|
constructor(...args) {
|
8
8
|
super(...args);
|
package/lib/lib/generator.js
CHANGED
@@ -8,9 +8,9 @@ var _yeomanGenerator = _interopRequireDefault(require("yeoman-generator"));
|
|
8
8
|
var _immutable = _interopRequireDefault(require("immutable"));
|
9
9
|
var _path = _interopRequireDefault(require("path"));
|
10
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
11
|
-
function _interopRequireDefault(
|
12
|
-
function _defineProperty(
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
14
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() {
|
package/lib/lib/utils.js
CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.ensureLeadingDotSlash = ensureLeadingDotSlash;
|
7
7
|
var _lodash = require("lodash");
|
8
8
|
var _path = _interopRequireDefault(require("path"));
|
9
|
-
function _interopRequireDefault(
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
10
|
function ensureLeadingDotSlash(filePath) {
|
11
11
|
return (0, _lodash.isString)(filePath) && !_path.default.isAbsolute(filePath) && filePath.match(/^\./) === null ? `./${filePath}` : filePath;
|
12
12
|
;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "generator-folklore",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.23",
|
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": "c13ef70b8126b3182b3e3365f34f9231fa9b1535"
|
44
44
|
}
|