create-berna-stencil 1.0.51 → 1.0.52
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.
- package/_tools/assistant.js +94 -83
- package/_tools/modules/updateData.js +79 -15
- package/_tools/modules/updateIncludes.js +51 -18
- package/_tools/modules/updateOutputPath.js +34 -25
- package/_tools/modules/updatePage.js +45 -39
- package/_tools/modules/utils.js +12 -0
- package/docs/Assistant CLI.md +1 -36
- package/docs/Backend.md +1 -0
- package/docs/Head and SEO.md +2 -2
- package/docs/Javascript.md +40 -24
- package/package.json +58 -58
- package/src/backend/_core/vendor/composer/autoload_static.php +10 -10
- package/src/backend/_core/vendor/composer/installed.json +6 -6
- package/src/backend/_core/vendor/composer/installed.php +2 -2
- package/src/backend/_core/vendor/graham-campbell/result-type/LICENSE +21 -21
- package/src/backend/_core/vendor/graham-campbell/result-type/composer.json +33 -33
- package/src/backend/_core/vendor/graham-campbell/result-type/src/Error.php +121 -121
- package/src/backend/_core/vendor/graham-campbell/result-type/src/Result.php +69 -69
- package/src/backend/_core/vendor/graham-campbell/result-type/src/Success.php +120 -120
- package/src/backend/_core/vendor/phpoption/phpoption/LICENSE +200 -200
- package/src/backend/_core/vendor/phpoption/phpoption/composer.json +50 -50
- package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php +175 -175
- package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/None.php +136 -136
- package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/Option.php +434 -434
- package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/Some.php +169 -169
- package/src/backend/_core/vendor/symfony/polyfill-ctype/Ctype.php +232 -232
- package/src/backend/_core/vendor/symfony/polyfill-ctype/LICENSE +19 -19
- package/src/backend/_core/vendor/symfony/polyfill-ctype/README.md +12 -12
- package/src/backend/_core/vendor/symfony/polyfill-ctype/bootstrap.php +50 -50
- package/src/backend/_core/vendor/symfony/polyfill-ctype/bootstrap80.php +46 -46
- package/src/backend/_core/vendor/symfony/polyfill-ctype/composer.json +38 -38
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/LICENSE +19 -19
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/Mbstring.php +1077 -1077
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/README.md +13 -13
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php +119 -119
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1397 -1397
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -5
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +1489 -1489
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/bootstrap.php +171 -171
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/bootstrap80.php +167 -167
- package/src/backend/_core/vendor/symfony/polyfill-mbstring/composer.json +39 -39
- package/src/backend/_core/vendor/symfony/polyfill-php80/LICENSE +19 -19
- package/src/backend/_core/vendor/symfony/polyfill-php80/Php80.php +115 -115
- package/src/backend/_core/vendor/symfony/polyfill-php80/PhpToken.php +106 -106
- package/src/backend/_core/vendor/symfony/polyfill-php80/README.md +25 -25
- package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +31 -31
- package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +16 -16
- package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +20 -20
- package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +16 -16
- package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +16 -16
- package/src/backend/_core/vendor/symfony/polyfill-php80/bootstrap.php +42 -42
- package/src/backend/_core/vendor/symfony/polyfill-php80/composer.json +37 -37
- package/src/backend/_core/vendor/vlucas/phpdotenv/LICENSE +30 -30
- package/src/backend/_core/vendor/vlucas/phpdotenv/composer.json +60 -60
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Dotenv.php +267 -267
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php +12 -12
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php +12 -12
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php +12 -12
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php +12 -12
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php +12 -12
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/Loader.php +48 -48
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php +20 -20
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/Resolver.php +65 -65
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Entry.php +59 -59
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php +299 -299
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Lexer.php +58 -58
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Lines.php +127 -127
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Parser.php +53 -53
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php +19 -19
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Value.php +88 -88
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php +15 -15
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php +89 -89
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php +80 -80
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php +88 -88
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php +85 -85
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php +110 -110
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php +48 -48
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php +64 -64
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php +91 -91
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php +17 -17
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php +104 -104
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php +88 -88
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php +27 -27
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php +107 -107
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php +272 -272
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php +51 -51
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/File/Paths.php +44 -44
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/File/Reader.php +81 -81
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/FileStore.php +72 -72
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php +141 -141
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php +17 -17
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StringStore.php +37 -37
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Util/Regex.php +112 -112
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Util/Str.php +108 -108
- package/src/backend/_core/vendor/vlucas/phpdotenv/src/Validator.php +207 -207
- package/src/frontend/data/site.json +43 -43
- package/src/frontend/js/modules/forms/textAreaAutoExpand.js +2 -2
- package/src/frontend/scss/modules/frameworks/_bootstrap.scss +66 -66
- package/src/frontend/scss/modules/frameworks/_bulma.scss +65 -65
- package/src/frontend/scss/modules/frameworks/_foundation.scss +98 -98
- package/src/frontend/scss/modules/frameworks/_uikit.scss +79 -79
- package/src/backend/_core/vendor/graham-campbell/result-type/.gitattributes +0 -9
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/CODE_OF_CONDUCT.md +0 -132
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/CONTRIBUTING.md +0 -31
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/FUNDING.yml +0 -2
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/SECURITY.md +0 -14
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/workflows/stale.yml +0 -11
- package/src/backend/_core/vendor/graham-campbell/result-type/.github/workflows/tests.yml +0 -40
- package/src/backend/_core/vendor/graham-campbell/result-type/CHANGELOG.md +0 -53
- package/src/backend/_core/vendor/graham-campbell/result-type/README.md +0 -42
- package/src/backend/_core/vendor/graham-campbell/result-type/phpunit.xml.dist +0 -13
- package/src/backend/_core/vendor/graham-campbell/result-type/tests/ResultTest.php +0 -95
- package/src/backend/_core/vendor/phpoption/phpoption/.gitattributes +0 -13
- package/src/backend/_core/vendor/phpoption/phpoption/.github/CODE_OF_CONDUCT.md +0 -132
- package/src/backend/_core/vendor/phpoption/phpoption/.github/CONTRIBUTING.md +0 -30
- package/src/backend/_core/vendor/phpoption/phpoption/.github/FUNDING.yml +0 -2
- package/src/backend/_core/vendor/phpoption/phpoption/.github/SECURITY.md +0 -14
- package/src/backend/_core/vendor/phpoption/phpoption/.github/workflows/static.yml +0 -40
- package/src/backend/_core/vendor/phpoption/phpoption/.github/workflows/tests.yml +0 -40
- package/src/backend/_core/vendor/phpoption/phpoption/Makefile +0 -17
- package/src/backend/_core/vendor/phpoption/phpoption/README.md +0 -201
- package/src/backend/_core/vendor/phpoption/phpoption/phpstan-baseline.neon +0 -44
- package/src/backend/_core/vendor/phpoption/phpoption/phpstan.neon.dist +0 -7
- package/src/backend/_core/vendor/phpoption/phpoption/phpunit.xml.dist +0 -13
- package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/EnsureTest.php +0 -72
- package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/LazyOptionTest.php +0 -357
- package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/NoneTest.php +0 -153
- package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/OptionTest.php +0 -166
- package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/SomeTest.php +0 -194
- package/src/backend/_core/vendor/phpoption/phpoption/tests/bootstrap.php +0 -8
- package/src/backend/_core/vendor/phpoption/phpoption/vendor-bin/phpstan/composer.json +0 -8
- package/src/backend/_core/vendor/vlucas/phpdotenv/.editorconfig +0 -15
- package/src/backend/_core/vendor/vlucas/phpdotenv/.gitattributes +0 -15
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/CODE_OF_CONDUCT.md +0 -132
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/CONTRIBUTING.md +0 -30
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/FUNDING.yml +0 -2
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/SECURITY.md +0 -14
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/workflows/static.yml +0 -40
- package/src/backend/_core/vendor/vlucas/phpdotenv/.github/workflows/tests.yml +0 -70
- package/src/backend/_core/vendor/vlucas/phpdotenv/Makefile +0 -17
- package/src/backend/_core/vendor/vlucas/phpdotenv/README.md +0 -370
- package/src/backend/_core/vendor/vlucas/phpdotenv/UPGRADING.md +0 -196
- package/src/backend/_core/vendor/vlucas/phpdotenv/phpstan-baseline.neon +0 -157
- package/src/backend/_core/vendor/vlucas/phpdotenv/phpstan.neon.dist +0 -7
- package/src/backend/_core/vendor/vlucas/phpdotenv/phpunit.xml.dist +0 -13
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/DotenvTest.php +0 -387
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Loader/LoaderTest.php +0 -86
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/EntryParserTest.php +0 -234
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LexerTest.php +0 -40
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LinesTest.php +0 -53
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/ParserTest.php +0 -98
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ArrayAdapterTest.php +0 -57
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/EnvConstAdapterTest.php +0 -75
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/PutenvAdapterTest.php +0 -52
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ServerConstAdapterTest.php +0 -75
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/RepositoryTest.php +0 -305
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Store/StoreTest.php +0 -141
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/ValidatorTest.php +0 -479
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/.env +0 -5
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/assertions.env +0 -18
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/booleans.env +0 -33
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/commented.env +0 -15
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/empty.env +0 -1
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/example.env +0 -1
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/exported.env +0 -7
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/immutable.env +0 -1
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/integers.env +0 -17
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/large.env +0 -2
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multibyte.env +0 -3
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multiline.env +0 -14
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multiple.env +0 -4
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/mutable.env +0 -1
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/nested.env +0 -15
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/quoted.env +0 -11
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/specialchars.env +0 -8
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/unicodevarnames.env +0 -2
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/utf8-with-bom-encoding.env +0 -3
- package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/windows.env +0 -1
- package/src/backend/_core/vendor/vlucas/phpdotenv/vendor-bin/phpstan/composer.json +0 -15
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
const fileSystem = require(
|
|
2
|
-
const path = require(
|
|
1
|
+
const fileSystem = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const { addSiteData, removeSiteData } = require(
|
|
5
|
-
const { addLayout, removeLayout } = require(
|
|
4
|
+
const { addSiteData, removeSiteData, renameSiteData } = require('./updateData');
|
|
5
|
+
const { addLayout, removeLayout, renameLayout } = require('./updateIncludes');
|
|
6
|
+
const { getCurrentOutputPath } = require('./updateOutputPath');
|
|
7
|
+
const { toCamelCase } = require('./utils');
|
|
6
8
|
|
|
7
9
|
const TEMPLATES_DIR = path.join(__dirname, '..', 'res', 'templates');
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
// --- Helpers ---
|
|
12
|
+
|
|
13
|
+
// Returns the three file targets (scss, js, njk) for a given page name
|
|
14
|
+
function getPageTargets(pageName) {
|
|
15
|
+
const camelName = toCamelCase(pageName);
|
|
16
|
+
return [
|
|
17
|
+
{ folder: 'src/frontend/scss/pages', templateFile: 'template.scss', fileName: `${camelName}.scss` },
|
|
18
|
+
{ folder: 'src/frontend/js/pages', templateFile: 'template.js', fileName: `${camelName}.js` },
|
|
19
|
+
{ folder: 'src/frontend/_routes', templateFile: 'template.njk', fileName: `${pageName}.njk` },
|
|
20
|
+
];
|
|
13
21
|
}
|
|
14
22
|
|
|
23
|
+
// --- Public API ---
|
|
24
|
+
|
|
15
25
|
function addPage(pageName) {
|
|
16
26
|
const camelName = toCamelCase(pageName);
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
{ folder: "src/frontend/scss/pages", templateFile: "template.scss", fileName: `${camelName}.scss` },
|
|
20
|
-
{ folder: "src/frontend/js/pages", templateFile: "template.js", fileName: `${camelName}.js` },
|
|
21
|
-
{ folder: "src/frontend/_routes", templateFile: "template.njk", fileName: `${pageName}.njk` },
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
targets.forEach(({ folder, templateFile, fileName }) => {
|
|
28
|
+
getPageTargets(pageName).forEach(({ folder, templateFile, fileName }) => {
|
|
25
29
|
const destPath = path.join(folder, fileName);
|
|
26
30
|
fileSystem.mkdirSync(folder, { recursive: true });
|
|
27
31
|
|
|
28
|
-
if (
|
|
29
|
-
const srcPath = path.join(TEMPLATES_DIR, templateFile);
|
|
32
|
+
if (fileSystem.existsSync(destPath)) return;
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
let content = fileSystem.readFileSync(srcPath, 'utf8');
|
|
33
|
-
content = content
|
|
34
|
-
.replace(/^title:.*$/m, `title: "${camelName}"`)
|
|
35
|
-
.replace(/^permalink:.*$/m, `permalink: "/${pageName}/"`);
|
|
36
|
-
fileSystem.writeFileSync(destPath, content);
|
|
37
|
-
} else {
|
|
38
|
-
fileSystem.copyFileSync(srcPath, destPath);
|
|
39
|
-
}
|
|
34
|
+
const srcPath = path.join(TEMPLATES_DIR, templateFile);
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
if (templateFile === 'template.njk') {
|
|
37
|
+
// Patch the frontmatter placeholders with the actual page values
|
|
38
|
+
const content = fileSystem.readFileSync(srcPath, 'utf8')
|
|
39
|
+
.replace(/^title:.*$/m, `title: "${camelName}"`)
|
|
40
|
+
.replace(/^permalink:.*$/m, `permalink: "/${pageName}/"`);
|
|
41
|
+
fileSystem.writeFileSync(destPath, content);
|
|
42
|
+
} else {
|
|
43
|
+
fileSystem.copyFileSync(srcPath, destPath);
|
|
42
44
|
}
|
|
45
|
+
|
|
46
|
+
console.log(`[created file] ${destPath}`);
|
|
43
47
|
});
|
|
44
48
|
|
|
45
49
|
addLayout(pageName);
|
|
@@ -50,10 +54,11 @@ function renamePage(oldName, newName) {
|
|
|
50
54
|
const oldCamel = toCamelCase(oldName);
|
|
51
55
|
const newCamel = toCamelCase(newName);
|
|
52
56
|
|
|
57
|
+
// Use consistent src/frontend/ paths (matching addPage)
|
|
53
58
|
const filesToRename = [
|
|
54
|
-
{ src: `src/scss/pages/${oldCamel}.scss`, dest: `src/scss/pages/${newCamel}.scss` },
|
|
55
|
-
{ src: `src/js/pages/${oldCamel}.js`, dest: `src/js/pages/${newCamel}.js` },
|
|
56
|
-
{ src: `src/_routes/${oldName}.njk`, dest: `src/_routes/${newName}.njk` },
|
|
59
|
+
{ src: `src/frontend/scss/pages/${oldCamel}.scss`, dest: `src/frontend/scss/pages/${newCamel}.scss` },
|
|
60
|
+
{ src: `src/frontend/js/pages/${oldCamel}.js`, dest: `src/frontend/js/pages/${newCamel}.js` },
|
|
61
|
+
{ src: `src/frontend/_routes/${oldName}.njk`, dest: `src/frontend/_routes/${newName}.njk` },
|
|
57
62
|
];
|
|
58
63
|
|
|
59
64
|
filesToRename.forEach(({ src, dest }) => {
|
|
@@ -65,29 +70,30 @@ function renamePage(oldName, newName) {
|
|
|
65
70
|
console.log(`[renamed] ${src} → ${dest}`);
|
|
66
71
|
});
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
addSiteData(newName);
|
|
73
|
+
// Use atomic rename helpers instead of remove + add separately
|
|
74
|
+
renameLayout(oldName, newName);
|
|
75
|
+
renameSiteData(oldName, newName);
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
function removePage(pageName) {
|
|
75
79
|
const camelName = toCamelCase(pageName);
|
|
76
|
-
|
|
80
|
+
|
|
81
|
+
// Read the actual current output dir instead of hardcoding "out"
|
|
82
|
+
const OUTPUT_DIR = getCurrentOutputPath() || 'out';
|
|
77
83
|
|
|
78
84
|
const filesToDelete = [
|
|
79
85
|
`src/frontend/scss/pages/${camelName}.scss`,
|
|
80
86
|
`src/frontend/js/pages/${camelName}.js`,
|
|
81
87
|
`src/frontend/_routes/${pageName}.njk`,
|
|
82
|
-
path.join(OUTPUT_DIR,
|
|
83
|
-
path.join(OUTPUT_DIR,
|
|
88
|
+
path.join(OUTPUT_DIR, 'js/pages', `${camelName}.js`),
|
|
89
|
+
path.join(OUTPUT_DIR, 'css/pages', `${camelName}.css`),
|
|
84
90
|
path.join(OUTPUT_DIR, `${pageName}.html`),
|
|
85
|
-
path.join(OUTPUT_DIR,
|
|
91
|
+
path.join(OUTPUT_DIR, 'pages', `${pageName}.html`),
|
|
86
92
|
];
|
|
87
93
|
|
|
88
94
|
const foldersToDelete = [
|
|
89
95
|
path.join(OUTPUT_DIR, pageName),
|
|
90
|
-
path.join(OUTPUT_DIR,
|
|
96
|
+
path.join(OUTPUT_DIR, 'pages', pageName),
|
|
91
97
|
];
|
|
92
98
|
|
|
93
99
|
filesToDelete.forEach(f => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Shared utility functions used across modules
|
|
2
|
+
|
|
3
|
+
// Converts a kebab-case or snake_case string to camelCase.
|
|
4
|
+
// Uses slice(1) to remove the delimiter, avoiding the double-replace bug
|
|
5
|
+
// that occurs when using .replace('-', '') without the /g flag.
|
|
6
|
+
function toCamelCase(str) {
|
|
7
|
+
return str.toLowerCase().replace(/[-_][a-z0-9]/g, (group) =>
|
|
8
|
+
group.slice(1).toUpperCase()
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
module.exports = { toCamelCase };
|
package/docs/Assistant CLI.md
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
# Assistant CLI
|
|
4
|
-
|
|
5
|
-
`assistant.js` is a CLI tool to manage pages and project configuration without editing files manually.
|
|
6
|
-
|
|
7
|
-
## Run
|
|
8
|
-
```bash
|
|
9
|
-
node assistant.js
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Options
|
|
13
|
-
|
|
14
|
-
### 1. Create a page
|
|
15
|
-
Enter a page name in kebab-case (e.g. `contact-us`). The CLI generates:
|
|
16
|
-
|
|
17
|
-
| File | Purpose |
|
|
18
|
-
|---|---|
|
|
19
|
-
| `src/pages/contact-us.njk` | Page template |
|
|
20
|
-
| `src/scss/pages/contactUs.scss` | Page styles |
|
|
21
|
-
| `src/js/pages/contactUs.js` | Page scripts |
|
|
22
|
-
|
|
23
|
-
It also registers the page automatically in:
|
|
24
|
-
- `src/layouts/includes.njk` — adds an `elif` block for component routing
|
|
25
|
-
- `src/data/site.json` — adds an SEO entry under `pages`
|
|
26
|
-
|
|
27
|
-
> Protected pages (`homepage`, `404`) cannot be created or removed.
|
|
28
|
-
|
|
29
|
-
### 2. Remove a page
|
|
30
|
-
Enter the page name to delete all related files and clean up registrations.
|
|
31
|
-
|
|
32
|
-
### 3. Configure output path
|
|
33
|
-
Change the build output directory. Updates both `.eleventy.js` and `package.json` automatically.
|
|
34
|
-
|
|
35
|
-
## Naming conventions
|
|
36
|
-
Page names are always kebab-case for URLs and file names (`contact-us`), and camelCase for SCSS and JS (`contactUs`). The CLI handles the conversion automatically.
|
|
1
|
+
# ...
|
package/docs/Backend.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ...
|
package/docs/Head and SEO.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
This json holds global settings used across all pages in `base.njk` and other components:
|
|
5
5
|
|
|
6
|
-
### site.json <small>`src/frontend/data
|
|
6
|
+
### site.json <small>`(src/frontend/data/)`</small>
|
|
7
7
|
```json
|
|
8
8
|
"site_name": "Site name",
|
|
9
9
|
"title": "Site title",
|
|
@@ -25,7 +25,7 @@ Each page entry is keyed by its camelCase `title` from the front matter:
|
|
|
25
25
|
|
|
26
26
|
If you don't want to use a particular cdn inserting it in `base.njk` for all pages, you can add extra specific cdn (css, js) by inserting the link in each page of site.json separating them with a `,` and setting them in ""
|
|
27
27
|
|
|
28
|
-
### site.json <small>`src/frontend/data
|
|
28
|
+
### site.json <small>`(src/frontend/data/)`</small>
|
|
29
29
|
```json
|
|
30
30
|
"pages": {
|
|
31
31
|
...
|
package/docs/Javascript.md
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
# To be finished...
|
|
2
|
-
|
|
3
1
|
# JavaScript
|
|
4
2
|
|
|
5
|
-
## Page
|
|
3
|
+
## Page JS
|
|
4
|
+
|
|
5
|
+
Each page has its own JS entry point in `src/frontend/js/pages/`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
It is bundled and minified by esbuild and loaded automatically by `base.njk`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Import only what the page needs.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
### examplePage.js <small>(`src/frontend/js/pages/`)</small>
|
|
12
|
+
```js
|
|
13
|
+
import { initLangSwitcher } from '../modules/langSwitcher.js';
|
|
14
|
+
import { showNotification } from '../modules/notification.js';
|
|
15
|
+
|
|
16
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
17
|
+
initLangSwitcher();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
showNotification("Page loaded", "success", 3000);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Modules
|
|
24
|
+
|
|
25
|
+
Modules live in `src/frontend/js/modules/`. Some must be called inside `DOMContentLoaded` as they interact with the DOM; others create elements dynamically and can be called anywhere.
|
|
26
|
+
|
|
27
|
+
### Call inside `DOMContentLoaded`
|
|
12
28
|
|
|
13
29
|
| Module | Function |
|
|
14
30
|
|---|---|
|
|
@@ -17,26 +33,13 @@ Each page has a JS entry point in `src/js/pages/`. It is bundled by esbuild and
|
|
|
17
33
|
| `modules/forms/textAreaAutoExpand.js` | `initTextAreaAutoExpand()` |
|
|
18
34
|
| `modules/forms/normalizePhoneNumber.js` | `initNormalizePhoneNumber()` |
|
|
19
35
|
|
|
20
|
-
|
|
36
|
+
### Call anywhere
|
|
21
37
|
|
|
22
38
|
| Module | Function |
|
|
23
39
|
|---|---|
|
|
24
40
|
| `modules/notification.js` | `showNotification(text, type, duration)` |
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```js
|
|
29
|
-
import { initLangSwitcher } from '../modules/langSwitcher.js';
|
|
30
|
-
import { showNotification } from '../modules/notification.js';
|
|
31
|
-
|
|
32
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
33
|
-
initLangSwitcher();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
showNotification("Page loaded", "success", 3000);
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## `showNotification` reference
|
|
42
|
+
### `showNotification` parameters
|
|
40
43
|
|
|
41
44
|
| Parameter | Type | Default | Values |
|
|
42
45
|
|---|---|---|---|
|
|
@@ -46,8 +49,21 @@ showNotification("Page loaded", "success", 3000);
|
|
|
46
49
|
|
|
47
50
|
## Adding a module
|
|
48
51
|
|
|
49
|
-
Create a file in `src/js/modules
|
|
52
|
+
Create a new `.js` file in `src/frontend/js/modules/`. You can organize them into subfolders freely.
|
|
53
|
+
|
|
54
|
+
Use ESM syntax — esbuild handles the bundling:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
// _yourModule.js
|
|
58
|
+
export function yourFunction() {
|
|
59
|
+
// ...
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then import it in the pages that need it:
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
```js
|
|
66
|
+
import { yourFunction } from '../modules/yourModule.js';
|
|
67
|
+
```
|
|
52
68
|
|
|
53
|
-
|
|
69
|
+
> ⚠️ Files inside `_tools/` run directly in Node.js without a bundler — use CommonJS (`require` / `module.exports`) there, not ESM.
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-berna-stencil",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"author": "Michele Garofalo",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/rhaastrake/berna-stencil"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/rhaastrake/berna-stencil#readme",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/rhaastrake/berna-stencil/issues"
|
|
15
|
-
},
|
|
16
|
-
"bin": {
|
|
17
|
-
"create-berna-stencil": "bin/create.js"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"bin/",
|
|
21
|
-
"docs/",
|
|
22
|
-
"src/",
|
|
23
|
-
"_tools/",
|
|
24
|
-
".eleventy.js",
|
|
25
|
-
".eleventyignore",
|
|
26
|
-
".gitignore"
|
|
27
|
-
],
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=18.0.0"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@11ty/eleventy": "^3.1.2",
|
|
33
|
-
"@11ty/eleventy-img": "^6.0.4",
|
|
34
|
-
"bootstrap": "^5.3.8",
|
|
35
|
-
"bootstrap-icons": "^1.13.1",
|
|
36
|
-
"bulma": "^1.0.4",
|
|
37
|
-
"foundation-sites": "^6.9.0",
|
|
38
|
-
"glob": "^13.0.6",
|
|
39
|
-
"uikit": "^3.25.13"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"concurrently": "^9.2.1",
|
|
43
|
-
"esbuild": "^0.27.3",
|
|
44
|
-
"sass": "^1.77.0"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build:css": "sass src/frontend/scss:out/css --no-source-map --style=compressed --quiet
|
|
48
|
-
"build:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --minify",
|
|
49
|
-
"build:11ty": "eleventy",
|
|
50
|
-
"build": "npm run build:css && npm run build:js && npm run build:11ty",
|
|
51
|
-
"serve:css": "sass --watch src/frontend/scss:out/css --no-source-map --quiet
|
|
52
|
-
"serve:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --watch",
|
|
53
|
-
"serve:11ty": "eleventy --serve --quiet",
|
|
54
|
-
"clean": "node _tools/cleanOutput.js",
|
|
55
|
-
"serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
|
|
56
|
-
"assistant": "node _tools/assistant.js",
|
|
57
|
-
"postinstall": "cd src/backend/_core && composer install --quiet"
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-berna-stencil",
|
|
3
|
+
"version": "1.0.52",
|
|
4
|
+
"description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "Michele Garofalo",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/rhaastrake/berna-stencil"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/rhaastrake/berna-stencil#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/rhaastrake/berna-stencil/issues"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"create-berna-stencil": "bin/create.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin/",
|
|
21
|
+
"docs/",
|
|
22
|
+
"src/",
|
|
23
|
+
"_tools/",
|
|
24
|
+
".eleventy.js",
|
|
25
|
+
".eleventyignore",
|
|
26
|
+
".gitignore"
|
|
27
|
+
],
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18.0.0"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@11ty/eleventy": "^3.1.2",
|
|
33
|
+
"@11ty/eleventy-img": "^6.0.4",
|
|
34
|
+
"bootstrap": "^5.3.8",
|
|
35
|
+
"bootstrap-icons": "^1.13.1",
|
|
36
|
+
"bulma": "^1.0.4",
|
|
37
|
+
"foundation-sites": "^6.9.0",
|
|
38
|
+
"glob": "^13.0.6",
|
|
39
|
+
"uikit": "^3.25.13"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"concurrently": "^9.2.1",
|
|
43
|
+
"esbuild": "^0.27.3",
|
|
44
|
+
"sass": "^1.77.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build:css": "sass src/frontend/scss:out/css --no-source-map --style=compressed --quiet",
|
|
48
|
+
"build:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --minify",
|
|
49
|
+
"build:11ty": "eleventy",
|
|
50
|
+
"build": "npm run clean && npm run build:css && npm run build:js && npm run build:11ty",
|
|
51
|
+
"serve:css": "sass --watch src/frontend/scss:out/css --no-source-map --quiet",
|
|
52
|
+
"serve:js": "esbuild \"src/frontend/js/pages/*.js\" --bundle --outdir=out/js/pages --watch",
|
|
53
|
+
"serve:11ty": "eleventy --serve --quiet",
|
|
54
|
+
"clean": "node _tools/cleanOutput.js",
|
|
55
|
+
"serve": "npm run clean && concurrently \"npm run serve:11ty\" \"npm run serve:css\" \"npm run serve:js\"",
|
|
56
|
+
"assistant": "node _tools/assistant.js",
|
|
57
|
+
"postinstall": "cd src/backend/_core && composer install --quiet"
|
|
58
|
+
}
|
|
59
59
|
}
|
|
@@ -13,48 +13,48 @@ class ComposerStaticInit108be68e4e2b97fed51d36a10eed0849
|
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
public static $prefixLengthsPsr4 = array (
|
|
16
|
-
'S' =>
|
|
16
|
+
'S' =>
|
|
17
17
|
array (
|
|
18
18
|
'Symfony\\Polyfill\\Php80\\' => 23,
|
|
19
19
|
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
|
20
20
|
'Symfony\\Polyfill\\Ctype\\' => 23,
|
|
21
21
|
),
|
|
22
|
-
'P' =>
|
|
22
|
+
'P' =>
|
|
23
23
|
array (
|
|
24
24
|
'PhpOption\\' => 10,
|
|
25
25
|
),
|
|
26
|
-
'G' =>
|
|
26
|
+
'G' =>
|
|
27
27
|
array (
|
|
28
28
|
'GrahamCampbell\\ResultType\\' => 26,
|
|
29
29
|
),
|
|
30
|
-
'D' =>
|
|
30
|
+
'D' =>
|
|
31
31
|
array (
|
|
32
32
|
'Dotenv\\' => 7,
|
|
33
33
|
),
|
|
34
34
|
);
|
|
35
35
|
|
|
36
36
|
public static $prefixDirsPsr4 = array (
|
|
37
|
-
'Symfony\\Polyfill\\Php80\\' =>
|
|
37
|
+
'Symfony\\Polyfill\\Php80\\' =>
|
|
38
38
|
array (
|
|
39
39
|
0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
|
|
40
40
|
),
|
|
41
|
-
'Symfony\\Polyfill\\Mbstring\\' =>
|
|
41
|
+
'Symfony\\Polyfill\\Mbstring\\' =>
|
|
42
42
|
array (
|
|
43
43
|
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
|
44
44
|
),
|
|
45
|
-
'Symfony\\Polyfill\\Ctype\\' =>
|
|
45
|
+
'Symfony\\Polyfill\\Ctype\\' =>
|
|
46
46
|
array (
|
|
47
47
|
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
|
48
48
|
),
|
|
49
|
-
'PhpOption\\' =>
|
|
49
|
+
'PhpOption\\' =>
|
|
50
50
|
array (
|
|
51
51
|
0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
|
|
52
52
|
),
|
|
53
|
-
'GrahamCampbell\\ResultType\\' =>
|
|
53
|
+
'GrahamCampbell\\ResultType\\' =>
|
|
54
54
|
array (
|
|
55
55
|
0 => __DIR__ . '/..' . '/graham-campbell/result-type/src',
|
|
56
56
|
),
|
|
57
|
-
'Dotenv\\' =>
|
|
57
|
+
'Dotenv\\' =>
|
|
58
58
|
array (
|
|
59
59
|
0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
|
|
60
60
|
),
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"time": "2025-12-27T19:43:20+00:00",
|
|
26
26
|
"type": "library",
|
|
27
|
-
"installation-source": "
|
|
27
|
+
"installation-source": "dist",
|
|
28
28
|
"autoload": {
|
|
29
29
|
"psr-4": {
|
|
30
30
|
"GrahamCampbell\\ResultType\\": "src/"
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"dev-master": "1.9-dev"
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
"installation-source": "
|
|
101
|
+
"installation-source": "dist",
|
|
102
102
|
"autoload": {
|
|
103
103
|
"psr-4": {
|
|
104
104
|
"PhpOption\\": "src/PhpOption/"
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"name": "symfony/polyfill"
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
|
-
"installation-source": "
|
|
178
|
+
"installation-source": "dist",
|
|
179
179
|
"autoload": {
|
|
180
180
|
"files": [
|
|
181
181
|
"bootstrap.php"
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
"name": "symfony/polyfill"
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
|
-
"installation-source": "
|
|
265
|
+
"installation-source": "dist",
|
|
266
266
|
"autoload": {
|
|
267
267
|
"files": [
|
|
268
268
|
"bootstrap.php"
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
"name": "symfony/polyfill"
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
|
-
"installation-source": "
|
|
346
|
+
"installation-source": "dist",
|
|
347
347
|
"autoload": {
|
|
348
348
|
"files": [
|
|
349
349
|
"bootstrap.php"
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
"dev-master": "5.6-dev"
|
|
448
448
|
}
|
|
449
449
|
},
|
|
450
|
-
"installation-source": "
|
|
450
|
+
"installation-source": "dist",
|
|
451
451
|
"autoload": {
|
|
452
452
|
"psr-4": {
|
|
453
453
|
"Dotenv\\": "src/"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => '__root__',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => 'abd41735fb0323798fbaca8b317b15190d4c5da6',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'__root__' => array(
|
|
14
14
|
'pretty_version' => 'dev-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => 'abd41735fb0323798fbaca8b317b15190d4c5da6',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020-2024 Graham Campbell <hello@gjcampbell.co.uk>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2024 Graham Campbell <hello@gjcampbell.co.uk>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "graham-campbell/result-type",
|
|
3
|
-
"description": "An Implementation Of The Result Type",
|
|
4
|
-
"keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"],
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"authors": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Graham Campbell",
|
|
9
|
-
"email": "hello@gjcampbell.co.uk",
|
|
10
|
-
"homepage": "https://github.com/GrahamCampbell"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"require": {
|
|
14
|
-
"php": "^7.2.5 || ^8.0",
|
|
15
|
-
"phpoption/phpoption": "^1.9.5"
|
|
16
|
-
},
|
|
17
|
-
"require-dev": {
|
|
18
|
-
"phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7"
|
|
19
|
-
},
|
|
20
|
-
"autoload": {
|
|
21
|
-
"psr-4": {
|
|
22
|
-
"GrahamCampbell\\ResultType\\": "src/"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"autoload-dev": {
|
|
26
|
-
"psr-4": {
|
|
27
|
-
"GrahamCampbell\\Tests\\ResultType\\": "tests/"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"config": {
|
|
31
|
-
"preferred-install": "dist"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "graham-campbell/result-type",
|
|
3
|
+
"description": "An Implementation Of The Result Type",
|
|
4
|
+
"keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"],
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"authors": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Graham Campbell",
|
|
9
|
+
"email": "hello@gjcampbell.co.uk",
|
|
10
|
+
"homepage": "https://github.com/GrahamCampbell"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"require": {
|
|
14
|
+
"php": "^7.2.5 || ^8.0",
|
|
15
|
+
"phpoption/phpoption": "^1.9.5"
|
|
16
|
+
},
|
|
17
|
+
"require-dev": {
|
|
18
|
+
"phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7"
|
|
19
|
+
},
|
|
20
|
+
"autoload": {
|
|
21
|
+
"psr-4": {
|
|
22
|
+
"GrahamCampbell\\ResultType\\": "src/"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"autoload-dev": {
|
|
26
|
+
"psr-4": {
|
|
27
|
+
"GrahamCampbell\\Tests\\ResultType\\": "tests/"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"config": {
|
|
31
|
+
"preferred-install": "dist"
|
|
32
|
+
}
|
|
33
|
+
}
|