@videinfra/static-website-builder 2.0.2 → 2.0.4
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/.prettierrc +11 -11
- package/CHANGELOG.md +214 -210
- package/README.md +102 -102
- package/bin/builder.js +40 -40
- package/eslint.config.js +39 -39
- package/gulpfile.js +63 -63
- package/init/default/config/config.js +44 -44
- package/init/default/src/html/data/global.js +9 -9
- package/init/default/src/javascripts/_entries.js +14 -14
- package/init/index.js +63 -63
- package/init/test/.env +6 -6
- package/init/test/.env.local +3 -2
- package/init/test/config/config.js +71 -67
- package/init/test/src/html/404.twig +12 -12
- package/init/test/src/html/data/global.js +10 -10
- package/init/test/src/html/env.twig +21 -21
- package/init/test/src/html/layouts/base.twig +1 -1
- package/init/test/src/html/other.twig +9 -9
- package/init/test/src/html/preposition.twig +4 -4
- package/init/test/src/javascripts/_entries-alt.js +10 -10
- package/init/test/src/javascripts/_entries.js +19 -19
- package/init/test/src/javascripts/common.js +13 -13
- package/init/test/src/javascripts/main.js +8 -8
- package/init/test/src/javascripts/something.ts +9 -9
- package/init/test/src/stylesheets/autoprefixer-test.scss +3 -3
- package/init/test/src/stylesheets/env-test.scss +28 -28
- package/init/test/src/stylesheets/ignore-test.scss +4 -4
- package/init/test/src/stylesheets/nested-calc-test.scss +3 -3
- package/init/test/src/stylesheets/sub-folder/import-test.scss +2 -2
- package/lib/camelize-file-name.js +21 -21
- package/lib/generate-gulp-tasks.js +85 -85
- package/lib/get-config.js +203 -204
- package/lib/get-file-names.js +23 -23
- package/lib/get-path.js +102 -102
- package/lib/globs-helper.js +243 -243
- package/lib/gulp/dynamic-task.js +8 -8
- package/lib/gulp/resolve-dynamic-task.js +11 -11
- package/lib/gulp/task-before-dest.js +8 -8
- package/lib/gulp/task-end.js +10 -10
- package/lib/gulp/task-start.js +12 -12
- package/lib/gulp/task-watch.js +66 -66
- package/lib/init/copy-folder.js +50 -50
- package/lib/init/folder-exists.js +10 -10
- package/lib/init/get-folder-list.js +16 -16
- package/lib/init/merge-package.js +17 -17
- package/lib/init/read-package.js +17 -17
- package/lib/log-error.js +15 -15
- package/lib/merge.js +27 -27
- package/lib/run-preprocess.js +32 -32
- package/lib/task-order.js +19 -19
- package/package.json +68 -68
- package/plugins/example/preprocess-config.js +17 -17
- package/plugins/example/task.js +55 -55
- package/plugins/example.js +38 -38
- package/plugins/sass-engine/preprocess-config.js +59 -59
- package/plugins/sass.js +41 -41
- package/plugins/twig/lodash-filters/filters.js +91 -91
- package/plugins/twig/lodash-filters.js +14 -14
- package/plugins/twig/symfony-filters/filters.js +102 -102
- package/plugins/twig/symfony-filters/preposition_nbsp.js +77 -77
- package/plugins/twig/symfony-filters.js +14 -14
- package/plugins/twig/symfony-functions/functions.js +31 -31
- package/plugins/twig/symfony-functions.js +14 -14
- package/plugins/twig-engine/preprocess-config.js +53 -53
- package/plugins/twig.js +74 -74
- package/tasks/browser-sync/config.js +39 -39
- package/tasks/browser-sync/preprocess-config.js +32 -32
- package/tasks/browser-sync/task.js +9 -9
- package/tasks/clean/config.js +20 -20
- package/tasks/clean/preprocess-config.js +19 -19
- package/tasks/clean/task.js +7 -7
- package/tasks/data/config.js +34 -34
- package/tasks/data/data-loader-js.js +14 -14
- package/tasks/data/data-loader-json.js +5 -5
- package/tasks/data/get-data.js +96 -96
- package/tasks/env/config.js +26 -23
- package/tasks/env/get-env.js +113 -81
- package/tasks/fonts/config.js +24 -24
- package/tasks/fonts/task.js +47 -47
- package/tasks/global/config.js +7 -7
- package/tasks/html/config.js +42 -42
- package/tasks/html/task.js +91 -91
- package/tasks/icons/config.js +47 -47
- package/tasks/icons/preprocess-config.js +60 -60
- package/tasks/icons/task.js +56 -56
- package/tasks/images/config.js +27 -27
- package/tasks/images/task.js +46 -46
- package/tasks/javascripts/config.js +69 -69
- package/tasks/javascripts/preprocess-config.js +109 -109
- package/tasks/javascripts/task.js +86 -86
- package/tasks/sitemap/config.js +48 -48
- package/tasks/sitemap/preprocess-config.js +18 -18
- package/tasks/sitemap/task.js +69 -69
- package/tasks/sizereport/config.js +23 -23
- package/tasks/sizereport/task.js +16 -16
- package/tasks/static/config.js +27 -27
- package/tasks/static/task.js +46 -46
- package/tasks/stylesheets/config.js +85 -85
- package/tasks/stylesheets/preprocess-config.js +41 -41
- package/tasks/stylesheets/task.js +73 -73
- package/tests/build/build.test.js +153 -153
- package/tests/camelize-file-name.test.js +11 -11
- package/tests/generate-gulp-tasks.test.js +78 -78
- package/tests/glob-helper.test.js +99 -99
- package/tests/merge.test.js +10 -10
- package/tests/preposition_nbsp.test.js +50 -50
- package/tests/run-preprocess.test.js +90 -90
- package/tests/sass-stringify.test.js +24 -24
- package/tests/sitemap.test.js +12 -12
- package/vendor/gulp-rolldown/index.js +151 -151
- package/vendor/gulp-rolldown/plugin-raw.js +17 -17
- package/vendor/gulp-rolldown/plugin-virtual-entry.js +30 -30
- package/vendor/gulp-sass/CHANGELOG.md +168 -168
- package/vendor/gulp-sass/LICENSE +20 -20
- package/vendor/gulp-sass/README.md +187 -187
- package/vendor/gulp-sass/index.js +208 -208
- package/vendor/gulp-sass/package.json +61 -61
- package/vendor/gulp-sass/sass-stringify.js +32 -32
- package/vendor/gulp-twig/LICENSE +20 -20
- package/vendor/gulp-twig/README.md +167 -167
- package/vendor/gulp-twig/index.js +138 -138
- package/vendor/gulp-twig/package.json +44 -44
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Build a project for testing
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as sassPlugin from '../../../plugins/sass.js';
|
|
6
|
-
import * as twigPlugin from '../../../plugins/twig.js';
|
|
7
|
-
import * as symfonyFiltersPlugin from '../../../plugins/twig/symfony-filters.js';
|
|
8
|
-
|
|
9
|
-
export const clean = {};
|
|
10
|
-
export const staticFiles = {};
|
|
11
|
-
export const html = {};
|
|
12
|
-
export const data = {};
|
|
13
|
-
export const fonts = {};
|
|
14
|
-
export const icons = {};
|
|
15
|
-
export const images = {};
|
|
16
|
-
export const javascripts = {
|
|
17
|
-
entryList: [
|
|
18
|
-
{
|
|
19
|
-
name: '_entries.js',
|
|
20
|
-
shared: 'shared',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: '_entries-alt.js',
|
|
24
|
-
shared: 'shared',
|
|
25
|
-
outpuSubFolder: 'alt'
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
export const stylesheets = {};
|
|
30
|
-
export const sizereport = false;
|
|
31
|
-
|
|
32
|
-
export const plugins = [
|
|
33
|
-
// Enables SASS engine and .sass and .scss file compilation
|
|
34
|
-
sassPlugin,
|
|
35
|
-
|
|
36
|
-
// Enables TwigJS engine .twig file compilation
|
|
37
|
-
twigPlugin,
|
|
38
|
-
|
|
39
|
-
// Enables TWIG Symfony filters
|
|
40
|
-
symfonyFiltersPlugin,
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
export const env = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Build a project for testing
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as sassPlugin from '../../../plugins/sass.js';
|
|
6
|
+
import * as twigPlugin from '../../../plugins/twig.js';
|
|
7
|
+
import * as symfonyFiltersPlugin from '../../../plugins/twig/symfony-filters.js';
|
|
8
|
+
|
|
9
|
+
export const clean = {};
|
|
10
|
+
export const staticFiles = {};
|
|
11
|
+
export const html = {};
|
|
12
|
+
export const data = {};
|
|
13
|
+
export const fonts = {};
|
|
14
|
+
export const icons = {};
|
|
15
|
+
export const images = {};
|
|
16
|
+
export const javascripts = {
|
|
17
|
+
entryList: [
|
|
18
|
+
{
|
|
19
|
+
name: '_entries.js',
|
|
20
|
+
shared: 'shared',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: '_entries-alt.js',
|
|
24
|
+
shared: 'shared',
|
|
25
|
+
outpuSubFolder: 'alt'
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
export const stylesheets = {};
|
|
30
|
+
export const sizereport = false;
|
|
31
|
+
|
|
32
|
+
export const plugins = [
|
|
33
|
+
// Enables SASS engine and .sass and .scss file compilation
|
|
34
|
+
sassPlugin,
|
|
35
|
+
|
|
36
|
+
// Enables TwigJS engine .twig file compilation
|
|
37
|
+
twigPlugin,
|
|
38
|
+
|
|
39
|
+
// Enables TWIG Symfony filters
|
|
40
|
+
symfonyFiltersPlugin,
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
export const env = {
|
|
44
|
+
// Write ASSET_VERSION to .env file to enable cache busting
|
|
45
|
+
// writeAssetVersion: './init/test/.env.local',
|
|
46
|
+
|
|
47
|
+
// How env variable names should be remapped
|
|
48
|
+
map: {
|
|
49
|
+
'HOST': 'host',
|
|
50
|
+
'FOO': 'foo',
|
|
51
|
+
'BAR': 'bar',
|
|
52
|
+
'TYPE_BOOL_TRUE': 'typeBoolTrue',
|
|
53
|
+
'TYPE_BOOL_FALSE': 'typeBoolFalse',
|
|
54
|
+
'TYPE_NUMBER': 'typeNumber',
|
|
55
|
+
'TYPE_EMPTY': 'typeEmpty',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* Path configuration
|
|
61
|
+
* All options will be merged with defaults, but not replaces whole configuration object
|
|
62
|
+
*
|
|
63
|
+
* Default configuration can be seen here https://github.com/videinfra/static-website-builder/tree/master/tasks
|
|
64
|
+
* in each tasks config.js file
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
export const paths = {
|
|
68
|
+
src: './init/test/src',
|
|
69
|
+
dest: './tests/build/public',
|
|
70
|
+
env: ['./init/test/.env', './init/test/.env.local'],
|
|
71
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{% from 'macros/icon.twig' import icon %}
|
|
2
|
-
{% extends 'layouts/base.twig' %}
|
|
3
|
-
|
|
4
|
-
{% block head %}
|
|
5
|
-
<head>
|
|
6
|
-
<meta name="robots" content="noindex" />
|
|
7
|
-
</head>
|
|
8
|
-
{% endblock %}
|
|
9
|
-
|
|
10
|
-
{% block body %}
|
|
11
|
-
<h1>{{ hello }} {{ world }}!</h1>
|
|
12
|
-
{% endblock %}
|
|
1
|
+
{% from 'macros/icon.twig' import icon %}
|
|
2
|
+
{% extends 'layouts/base.twig' %}
|
|
3
|
+
|
|
4
|
+
{% block head %}
|
|
5
|
+
<head>
|
|
6
|
+
<meta name="robots" content="noindex" />
|
|
7
|
+
</head>
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block body %}
|
|
11
|
+
<h1>{{ hello }} {{ world }}!</h1>
|
|
12
|
+
{% endblock %}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content exported from this file is avaiable in the templates as variables
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* <div>{{ name }}</div>
|
|
6
|
-
*/
|
|
7
|
-
export default {
|
|
8
|
-
'world': 'World',
|
|
9
|
-
'hostFromGlobalJS': process.env.host,
|
|
10
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Content exported from this file is avaiable in the templates as variables
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <div>{{ name }}</div>
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
'world': 'World',
|
|
9
|
+
'hostFromGlobalJS': process.env.host,
|
|
10
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{% from 'macros/icon.twig' import icon %}
|
|
2
|
-
{% extends 'layouts/base.twig' %}
|
|
3
|
-
|
|
4
|
-
{% block body %}
|
|
5
|
-
<p>HOST: {{ host }}</p>
|
|
6
|
-
<p>HOST FROM GLOBAL JS: {{ hostFromGlobalJS }}</p>
|
|
7
|
-
|
|
8
|
-
{% if typeBoolTrue %}
|
|
9
|
-
<p>TYPE_BOOL_TRUE: pass</p>
|
|
10
|
-
{% else %}
|
|
11
|
-
<p>TYPE_BOOL_TRUE: fail</p>
|
|
12
|
-
{% endif %}
|
|
13
|
-
|
|
14
|
-
{% if typeBoolFalse %}
|
|
15
|
-
<p>TYPE_BOOL_FALSE: fail</p>
|
|
16
|
-
{% else %}
|
|
17
|
-
<p>TYPE_BOOL_FALSE: pass</p>
|
|
18
|
-
{% endif %}
|
|
19
|
-
|
|
20
|
-
<p>TYPE_NUMBER: {{ typeNumber }}</p>
|
|
21
|
-
{% endblock %}
|
|
1
|
+
{% from 'macros/icon.twig' import icon %}
|
|
2
|
+
{% extends 'layouts/base.twig' %}
|
|
3
|
+
|
|
4
|
+
{% block body %}
|
|
5
|
+
<p>HOST: {{ host }}</p>
|
|
6
|
+
<p>HOST FROM GLOBAL JS: {{ hostFromGlobalJS }}</p>
|
|
7
|
+
|
|
8
|
+
{% if typeBoolTrue %}
|
|
9
|
+
<p>TYPE_BOOL_TRUE: pass</p>
|
|
10
|
+
{% else %}
|
|
11
|
+
<p>TYPE_BOOL_TRUE: fail</p>
|
|
12
|
+
{% endif %}
|
|
13
|
+
|
|
14
|
+
{% if typeBoolFalse %}
|
|
15
|
+
<p>TYPE_BOOL_FALSE: fail</p>
|
|
16
|
+
{% else %}
|
|
17
|
+
<p>TYPE_BOOL_FALSE: pass</p>
|
|
18
|
+
{% endif %}
|
|
19
|
+
|
|
20
|
+
<p>TYPE_NUMBER: {{ typeNumber }}</p>
|
|
21
|
+
{% endblock %}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<html>{% block head %}{% endblock %}<body>{% block body %}{% endblock %}</body></html>
|
|
1
|
+
<html>{% block head %}{% endblock %}<body>{% block body %}{% endblock %}</body></html>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{% extends 'layouts/base.twig' %}
|
|
2
|
-
|
|
3
|
-
{% block head %}
|
|
4
|
-
<link rel="stylesheet" href="/assets/stylesheets/nested-calc-test.css">
|
|
5
|
-
{% endblock %}
|
|
6
|
-
{% block body %}
|
|
7
|
-
Another file
|
|
8
|
-
<script type="module" src="/assets/javascripts/other.js"></script>
|
|
9
|
-
{% endblock %}
|
|
1
|
+
{% extends 'layouts/base.twig' %}
|
|
2
|
+
|
|
3
|
+
{% block head %}
|
|
4
|
+
<link rel="stylesheet" href="/assets/stylesheets/nested-calc-test.css">
|
|
5
|
+
{% endblock %}
|
|
6
|
+
{% block body %}
|
|
7
|
+
Another file
|
|
8
|
+
<script type="module" src="/assets/javascripts/other.js"></script>
|
|
9
|
+
{% endblock %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
{% extends 'layouts/base.twig' %}
|
|
3
|
-
|
|
4
|
-
{% block body %}{{ 'hello at world' | preposition_nbsp }}{% endblock %}
|
|
1
|
+
|
|
2
|
+
{% extends 'layouts/base.twig' %}
|
|
3
|
+
|
|
4
|
+
{% block body %}{{ 'hello at world' | preposition_nbsp }}{% endblock %}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* All files listed in here are created / compiled and additionally
|
|
3
|
-
* shared.js is automatically created, which contains all common JS (chunks / modules imported from more than 1 entry files).
|
|
4
|
-
*/
|
|
5
|
-
export default {
|
|
6
|
-
'main': [
|
|
7
|
-
'common.js',
|
|
8
|
-
'main.js',
|
|
9
|
-
]
|
|
10
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* All files listed in here are created / compiled and additionally
|
|
3
|
+
* shared.js is automatically created, which contains all common JS (chunks / modules imported from more than 1 entry files).
|
|
4
|
+
*/
|
|
5
|
+
export default {
|
|
6
|
+
'main': [
|
|
7
|
+
'common.js',
|
|
8
|
+
'main.js',
|
|
9
|
+
]
|
|
10
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* All files listed in here are created / compiled and additionally
|
|
3
|
-
* shared.js is automatically created, which contains all common JS (chunks / modules imported from more than 1 entry files).
|
|
4
|
-
*/
|
|
5
|
-
export default {
|
|
6
|
-
'main': [
|
|
7
|
-
'common.js',
|
|
8
|
-
'main.js',
|
|
9
|
-
],
|
|
10
|
-
'other': [
|
|
11
|
-
'common.js',
|
|
12
|
-
'other.js',
|
|
13
|
-
],
|
|
14
|
-
'something': [
|
|
15
|
-
'common.js',
|
|
16
|
-
'something.ts',
|
|
17
|
-
],
|
|
18
|
-
};
|
|
19
|
-
|
|
1
|
+
/*
|
|
2
|
+
* All files listed in here are created / compiled and additionally
|
|
3
|
+
* shared.js is automatically created, which contains all common JS (chunks / modules imported from more than 1 entry files).
|
|
4
|
+
*/
|
|
5
|
+
export default {
|
|
6
|
+
'main': [
|
|
7
|
+
'common.js',
|
|
8
|
+
'main.js',
|
|
9
|
+
],
|
|
10
|
+
'other': [
|
|
11
|
+
'common.js',
|
|
12
|
+
'other.js',
|
|
13
|
+
],
|
|
14
|
+
'something': [
|
|
15
|
+
'common.js',
|
|
16
|
+
'something.ts',
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared file entry point
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
console.log('Shared file loaded');
|
|
6
|
-
|
|
7
|
-
const config = {
|
|
8
|
-
a: {
|
|
9
|
-
b: 'c',
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
console.log(config?.a?.b);
|
|
1
|
+
/**
|
|
2
|
+
* Shared file entry point
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
console.log('Shared file loaded');
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
a: {
|
|
9
|
+
b: 'c',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
console.log(config?.a?.b);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* global process */
|
|
2
|
-
console.log('Hello from main page!');
|
|
3
|
-
console.log('env.host ==', process.env.host);
|
|
4
|
-
console.log('env.foo ==', process.env.foo);
|
|
5
|
-
console.log('env.bar ==', process.env.bar);
|
|
6
|
-
console.log('env.typeBoolTrue ==', process.env.typeBoolTrue);
|
|
7
|
-
console.log('env.typeBoolFalse ==', process.env.typeBoolFalse);
|
|
8
|
-
console.log('env.typeNumber ==', process.env.typeNumber);
|
|
1
|
+
/* global process */
|
|
2
|
+
console.log('Hello from main page!');
|
|
3
|
+
console.log('env.host ==', process.env.host);
|
|
4
|
+
console.log('env.foo ==', process.env.foo);
|
|
5
|
+
console.log('env.bar ==', process.env.bar);
|
|
6
|
+
console.log('env.typeBoolTrue ==', process.env.typeBoolTrue);
|
|
7
|
+
console.log('env.typeBoolFalse ==', process.env.typeBoolFalse);
|
|
8
|
+
console.log('env.typeNumber ==', process.env.typeNumber);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type Something = {
|
|
2
|
-
name: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
const something: Something = {
|
|
6
|
-
name: 'something',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
console.log(something);
|
|
1
|
+
type Something = {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
const something: Something = {
|
|
6
|
+
name: 'something',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
console.log(something);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
main {
|
|
2
|
-
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
|
|
3
|
-
}
|
|
1
|
+
main {
|
|
2
|
+
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
|
|
3
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.env-test:before {
|
|
2
|
-
content: map-get($env, host);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:root {
|
|
6
|
-
#{ --env-test-type-number }: map-get($env, typeNumber);
|
|
7
|
-
#{ --env-test-type-empty }: map-get($env, typeEmpty);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@if map-get($env, typeBoolTrue) {
|
|
11
|
-
:root {
|
|
12
|
-
--env-test-bool-true: true;
|
|
13
|
-
}
|
|
14
|
-
} @else {
|
|
15
|
-
:root {
|
|
16
|
-
--env-test-bool-true: false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@if map-get($env, typeBoolFalse) {
|
|
21
|
-
:root {
|
|
22
|
-
--env-test-bool-false: true;
|
|
23
|
-
}
|
|
24
|
-
} @else {
|
|
25
|
-
:root {
|
|
26
|
-
--env-test-bool-false: false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
.env-test:before {
|
|
2
|
+
content: map-get($env, host);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
#{ --env-test-type-number }: map-get($env, typeNumber);
|
|
7
|
+
#{ --env-test-type-empty }: map-get($env, typeEmpty);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@if map-get($env, typeBoolTrue) {
|
|
11
|
+
:root {
|
|
12
|
+
--env-test-bool-true: true;
|
|
13
|
+
}
|
|
14
|
+
} @else {
|
|
15
|
+
:root {
|
|
16
|
+
--env-test-bool-true: false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@if map-get($env, typeBoolFalse) {
|
|
21
|
+
:root {
|
|
22
|
+
--env-test-bool-false: true;
|
|
23
|
+
}
|
|
24
|
+
} @else {
|
|
25
|
+
:root {
|
|
26
|
+
--env-test-bool-false: false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--yes: ;
|
|
3
|
-
--no: initial;
|
|
4
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--yes: ;
|
|
3
|
+
--no: initial;
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
body {
|
|
2
|
-
padding-top: calc(10vw + calc(10vh * 1.5));
|
|
3
|
-
}
|
|
1
|
+
body {
|
|
2
|
+
padding-top: calc(10vw + calc(10vh * 1.5));
|
|
3
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import "settings/colors";
|
|
2
|
-
@import "components/button";
|
|
1
|
+
@import "settings/colors";
|
|
2
|
+
@import "components/button";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Camelize filename
|
|
3
|
-
*
|
|
4
|
-
* @param {string} str File name
|
|
5
|
-
* @returns {string} Camelized name
|
|
6
|
-
*/
|
|
7
|
-
export default function camelizeFileName (str) {
|
|
8
|
-
return str
|
|
9
|
-
// Remove extension
|
|
10
|
-
.replace(/(.+?)\..*$/ig, '$1')
|
|
11
|
-
// Remove dot
|
|
12
|
-
.replace(/\./g, '')
|
|
13
|
-
// Replace non alpha-numeric characters
|
|
14
|
-
.replace(/[^a-z0-9]/ig, ' ')
|
|
15
|
-
// Uppercase words
|
|
16
|
-
.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
17
|
-
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
18
|
-
})
|
|
19
|
-
// Remove empty spaces
|
|
20
|
-
.replace(/\s+/g, '');
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Camelize filename
|
|
3
|
+
*
|
|
4
|
+
* @param {string} str File name
|
|
5
|
+
* @returns {string} Camelized name
|
|
6
|
+
*/
|
|
7
|
+
export default function camelizeFileName (str) {
|
|
8
|
+
return str
|
|
9
|
+
// Remove extension
|
|
10
|
+
.replace(/(.+?)\..*$/ig, '$1')
|
|
11
|
+
// Remove dot
|
|
12
|
+
.replace(/\./g, '')
|
|
13
|
+
// Replace non alpha-numeric characters
|
|
14
|
+
.replace(/[^a-z0-9]/ig, ' ')
|
|
15
|
+
// Uppercase words
|
|
16
|
+
.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
|
|
17
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
18
|
+
})
|
|
19
|
+
// Remove empty spaces
|
|
20
|
+
.replace(/\s+/g, '');
|
|
21
|
+
}
|