create-tateru-cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -0
  3. package/lib/cli/cli.js +85 -0
  4. package/lib/index.js +103 -0
  5. package/package.json +46 -0
  6. package/templates/template-gulp-vanilla/.babelrc +12 -0
  7. package/templates/template-gulp-vanilla/.editorconfig +23 -0
  8. package/templates/template-gulp-vanilla/.eslintignore +2 -0
  9. package/templates/template-gulp-vanilla/.eslintrc.js +19 -0
  10. package/templates/template-gulp-vanilla/.gitattributes +12 -0
  11. package/templates/template-gulp-vanilla/.gitlab-ci.yml +43 -0
  12. package/templates/template-gulp-vanilla/LICENSE +21 -0
  13. package/templates/template-gulp-vanilla/README.md +1 -0
  14. package/templates/template-gulp-vanilla/gulpfile.js +74 -0
  15. package/templates/template-gulp-vanilla/package-lock.json +8706 -0
  16. package/templates/template-gulp-vanilla/package.json +49 -0
  17. package/templates/template-gulp-vanilla/postcss.config.js +5 -0
  18. package/templates/template-gulp-vanilla/public/assets/favicon/android-chrome-192x192.png +0 -0
  19. package/templates/template-gulp-vanilla/public/assets/favicon/android-chrome-512x512.png +0 -0
  20. package/templates/template-gulp-vanilla/public/assets/favicon/apple-touch-icon.png +0 -0
  21. package/templates/template-gulp-vanilla/public/assets/favicon/favicon-16x16.png +0 -0
  22. package/templates/template-gulp-vanilla/public/assets/favicon/favicon-32x32.png +0 -0
  23. package/templates/template-gulp-vanilla/public/assets/favicon/favicon.ico +0 -0
  24. package/templates/template-gulp-vanilla/src/assets/images/content/.gitkeep +0 -0
  25. package/templates/template-gulp-vanilla/src/assets/images/share/homepage.png +0 -0
  26. package/templates/template-gulp-vanilla/src/assets/images/theme/.gitkeep +0 -0
  27. package/templates/template-gulp-vanilla/src/assets/js/homepage.js +1 -0
  28. package/templates/template-gulp-vanilla/src/assets/js/services/analyticsServices.js +18 -0
  29. package/templates/template-gulp-vanilla/src/assets/js/utils/asyncForLoop.js +21 -0
  30. package/templates/template-gulp-vanilla/src/assets/js/utils/sleep.js +7 -0
  31. package/templates/template-gulp-vanilla/src/assets/scss/main.scss +6 -0
  32. package/templates/template-gulp-vanilla/src/assets/scss/src/_core.scss +63 -0
  33. package/templates/template-gulp-vanilla/src/assets/scss/src/_functions.scss +21 -0
  34. package/templates/template-gulp-vanilla/src/assets/scss/src/_mixins.scss +1 -0
  35. package/templates/template-gulp-vanilla/src/assets/scss/src/_variables.scss +13 -0
  36. package/templates/template-gulp-vanilla/src/assets/svg/heart-solid.svg +3 -0
  37. package/templates/template-gulp-vanilla/src/assets/svg/source.svg +3 -0
  38. package/templates/template-gulp-vanilla/src/translations/cs.json +8 -0
  39. package/templates/template-gulp-vanilla/src/twig/layouts/layout.html.twig +150 -0
  40. package/templates/template-gulp-vanilla/src/twig/views/_error-404.html.twig +16 -0
  41. package/templates/template-gulp-vanilla/src/twig/views/homepage.html.twig +21 -0
  42. package/templates/template-gulp-vanilla/src/twig/views/humans.txt.twig +21 -0
  43. package/templates/template-gulp-vanilla/src/twig/views/robots.txt.twig +4 -0
  44. package/templates/template-gulp-vanilla/src/twig/views/site.webmanifest.twig +23 -0
  45. package/templates/template-gulp-vanilla/src/twig/views/sitemap.html.twig +22 -0
  46. package/templates/template-gulp-vanilla/tasks/browser-sync.js +3 -0
  47. package/templates/template-gulp-vanilla/tasks/clean.js +10 -0
  48. package/templates/template-gulp-vanilla/tasks/css.js +20 -0
  49. package/templates/template-gulp-vanilla/tasks/helpers/config.js +5 -0
  50. package/templates/template-gulp-vanilla/tasks/helpers/logger.js +79 -0
  51. package/templates/template-gulp-vanilla/tasks/images.js +12 -0
  52. package/templates/template-gulp-vanilla/tasks/minify-css.js +21 -0
  53. package/templates/template-gulp-vanilla/tasks/public-assets.js +11 -0
  54. package/templates/template-gulp-vanilla/tasks/tateru.js +25 -0
  55. package/templates/template-gulp-vanilla/tasks/watch.js +45 -0
  56. package/templates/template-gulp-vanilla/tasks/webpack.js +93 -0
  57. package/templates/template-gulp-vanilla/tateru.config.json +111 -0
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "tateru-cli-gulp-vanilla",
3
+ "version": "0.0.0",
4
+ "description": "Tateru CLI Website Starter",
5
+ "scripts": {
6
+ "lint": "eslint . --ext .js --fix",
7
+ "tateru": "tateru-cli tateru.config.json",
8
+ "build": "gulp build",
9
+ "build:prod": "gulp prod",
10
+ "watch": "gulp",
11
+ "clean:dist": "gulp clean"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+ssh://git@github.com:danielsitek/tateru-starter.git"
16
+ },
17
+ "author": "Daniel Sitek <dan.sitek@gmail.com>",
18
+ "license": "MIT",
19
+ "bugs": {
20
+ "url": "https://github.com/danielsitek/tateru-starter/issues"
21
+ },
22
+ "homepage": "https://github.com/danielsitek/tateru-starter#readme",
23
+ "devDependencies": {
24
+ "@babel/core": "^7.17.2",
25
+ "@babel/preset-env": "^7.16.11",
26
+ "autoprefixer": "^10.4.2",
27
+ "babel-loader": "^8.2.3",
28
+ "browser-sync": "^2.27.10",
29
+ "cssnano": "^5.0.17",
30
+ "del": "^6.0.0",
31
+ "eslint": "^8.9.0",
32
+ "eslint-plugin-prettier": "^4.0.0",
33
+ "eslint-plugin-vue": "^8.4.1",
34
+ "fancy-log": "^2.0.0",
35
+ "gulp": "^4.0.2",
36
+ "gulp-postcss": "^9.0.1",
37
+ "gulp-rename": "^2.0.0",
38
+ "gulp-sass": "^5.1.0",
39
+ "postcss": "^8.4.6",
40
+ "sass": "^1.49.7",
41
+ "tateru-cli": "^1.5.0",
42
+ "webpack": "^5.68.0"
43
+ },
44
+ "dependencies": {},
45
+ "private": true,
46
+ "engines": {
47
+ "node": ">=14"
48
+ }
49
+ }
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ plugins: {
3
+ autoprefixer: {}
4
+ }
5
+ };
@@ -0,0 +1 @@
1
+ console.log('Hello there!');
@@ -0,0 +1,18 @@
1
+
2
+ const analyticsEvent = (event, eventContent = undefined) => {
3
+ if (!gtag) {
4
+ return;
5
+ }
6
+
7
+ gtag('event', event, eventContent);
8
+ }
9
+
10
+ export class AnalyticsServices {
11
+ static customEvent() {
12
+ analyticsEvent('custom_event_name', {
13
+ 'event_category': 'custom_event_category',
14
+ 'event_label': `Custom Event Label`,
15
+ 'value': 1,
16
+ });
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Create truly async loop over the collection of items.
3
+ * @param {array} collection Array of items.
4
+ * @param {function} cb Callback function.
5
+ */
6
+
7
+ export const asyncForLoop = async (collection, cb) => {
8
+ const _this = this;
9
+ for (let item of collection) {
10
+ await new Promise((resolve, reject) => {
11
+ setTimeout(() => {
12
+ try {
13
+ cb.call(_this, item);
14
+ resolve();
15
+ } catch (e) {
16
+ reject(e);
17
+ }
18
+ }, 0);
19
+ });
20
+ }
21
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Simple promise wait.
3
+ *
4
+ * @param time [number]
5
+ */
6
+
7
+ export const sleep = (time) => new Promise(resolve => setTimeout(resolve, time));
@@ -0,0 +1,6 @@
1
+ @charset "UTF-8";
2
+
3
+ @import "src/variables";
4
+ @import "src/functions";
5
+ @import "src/mixins";
6
+ @import "src/core";
@@ -0,0 +1,63 @@
1
+ // Core Styles
2
+ @use "sass:math";
3
+
4
+ html {
5
+ font-size: ($base-font-size * 1px);
6
+ line-height: math.div(28, $base-font-size);
7
+ font-family: "Georgia", serif;
8
+ font-weight: 400;
9
+ padding: 0;
10
+ margin: 0;
11
+ box-sizing: border-box;
12
+ color: #808080;
13
+ text-size-adjust: 100%;
14
+ scroll-behavior: smooth;
15
+
16
+ *,
17
+ *:before,
18
+ *:after {
19
+ box-sizing: inherit;
20
+ }
21
+ }
22
+
23
+ body {
24
+ padding: 0;
25
+ margin: 0;
26
+ }
27
+
28
+ a {
29
+ color: $color-primary;
30
+ }
31
+
32
+ strong {
33
+ font-weight: 700;
34
+ }
35
+
36
+ svg {
37
+ display: block;
38
+ }
39
+
40
+ h1, h2, h3, h4 {
41
+ font-family: "Montserrat";
42
+ font-weight: 700;
43
+ color: #cfa33a;
44
+ text-transform: uppercase;
45
+ line-height: 1.1;
46
+ margin: 0;
47
+ margin-bottom: rem-calc($base-font-size);
48
+ }
49
+
50
+ h1 {
51
+ font-size: rem-calc(70);
52
+ }
53
+
54
+ h2 {
55
+ font-size: rem-calc(36);
56
+ }
57
+
58
+ h3 {
59
+ font-size: rem-calc(24);
60
+ font-weight: 500;
61
+ color: #324742;
62
+ margin: 0;
63
+ }
@@ -0,0 +1,21 @@
1
+ // Functions
2
+ @use "sass:math";
3
+
4
+ @function rem-calc($num, $base: $base-font-size) {
5
+ @return math.div($num, $base) * 1rem;
6
+ }
7
+
8
+ @function row-height($num, $base: $base-font-size, $base-row: $base-line-height) {
9
+ @if type-of($num) == "string" {
10
+ @error "Parameter $num must be a number.";
11
+ }
12
+
13
+ @if $num == 0 {
14
+ @return $num;
15
+ }
16
+
17
+ $row-height: rem-calc($base-row, $base);
18
+ $result: $num * $row-height;
19
+
20
+ @return $result;
21
+ }
@@ -0,0 +1,13 @@
1
+ // Variables
2
+
3
+ $base-font-size: 20;
4
+
5
+ $base-line-height: 24;
6
+
7
+ // Colors
8
+ $color-white: #fff;
9
+
10
+ $color-primary: #cfa33a;
11
+
12
+ $color-facebook: #3c5a99;
13
+ $color-instagram: #cb397b;
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-icon="heart" data-prefix="fas" viewBox="0 0 512 512">
2
+ <path fill="currentColor" d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <path fill="currentColor" d="M20.59 12l-3.3-3.3a1 1 0 111.42-1.4l4 4a1 1 0 010 1.4l-4 4a1 1 0 01-1.42-1.4l3.3-3.3zM3.4 12l3.3 3.3a1 1 0 01-1.42 1.4l-4-4a1 1 0 010-1.4l4-4A1 1 0 016.7 8.7L3.4 12zm7.56 8.24a1 1 0 01-1.94-.48l4-16a1 1 0 111.94.48l-4 16z" />
3
+ </svg>
@@ -0,0 +1,8 @@
1
+ {
2
+ "index": {
3
+ "header": "Tateru CLI Starter Kit"
4
+ },
5
+ "homepage": {
6
+ "title": "Tateru CLI Starter Kit"
7
+ }
8
+ }
@@ -0,0 +1,150 @@
1
+ {%- set versionID = "now"|date("mdYHms") -%}
2
+ {%- set version_suffix = '?v=' ~ versionID -%}
3
+
4
+ {%- set isHomepage = false -%}
5
+ {%- if page == 'index' -%}
6
+ {%- set isHomepage = true -%}
7
+ {%- endif -%}
8
+
9
+ {%- set domainHref = '' -%}
10
+ {%- if not isHomepage -%}
11
+ {%- set domainHref = href[page][1:] -%}
12
+ {%- endif -%}
13
+
14
+ <!DOCTYPE html>
15
+ <html class="no-js" lang="{{- lang -}}" itemscope itemtype="http://schema.org/WebPage">
16
+ <head>
17
+ <meta charset="utf-8">
18
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
19
+ <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, minimum-scale=1.0">
20
+ <title>{{- title -}}</title>
21
+ <meta name="description" content="{{- description -}}">
22
+ {%- if keywords is not empty -%}
23
+ <meta name="keywords" content="{{- keywords|join(', ') -}}">
24
+ {%- endif -%}
25
+ <meta name="apple-mobile-web-app-capable" content="yes">
26
+ <meta name="apple-mobile-web-app-status-bar-style" content="default">
27
+ <meta name="robots" content="index,follow">
28
+ <meta name="author" content="{{- owner -}}">
29
+ <link type="text/plain" rel="author" href="{{- domain -}}humans.txt" />
30
+ <meta name="creator" content="Daniel Sitek, me/at/danielsitek/dot/cz">
31
+ <link rel="canonical" href="{{- domain ~ domainHref -}}" />
32
+
33
+ {###############################################}
34
+ {# Open Graph data #}
35
+ {%- if type is not empty -%}
36
+ <meta property="og:type" content="{{- type -}}" />
37
+ {%- endif -%}
38
+ {%- if title is not empty -%}
39
+ <meta property="og:title" content="{{- title -}}" />
40
+ {%- endif -%}
41
+ {%- if domain is defined and not empty -%}
42
+ <meta property="og:url" content="{{- domain ~ domainHref -}}" />
43
+ {%- endif -%}
44
+ <meta property="og:locale" content="{{- langCode -}}" />
45
+ {%- if description is not empty -%}
46
+ <meta property="og:description" content="{{- description -}}" />
47
+ {%- endif -%}
48
+ {%- if images is not empty -%}
49
+ {%- for image in images -%}
50
+ <meta property="og:image" content="{{- domain ~ image -}}" />
51
+ <meta property="og:image:type" content="image/jpeg" />
52
+ <meta property="og:image:width" content="1200" />
53
+ <meta property="og:image:height" content="630" />
54
+ {%- endfor -%}
55
+ {%- endif -%}
56
+ {%- if sitename is not empty -%}
57
+ <meta property="og:site_name" content="{{- sitename -}}" />
58
+ {%- endif -%}
59
+ {%- if facebook.appID is not empty -%}
60
+ <meta property="fb:app_id" content="{{- facebook.appID -}}" />
61
+ {%- endif -%}
62
+ {%- if facebook.admins is not empty -%}
63
+ <meta property="fb:admins" content="{{- facebook.admins -}}" />
64
+ {%- endif -%}
65
+
66
+ {###############################################}
67
+ {# Twitter Card data #}
68
+ {%- if twitter.card is not empty -%}
69
+ <meta name="twitter:card" content="{{- twitter.card -}}">
70
+ {%- endif -%}
71
+ {%- if domain is defined and not empty -%}
72
+ <meta name="twitter:domain" content="{{- domain -}}">
73
+ {%- endif -%}
74
+ {%- if twitter.site is not empty -%}
75
+ <meta name="twitter:site" content="{{- twitter.site -}}">
76
+ {%- endif -%}
77
+ {%- if twitter.siteID is not empty -%}
78
+ <meta name="twitter:site:id" content="{{- twitter.siteID -}}">
79
+ {%- endif -%}
80
+ {%- if title is not empty -%}
81
+ <meta name="twitter:title" content="{{- title -}}">
82
+ {%- endif -%}
83
+ {%- if description is not empty -%}
84
+ <meta name="twitter:description" content="{{- description -}}">
85
+ {%- endif -%}
86
+ {%- if twitter.creator is not empty -%}
87
+ <meta name="twitter:creator" content="{{- twitter.creator -}}">
88
+ {%- endif -%}
89
+ {%- if twitter.creatorID is not empty -%}
90
+ <meta name="twitter:creator:id" content="{{- twitter.creatorID -}}">
91
+ {%- endif -%}
92
+ {%- if twitter.image is not empty -%}
93
+ <meta name="twitter:image:src" content="{{- domain ~ twitter.image -}}">
94
+ <meta name="twitter:image:width" content="1240">
95
+ <meta name="twitter:image:height" content="700">
96
+ {%- elseif images is not empty -%}
97
+ <meta name="twitter:image:src" content="{{- domain ~ images[0] -}}">
98
+ <meta name="twitter:image:width" content="1240">
99
+ <meta name="twitter:image:height" content="700">
100
+ {%- endif -%}
101
+
102
+ {###############################################}
103
+ {# Google Authorship and Publisher Markup #}
104
+ {%- if google.author is not empty -%}
105
+ <link rel="author" href="{{- google.author -}}"/>
106
+ {%- endif -%}
107
+ {%- if google.publisher is not empty -%}
108
+ <link rel="publisher" href="{{- google.publisher -}}"/>
109
+ {%- endif -%}
110
+
111
+ {###############################################}
112
+ {# Schema.org markup for Google+ #}
113
+ {%- if title is not empty -%}
114
+ <meta itemprop="name" content="{{- title -}}">
115
+ {%- endif -%}
116
+ {%- if description is not empty -%}
117
+ <meta itemprop="description" content="{{- description -}}">
118
+ {%- endif -%}
119
+ {%- if images is not empty -%}
120
+ <meta itemprop="image" content="{{- domain ~ images[0] -}}">
121
+ {%- endif -%}
122
+ {###############################################}
123
+
124
+ <link rel="apple-touch-icon" sizes="180x180" href="{{- app.root -}}assets/favicon/apple-touch-icon.png{{- version_suffix -}}">
125
+ <link rel="icon" type="image/png" href="{{- app.root -}}assets/favicon/favicon-32x32.png{{- version_suffix -}}" sizes="32x32">
126
+ <link rel="icon" type="image/png" href="{{- app.root -}}assets/favicon/favicon-16x16.png{{- version_suffix -}}" sizes="16x16">
127
+ <link rel="shortcut icon" href="{{- app.root -}}assets/favicon/favicon.ico{{- version_suffix -}}">
128
+ <link rel="manifest" href="{{- app.root -}}site.webmanifest{{- version_suffix -}}" crossorigin="use-credentials">
129
+ <meta name="theme-color" content="#ffffff">
130
+
131
+ {%- if app.environment is defined and app.environment == 'dev' -%}
132
+ <link rel="stylesheet" href="{{- app.root -}}assets/css/main.css{{- version_suffix -}}">
133
+ {%- else -%}
134
+ <link rel="stylesheet" href="{{- app.root -}}assets/css/main.min.css{{- version_suffix -}}">
135
+ {%- endif -%}
136
+ </head>
137
+ <body data-feedly-mini="no">
138
+ {%- if app.environment is defined and app.environment == 'prod' -%}
139
+ {%- include "Main::include/google-tag-manager.html.twig" ignore missing -%}
140
+ {%- endif -%}
141
+
142
+ {%- block body -%}{%- endblock -%}
143
+
144
+ {%- block footer -%}
145
+ {%- include "Main::sections/section-footer.html.twig" ignore missing -%}
146
+ {%- endblock -%}
147
+
148
+ {%- block javascripts -%}{%- endblock -%}
149
+ </body>
150
+ </html>
@@ -0,0 +1,16 @@
1
+ {% extends "Main::layouts/layout.html.twig" %}
2
+
3
+ {%- block title -%}404 - stránka nenalezena{%- endblock -%}
4
+
5
+ {% block page_body %}
6
+
7
+ <div class="text-center page-row text-white title">
8
+ <div class="row">
9
+ <div class="large-10 medium-10 push-1 columns">
10
+ <h1 class="text-white">404 - stránka nenalezena</h1>
11
+ <p>Požadovaná stránka nebyla nalezena :(</p>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ {% endblock %}
@@ -0,0 +1,21 @@
1
+ {% extends "Main::layouts/layout.html.twig" %}
2
+
3
+ {% block body %}
4
+ <div>
5
+ <h1>{{- title -}}</h1>
6
+ <h2>{{- app.environment }} / {{ trans('homepage.title') }}</h2>
7
+ </div>
8
+ {% endblock %}
9
+
10
+
11
+ {% block footer %}
12
+ <footer class="page-footer text-right">
13
+ <div>Created by Tateru-CLI</div>
14
+ </footer>
15
+ {{ parent() }}
16
+ {% endblock %}
17
+
18
+
19
+ {%- block javascripts -%}
20
+ <script src="{{- app.root -}}assets/js/homepage.bundle.js{{- version_suffix -}}"></script>
21
+ {%- endblock -%}
@@ -0,0 +1,21 @@
1
+ /* TEAM */
2
+
3
+ Front-End Dev: Daniel Sitek
4
+ Twitter: @DanielSitek
5
+ Location: Ceske Budejovice, Czech Republic
6
+
7
+ /* SITE */
8
+
9
+ Site Name: {{ title }}
10
+ Site URL: {{ domain }} {{- '\n' -}}
11
+ {{- ' ' -}} Language: Czech {{- '\n' -}}
12
+ {%- if twitter.site -%}
13
+ {{- ' ' -}} Twitter: {{- ' ' ~ twitter.site ~ '\n' -}}
14
+ {%- endif %}
15
+
16
+ {{- '\n' -}}
17
+
18
+ {{- ' ' -}} Last Update: {{- ' ' ~ ""|date("Y/m/d") }}
19
+ Standards: HTML5, CSS3, Responsive
20
+ Components: VueJS, SCSS
21
+ Tools: Tateru, VSCode, Adobe Photoshop CC
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Disallow:
3
+
4
+ Sitemap: {{ domain -}}sitemap.xml
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "{{- title -}}",
3
+ "short_name": "{{- shortTitle -}}",
4
+ "description": "{{- description -}}",
5
+ "icons": [
6
+ {
7
+ "src": "{{- app.root -}}assets/favicon/android-chrome-192x192.png",
8
+ "sizes": "192x192",
9
+ "type": "image/png"
10
+ },
11
+ {
12
+ "src": "{{- app.root -}}assets/favicon/android-chrome-512x512.png",
13
+ "sizes": "512x512",
14
+ "type": "image/png"
15
+ }
16
+ ],
17
+ "theme_color": "#ffffff",
18
+ "background_color": "#ffffff",
19
+ "display": "standalone",
20
+ "orientation": "portrait",
21
+ "start_url": "./?utm_source=web_app_manifest",
22
+ "scope": "./"
23
+ }
@@ -0,0 +1,22 @@
1
+ {%- set lastmod = "now"|date("Y-m-d") -%}
2
+
3
+ {%- set pages = [
4
+ ''
5
+ ] -%}
6
+
7
+ <?xml version="1.0" encoding="UTF-8"?>
8
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
9
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
10
+
11
+ {{- '\n\n ' -}}
12
+ {%- for page in pages -%}
13
+ <url>
14
+ <loc>{{- domain ~ page -}}</loc>
15
+ <lastmod>{{- lastmod -}}</lastmod>
16
+ <changefreq>weekly</changefreq>
17
+ <priority>0.8</priority>
18
+ </url>
19
+ {%- endfor -%}
20
+ {{- '\n\n' -}}
21
+
22
+ </urlset>
@@ -0,0 +1,3 @@
1
+ const browserSync = require('browser-sync').create();
2
+
3
+ module.exports = browserSync;
@@ -0,0 +1,10 @@
1
+ const { DIST_FOLDER } = require('./helpers/config');
2
+ const del = require('del');
3
+
4
+ module.exports = function clean() {
5
+ return del([
6
+ `${DIST_FOLDER}`,
7
+ ], {
8
+ force: true,
9
+ });
10
+ };
@@ -0,0 +1,20 @@
1
+ const { DIST_FOLDER } = require('./helpers/config');
2
+ const { src, dest } = require('gulp');
3
+ const autoprefixer = require('autoprefixer');
4
+ const browserSync = require('./browser-sync');
5
+ const postcss = require('gulp-postcss');
6
+ const sass = require('gulp-sass')(require('sass'));
7
+
8
+ module.exports = function css(cb) {
9
+ return src([
10
+ `src/assets/scss/*.scss`,
11
+ ], {
12
+ cwd: '.',
13
+ })
14
+ .pipe(sass.sync())
15
+ .pipe(postcss([
16
+ autoprefixer(),
17
+ ]))
18
+ .pipe(dest(`${DIST_FOLDER}assets/css/`))
19
+ .pipe(browserSync.stream());
20
+ }
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ DIST_FOLDER: 'dist/',
3
+ ENV_DEVELOPMENT: 'development',
4
+ ENV_PRODUCTION: 'production',
5
+ };
@@ -0,0 +1,79 @@
1
+ const log = require('fancy-log');
2
+
3
+ const TYPE_INFO = 'Info';
4
+ const TYPE_ERROR = 'Error';
5
+ const TYPE_WARNING = 'Warning';
6
+
7
+ class Logger {
8
+ constructor(options) {
9
+ this.namespace = options.namespace;
10
+ }
11
+
12
+ /**
13
+ *
14
+ * @param {String} msg
15
+ * @returns this
16
+ */
17
+ info(msg) {
18
+ this._log(TYPE_INFO, msg);
19
+ return this;
20
+ }
21
+
22
+ /**
23
+ *
24
+ * @param {String} msg
25
+ * @returns this
26
+ */
27
+ error(msg) {
28
+ this._log(TYPE_ERROR, msg);
29
+ return this;
30
+ }
31
+
32
+ /**
33
+ *
34
+ * @param {String} msg
35
+ * @returns this
36
+ */
37
+ warning(msg) {
38
+ this._log(TYPE_WARNING, msg);
39
+ return this;
40
+ }
41
+
42
+ /**
43
+ *
44
+ * @param {String} msg
45
+ * @returns this
46
+ */
47
+ custom(options, msg) {
48
+ this._log(options.type, msg);
49
+ return this;
50
+ }
51
+
52
+ /**
53
+ * @private
54
+ * @param {String} type
55
+ * @param {String} line
56
+ */
57
+ _logLine(type, line) {
58
+ let logLine = `${type}: ${line}`;
59
+
60
+ if (this.namespace) {
61
+ logLine = `[${this.namespace}] ${logLine}`;
62
+ }
63
+
64
+ log(logLine);
65
+ }
66
+
67
+ /**
68
+ * @private
69
+ * @param {String} type
70
+ * @param {String} msg
71
+ */
72
+ _log(type, msg) {
73
+ msg.split('\n').forEach((line) => {
74
+ this._logLine(type, line);
75
+ })
76
+ }
77
+ }
78
+
79
+ module.exports = Logger;
@@ -0,0 +1,12 @@
1
+ const { DIST_FOLDER } = require('./helpers/config');
2
+ const { src, dest } = require('gulp');
3
+
4
+ module.exports = function images(cb) {
5
+ return src([
6
+ `**/*`
7
+ ],
8
+ {
9
+ cwd: 'src/assets/images/',
10
+ })
11
+ .pipe(dest(`${DIST_FOLDER}assets/images/`))
12
+ }