'
19 | filter_html_help: false
20 | filter_html_nofollow: false
21 | filter_align:
22 | id: filter_align
23 | provider: filter
24 | status: true
25 | weight: 7
26 | settings: { }
27 | filter_caption:
28 | id: filter_caption
29 | provider: filter
30 | status: true
31 | weight: 8
32 | settings: { }
33 | filter_html_image_secure:
34 | id: filter_html_image_secure
35 | provider: filter
36 | status: true
37 | weight: 9
38 | settings: { }
39 | editor_file_reference:
40 | id: editor_file_reference
41 | provider: editor
42 | status: true
43 | weight: 11
44 | settings: { }
45 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/filter.format.full_html.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | module:
5 | - editor
6 | name: 'Full HTML'
7 | format: full_html
8 | weight: 1
9 | roles:
10 | - administrator
11 | filters:
12 | filter_align:
13 | id: filter_align
14 | provider: filter
15 | status: true
16 | weight: 8
17 | settings: { }
18 | filter_caption:
19 | id: filter_caption
20 | provider: filter
21 | status: true
22 | weight: 9
23 | settings: { }
24 | filter_htmlcorrector:
25 | id: filter_htmlcorrector
26 | provider: filter
27 | status: true
28 | weight: 10
29 | settings: { }
30 | editor_file_reference:
31 | id: editor_file_reference
32 | provider: editor
33 | status: true
34 | weight: 11
35 | settings: { }
36 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/filter.format.restricted_html.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | name: 'Restricted HTML'
5 | format: restricted_html
6 | weight: 0
7 | roles:
8 | - anonymous
9 | filters:
10 | filter_html:
11 | id: filter_html
12 | provider: filter
13 | status: true
14 | weight: -10
15 | settings:
16 | allowed_html: ' -
-
-
'
17 | filter_html_help: true
18 | filter_html_nofollow: false
19 | filter_autop:
20 | id: filter_autop
21 | provider: filter
22 | status: true
23 | weight: 0
24 | settings: { }
25 | filter_url:
26 | id: filter_url
27 | provider: filter
28 | status: true
29 | weight: 0
30 | settings:
31 | filter_url_length: 72
32 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/node.type.article.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | name: Article
5 | type: article
6 | description: 'Use articles for time-sensitive content like news, press releases or blog posts.'
7 | help: ''
8 | new_revision: true
9 | preview_mode: 1
10 | display_submitted: true
11 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/node.type.page.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | name: 'Basic page'
5 | type: page
6 | description: 'Use basic pages for your static content, such as an ''About us'' page.'
7 | help: ''
8 | new_revision: true
9 | preview_mode: 1
10 | display_submitted: false
11 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/rdf.mapping.comment.comment.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | config:
5 | - comment.type.comment
6 | module:
7 | - comment
8 | id: comment.comment
9 | targetEntityType: comment
10 | bundle: comment
11 | types:
12 | - 'schema:Comment'
13 | fieldMappings:
14 | subject:
15 | properties:
16 | - 'schema:name'
17 | created:
18 | properties:
19 | - 'schema:dateCreated'
20 | datatype_callback:
21 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
22 | changed:
23 | properties:
24 | - 'schema:dateModified'
25 | datatype_callback:
26 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
27 | comment_body:
28 | properties:
29 | - 'schema:text'
30 | uid:
31 | properties:
32 | - 'schema:author'
33 | mapping_type: rel
34 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/rdf.mapping.node.article.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | config:
5 | - node.type.article
6 | module:
7 | - node
8 | id: node.article
9 | targetEntityType: node
10 | bundle: article
11 | types:
12 | - 'schema:Article'
13 | fieldMappings:
14 | title:
15 | properties:
16 | - 'schema:name'
17 | created:
18 | properties:
19 | - 'schema:dateCreated'
20 | datatype_callback:
21 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
22 | changed:
23 | properties:
24 | - 'schema:dateModified'
25 | datatype_callback:
26 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
27 | body:
28 | properties:
29 | - 'schema:text'
30 | uid:
31 | properties:
32 | - 'schema:author'
33 | comment:
34 | properties:
35 | - 'schema:comment'
36 | mapping_type: rel
37 | comment_count:
38 | properties:
39 | - 'schema:interactionCount'
40 | datatype_callback:
41 | callable: 'Drupal\rdf\SchemaOrgDataConverter::interactionCount'
42 | arguments:
43 | interaction_type: UserComments
44 | field_image:
45 | properties:
46 | - 'schema:image'
47 | field_tags:
48 | properties:
49 | - 'schema:about'
50 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/rdf.mapping.node.page.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | config:
5 | - node.type.page
6 | module:
7 | - node
8 | id: node.page
9 | targetEntityType: node
10 | bundle: page
11 | types:
12 | - 'schema:WebPage'
13 | fieldMappings:
14 | title:
15 | properties:
16 | - 'schema:name'
17 | created:
18 | properties:
19 | - 'schema:dateCreated'
20 | datatype_callback:
21 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
22 | changed:
23 | properties:
24 | - 'schema:dateModified'
25 | datatype_callback:
26 | callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
27 | body:
28 | properties:
29 | - 'schema:text'
30 | uid:
31 | properties:
32 | - 'schema:author'
33 | mapping_type: rel
34 | comment_count:
35 | properties:
36 | - 'schema:interactionCount'
37 | datatype_callback:
38 | callable: 'Drupal\rdf\SchemaOrgDataConverter::interactionCount'
39 | arguments:
40 | interaction_type: UserComments
41 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/rdf.mapping.taxonomy_term.tags.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies:
4 | config:
5 | - taxonomy.vocabulary.tags
6 | module:
7 | - taxonomy
8 | id: taxonomy_term.tags
9 | targetEntityType: taxonomy_term
10 | bundle: tags
11 | types:
12 | - 'schema:Thing'
13 | fieldMappings:
14 | name:
15 | properties:
16 | - 'schema:name'
17 | description:
18 | properties:
19 | - 'schema:description'
20 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/system.cron.yml:
--------------------------------------------------------------------------------
1 | threshold:
2 | requirements_warning: 172800
3 | requirements_error: 1209600
4 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/system.theme.yml:
--------------------------------------------------------------------------------
1 | admin: seven
2 | default: bartik
3 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/system0.theme:
--------------------------------------------------------------------------------
1 | admin: seven
2 | default: bartik
3 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/taxonomy.vocabulary.tags.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | name: Tags
5 | vid: tags
6 | description: 'Use tags to group articles on similar topics into categories.'
7 | hierarchy: 0
8 | weight: 0
9 |
--------------------------------------------------------------------------------
/web/profiles/react/config/install/user.role.administrator.yml:
--------------------------------------------------------------------------------
1 | langcode: en
2 | status: true
3 | dependencies: { }
4 | id: administrator
5 | label: Administrator
6 | weight: 2
7 | is_admin: true
8 | permissions: { }
9 |
--------------------------------------------------------------------------------
/web/profiles/react/react.info.yml:
--------------------------------------------------------------------------------
1 | name: 'React'
2 | type: profile
3 | description: 'Drupal-React boilerplate profile.'
4 | core: 8.x
5 | dependencies:
6 | - automated_cron
7 | - block
8 | - block_content
9 | - breakpoint
10 | - ckeditor
11 | - color
12 | - comment
13 | - config
14 | - contact
15 | - contextual
16 | - datetime
17 | - dblog
18 | - dynamic_page_cache
19 | - editor
20 | - field
21 | - field_ui
22 | - file
23 | - filter
24 | - help
25 | - history
26 | - image
27 | - link
28 | - menu_ui
29 | - node
30 | - options
31 | - page_cache
32 | - path
33 | - quickedit
34 | - rdf
35 | - search
36 | - shortcut
37 | - system
38 | - taxonomy
39 | - text
40 | - toolbar
41 | - tour
42 | - update
43 | - user
44 | - views_ui
45 | - menu_link_content
46 | - views
47 | themes:
48 | - seven
49 | - bartik
50 | - spa
51 |
--------------------------------------------------------------------------------
/web/profiles/react/react.install:
--------------------------------------------------------------------------------
1 | 'SPA content. If you are seeing this, something probably went wrong.',
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/web/profiles/react/src/PathProcessor/SPAPathProcessor.php:
--------------------------------------------------------------------------------
1 | getRouteName(), static::$applies);
21 | }
22 |
23 | /**
24 | * {@inheritdoc}
25 | */
26 | public function determineActiveTheme(RouteMatchInterface $route_match) {
27 | return 'spa';
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/web/robots.txt:
--------------------------------------------------------------------------------
1 | #
2 | # robots.txt
3 | #
4 | # This file is to prevent the crawling and indexing of certain parts
5 | # of your site by web crawlers and spiders run by sites like Yahoo!
6 | # and Google. By telling these "robots" where not to go on your site,
7 | # you save bandwidth and server resources.
8 | #
9 | # This file will be ignored unless it is at the root of your host:
10 | # Used: http://example.com/robots.txt
11 | # Ignored: http://example.com/site/robots.txt
12 | #
13 | # For more information about the robots.txt standard, see:
14 | # http://www.robotstxt.org/robotstxt.html
15 |
16 | User-agent: *
17 | # CSS, JS, Images
18 | Allow: /core/*.css$
19 | Allow: /core/*.css?
20 | Allow: /core/*.js$
21 | Allow: /core/*.js?
22 | Allow: /core/*.gif
23 | Allow: /core/*.jpg
24 | Allow: /core/*.jpeg
25 | Allow: /core/*.png
26 | Allow: /core/*.svg
27 | Allow: /profiles/*.css$
28 | Allow: /profiles/*.css?
29 | Allow: /profiles/*.js$
30 | Allow: /profiles/*.js?
31 | Allow: /profiles/*.gif
32 | Allow: /profiles/*.jpg
33 | Allow: /profiles/*.jpeg
34 | Allow: /profiles/*.png
35 | Allow: /profiles/*.svg
36 | # Directories
37 | Disallow: /core/
38 | Disallow: /profiles/
39 | # Files
40 | Disallow: /README.txt
41 | Disallow: /web.config
42 | # Paths (clean URLs)
43 | Disallow: /admin/
44 | Disallow: /comment/reply/
45 | Disallow: /filter/tips/
46 | Disallow: /node/add/
47 | Disallow: /search/
48 | Disallow: /user/register/
49 | Disallow: /user/password/
50 | Disallow: /user/login/
51 | Disallow: /user/logout/
52 | # Paths (no clean URLs)
53 | Disallow: /index.php/admin/
54 | Disallow: /index.php/comment/reply/
55 | Disallow: /index.php/filter/tips/
56 | Disallow: /index.php/node/add/
57 | Disallow: /index.php/search/
58 | Disallow: /index.php/user/password/
59 | Disallow: /index.php/user/register/
60 | Disallow: /index.php/user/login/
61 | Disallow: /index.php/user/logout/
62 |
--------------------------------------------------------------------------------
/web/sites/default/config/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TallerWebSolutions/drupal-react-boilerplate/471f0791d7db3f9a843361245b86feec3118d092/web/sites/default/config/.gitkeep
--------------------------------------------------------------------------------
/web/sites/default/config/.htaccess:
--------------------------------------------------------------------------------
1 | # Deny all requests from Apache 2.4+.
2 |
3 | Require all denied
4 |
5 |
6 | # Deny all requests from Apache 2.0-2.2.
7 |
8 | Deny from all
9 |
10 | # Turn off all options we don't need.
11 | Options -Indexes -ExecCGI -Includes -MultiViews
12 |
13 | # Set the catch-all handler to prevent scripts from being executed.
14 | SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
15 |
16 | # Override the handler again if we're run later in the evaluation list.
17 | SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
18 |
19 |
20 | # If we know how to do it safely, disable the PHP engine entirely.
21 |
22 | php_flag engine off
23 |
--------------------------------------------------------------------------------
/web/sites/default/default.services.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | session.storage.options:
3 | # Default ini options for sessions.
4 | #
5 | # Some distributions of Linux (most notably Debian) ship their PHP
6 | # installations with garbage collection (gc) disabled. Since Drupal depends
7 | # on PHP's garbage collection for clearing sessions, ensure that garbage
8 | # collection occurs by using the most common settings.
9 | # @default 1
10 | gc_probability: 1
11 | # @default 100
12 | gc_divisor: 100
13 | #
14 | # Set session lifetime (in seconds), i.e. the time from the user's last
15 | # visit to the active session may be deleted by the session garbage
16 | # collector. When a session is deleted, authenticated users are logged out,
17 | # and the contents of the user's $_SESSION variable is discarded.
18 | # @default 200000
19 | gc_maxlifetime: 200000
20 | #
21 | # Set session cookie lifetime (in seconds), i.e. the time from the session
22 | # is created to the cookie expires, i.e. when the browser is expected to
23 | # discard the cookie. The value 0 means "until the browser is closed".
24 | # @default 2000000
25 | cookie_lifetime: 2000000
26 | #
27 | # Drupal automatically generates a unique session cookie name based on the
28 | # full domain name used to access the site. This mechanism is sufficient
29 | # for most use-cases, including multi-site deployments. However, if it is
30 | # desired that a session can be reused across different subdomains, the
31 | # cookie domain needs to be set to the shared base domain. Doing so assures
32 | # that users remain logged in as they cross between various subdomains.
33 | # To maximize compatibility and normalize the behavior across user agents,
34 | # the cookie domain should start with a dot.
35 | #
36 | # @default none
37 | # cookie_domain: '.example.com'
38 | #
39 | twig.config:
40 | # Twig debugging:
41 | #
42 | # When debugging is enabled:
43 | # - The markup of each Twig template is surrounded by HTML comments that
44 | # contain theming information, such as template file name suggestions.
45 | # - Note that this debugging markup will cause automated tests that directly
46 | # check rendered HTML to fail. When running automated tests, 'debug'
47 | # should be set to FALSE.
48 | # - The dump() function can be used in Twig templates to output information
49 | # about template variables.
50 | # - Twig templates are automatically recompiled whenever the source code
51 | # changes (see auto_reload below).
52 | #
53 | # For more information about debugging Twig templates, see
54 | # https://www.drupal.org/node/1906392.
55 | #
56 | # Not recommended in production environments
57 | # @default false
58 | debug: false
59 | # Twig auto-reload:
60 | #
61 | # Automatically recompile Twig templates whenever the source code changes.
62 | # If you don't provide a value for auto_reload, it will be determined
63 | # based on the value of debug.
64 | #
65 | # Not recommended in production environments
66 | # @default null
67 | auto_reload: null
68 | # Twig cache:
69 | #
70 | # By default, Twig templates will be compiled and stored in the filesystem
71 | # to increase performance. Disabling the Twig cache will recompile the
72 | # templates from source each time they are used. In most cases the
73 | # auto_reload setting above should be enabled rather than disabling the
74 | # Twig cache.
75 | #
76 | # Not recommended in production environments
77 | # @default true
78 | cache: true
79 | renderer.config:
80 | # Renderer required cache contexts:
81 | #
82 | # The Renderer will automatically associate these cache contexts with every
83 | # render array, hence varying every render array by these cache contexts.
84 | #
85 | # @default ['languages:language_interface', 'theme', 'user.permissions']
86 | required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
87 | # Renderer automatic placeholdering conditions:
88 | #
89 | # Drupal allows portions of the page to be automatically deferred when
90 | # rendering to improve cache performance. That is especially helpful for
91 | # cache contexts that vary widely, such as the active user. On some sites
92 | # those may be different, however, such as sites with only a handful of
93 | # users. If you know what the high-cardinality cache contexts are for your
94 | # site, specify those here. If you're not sure, the defaults are fairly safe
95 | # in general.
96 | #
97 | # For more information about rendering optimizations see
98 | # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
99 | auto_placeholder_conditions:
100 | # Max-age at or below which caching is not considered worthwhile.
101 | #
102 | # Disable by setting to -1.
103 | #
104 | # @default 0
105 | max-age: 0
106 | # Cache contexts with a high cardinality.
107 | #
108 | # Disable by setting to [].
109 | #
110 | # @default ['session', 'user']
111 | contexts: ['session', 'user']
112 | # Tags with a high invalidation frequency.
113 | #
114 | # Disable by setting to [].
115 | #
116 | # @default []
117 | tags: []
118 | # Cacheability debugging:
119 | #
120 | # Responses with cacheability metadata (CacheableResponseInterface instances)
121 | # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
122 | #
123 | # For more information about debugging cacheable responses, see
124 | # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
125 | #
126 | # Not recommended in production environments
127 | # @default false
128 | http.response.debug_cacheability_headers: false
129 | factory.keyvalue:
130 | {}
131 | # Default key/value storage service to use.
132 | # @default keyvalue.database
133 | # default: keyvalue.database
134 | # Collection-specific overrides.
135 | # state: keyvalue.database
136 | factory.keyvalue.expirable:
137 | {}
138 | # Default key/value expirable storage service to use.
139 | # @default keyvalue.database.expirable
140 | # default: keyvalue.database.expirable
141 | # Allowed protocols for URL generation.
142 | filter_protocols:
143 | - http
144 | - https
145 | - ftp
146 | - news
147 | - nntp
148 | - tel
149 | - telnet
150 | - mailto
151 | - irc
152 | - ssh
153 | - sftp
154 | - webcal
155 | - rtsp
156 |
157 | # Configure Cross-Site HTTP requests (CORS).
158 | # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
159 | # for more information about the topic in general.
160 | # Note: By default the configuration is disabled.
161 | cors.config:
162 | enabled: false
163 | # Specify allowed headers, like 'x-allowed-header'.
164 | allowedHeaders: []
165 | # Specify allowed request methods, specify ['*'] to allow all possible ones.
166 | allowedMethods: []
167 | # Configure requests allowed from specific origins.
168 | allowedOrigins: ['*']
169 | # Sets the Access-Control-Expose-Headers header.
170 | exposedHeaders: false
171 | # Sets the Access-Control-Max-Age header.
172 | maxAge: false
173 | # Sets the Access-Control-Allow-Credentials header.
174 | supportsCredentials: false
175 |
--------------------------------------------------------------------------------
/web/sites/default/services.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | session.storage.options:
3 | # Default ini options for sessions.
4 | #
5 | # Some distributions of Linux (most notably Debian) ship their PHP
6 | # installations with garbage collection (gc) disabled. Since Drupal depends
7 | # on PHP's garbage collection for clearing sessions, ensure that garbage
8 | # collection occurs by using the most common settings.
9 | # @default 1
10 | gc_probability: 1
11 | # @default 100
12 | gc_divisor: 100
13 | #
14 | # Set session lifetime (in seconds), i.e. the time from the user's last
15 | # visit to the active session may be deleted by the session garbage
16 | # collector. When a session is deleted, authenticated users are logged out,
17 | # and the contents of the user's $_SESSION variable is discarded.
18 | # @default 200000
19 | gc_maxlifetime: 200000
20 | #
21 | # Set session cookie lifetime (in seconds), i.e. the time from the session
22 | # is created to the cookie expires, i.e. when the browser is expected to
23 | # discard the cookie. The value 0 means "until the browser is closed".
24 | # @default 2000000
25 | cookie_lifetime: 2000000
26 | #
27 | # Drupal automatically generates a unique session cookie name based on the
28 | # full domain name used to access the site. This mechanism is sufficient
29 | # for most use-cases, including multi-site deployments. However, if it is
30 | # desired that a session can be reused across different subdomains, the
31 | # cookie domain needs to be set to the shared base domain. Doing so assures
32 | # that users remain logged in as they cross between various subdomains.
33 | # To maximize compatibility and normalize the behavior across user agents,
34 | # the cookie domain should start with a dot.
35 | #
36 | # @default none
37 | # cookie_domain: '.example.com'
38 | #
39 | twig.config:
40 | # Twig debugging:
41 | #
42 | # When debugging is enabled:
43 | # - The markup of each Twig template is surrounded by HTML comments that
44 | # contain theming information, such as template file name suggestions.
45 | # - Note that this debugging markup will cause automated tests that directly
46 | # check rendered HTML to fail. When running automated tests, 'debug'
47 | # should be set to FALSE.
48 | # - The dump() function can be used in Twig templates to output information
49 | # about template variables.
50 | # - Twig templates are automatically recompiled whenever the source code
51 | # changes (see auto_reload below).
52 | #
53 | # For more information about debugging Twig templates, see
54 | # https://www.drupal.org/node/1906392.
55 | #
56 | # Not recommended in production environments
57 | # @default false
58 | debug: false
59 | # Twig auto-reload:
60 | #
61 | # Automatically recompile Twig templates whenever the source code changes.
62 | # If you don't provide a value for auto_reload, it will be determined
63 | # based on the value of debug.
64 | #
65 | # Not recommended in production environments
66 | # @default null
67 | auto_reload: null
68 | # Twig cache:
69 | #
70 | # By default, Twig templates will be compiled and stored in the filesystem
71 | # to increase performance. Disabling the Twig cache will recompile the
72 | # templates from source each time they are used. In most cases the
73 | # auto_reload setting above should be enabled rather than disabling the
74 | # Twig cache.
75 | #
76 | # Not recommended in production environments
77 | # @default true
78 | cache: true
79 | renderer.config:
80 | # Renderer required cache contexts:
81 | #
82 | # The Renderer will automatically associate these cache contexts with every
83 | # render array, hence varying every render array by these cache contexts.
84 | #
85 | # @default ['languages:language_interface', 'theme', 'user.permissions']
86 | required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
87 | # Renderer automatic placeholdering conditions:
88 | #
89 | # Drupal allows portions of the page to be automatically deferred when
90 | # rendering to improve cache performance. That is especially helpful for
91 | # cache contexts that vary widely, such as the active user. On some sites
92 | # those may be different, however, such as sites with only a handful of
93 | # users. If you know what the high-cardinality cache contexts are for your
94 | # site, specify those here. If you're not sure, the defaults are fairly safe
95 | # in general.
96 | #
97 | # For more information about rendering optimizations see
98 | # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
99 | auto_placeholder_conditions:
100 | # Max-age at or below which caching is not considered worthwhile.
101 | #
102 | # Disable by setting to -1.
103 | #
104 | # @default 0
105 | max-age: 0
106 | # Cache contexts with a high cardinality.
107 | #
108 | # Disable by setting to [].
109 | #
110 | # @default ['session', 'user']
111 | contexts: ['session', 'user']
112 | # Tags with a high invalidation frequency.
113 | #
114 | # Disable by setting to [].
115 | #
116 | # @default []
117 | tags: []
118 | # Cacheability debugging:
119 | #
120 | # Responses with cacheability metadata (CacheableResponseInterface instances)
121 | # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
122 | #
123 | # For more information about debugging cacheable responses, see
124 | # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
125 | #
126 | # Not recommended in production environments
127 | # @default false
128 | http.response.debug_cacheability_headers: false
129 | factory.keyvalue:
130 | {}
131 | # Default key/value storage service to use.
132 | # @default keyvalue.database
133 | # default: keyvalue.database
134 | # Collection-specific overrides.
135 | # state: keyvalue.database
136 | factory.keyvalue.expirable:
137 | {}
138 | # Default key/value expirable storage service to use.
139 | # @default keyvalue.database.expirable
140 | # default: keyvalue.database.expirable
141 | # Allowed protocols for URL generation.
142 | filter_protocols:
143 | - http
144 | - https
145 | - ftp
146 | - news
147 | - nntp
148 | - tel
149 | - telnet
150 | - mailto
151 | - irc
152 | - ssh
153 | - sftp
154 | - webcal
155 | - rtsp
156 |
--------------------------------------------------------------------------------
/web/sites/default/settings.php:
--------------------------------------------------------------------------------
1 | 'databasename',
79 | * 'username' => 'sqlusername',
80 | * 'password' => 'sqlpassword',
81 | * 'host' => 'localhost',
82 | * 'port' => '3306',
83 | * 'driver' => 'mysql',
84 | * 'prefix' => '',
85 | * 'collation' => 'utf8mb4_general_ci',
86 | * );
87 | * @endcode
88 | */
89 | $databases = array();
90 |
91 | /**
92 | * Customizing database settings.
93 | *
94 | * Many of the values of the $databases array can be customized for your
95 | * particular database system. Refer to the sample in the section above as a
96 | * starting point.
97 | *
98 | * The "driver" property indicates what Drupal database driver the
99 | * connection should use. This is usually the same as the name of the
100 | * database type, such as mysql or sqlite, but not always. The other
101 | * properties will vary depending on the driver. For SQLite, you must
102 | * specify a database file name in a directory that is writable by the
103 | * webserver. For most other drivers, you must specify a
104 | * username, password, host, and database name.
105 | *
106 | * Transaction support is enabled by default for all drivers that support it,
107 | * including MySQL. To explicitly disable it, set the 'transactions' key to
108 | * FALSE.
109 | * Note that some configurations of MySQL, such as the MyISAM engine, don't
110 | * support it and will proceed silently even if enabled. If you experience
111 | * transaction related crashes with such configuration, set the 'transactions'
112 | * key to FALSE.
113 | *
114 | * For each database, you may optionally specify multiple "target" databases.
115 | * A target database allows Drupal to try to send certain queries to a
116 | * different database if it can but fall back to the default connection if not.
117 | * That is useful for primary/replica replication, as Drupal may try to connect
118 | * to a replica server when appropriate and if one is not available will simply
119 | * fall back to the single primary server (The terms primary/replica are
120 | * traditionally referred to as master/slave in database server documentation).
121 | *
122 | * The general format for the $databases array is as follows:
123 | * @code
124 | * $databases['default']['default'] = $info_array;
125 | * $databases['default']['replica'][] = $info_array;
126 | * $databases['default']['replica'][] = $info_array;
127 | * $databases['extra']['default'] = $info_array;
128 | * @endcode
129 | *
130 | * In the above example, $info_array is an array of settings described above.
131 | * The first line sets a "default" database that has one primary database
132 | * (the second level default). The second and third lines create an array
133 | * of potential replica databases. Drupal will select one at random for a given
134 | * request as needed. The fourth line creates a new database with a name of
135 | * "extra".
136 | *
137 | * You can optionally set prefixes for some or all database table names
138 | * by using the 'prefix' setting. If a prefix is specified, the table
139 | * name will be prepended with its value. Be sure to use valid database
140 | * characters only, usually alphanumeric and underscore. If no prefixes
141 | * are desired, leave it as an empty string ''.
142 | *
143 | * To have all database names prefixed, set 'prefix' as a string:
144 | * @code
145 | * 'prefix' => 'main_',
146 | * @endcode
147 | * To provide prefixes for specific tables, set 'prefix' as an array.
148 | * The array's keys are the table names and the values are the prefixes.
149 | * The 'default' element is mandatory and holds the prefix for any tables
150 | * not specified elsewhere in the array. Example:
151 | * @code
152 | * 'prefix' => array(
153 | * 'default' => 'main_',
154 | * 'users' => 'shared_',
155 | * 'sessions' => 'shared_',
156 | * 'role' => 'shared_',
157 | * 'authmap' => 'shared_',
158 | * ),
159 | * @endcode
160 | * You can also use a reference to a schema/database as a prefix. This may be
161 | * useful if your Drupal installation exists in a schema that is not the default
162 | * or you want to access several databases from the same code base at the same
163 | * time.
164 | * Example:
165 | * @code
166 | * 'prefix' => array(
167 | * 'default' => 'main.',
168 | * 'users' => 'shared.',
169 | * 'sessions' => 'shared.',
170 | * 'role' => 'shared.',
171 | * 'authmap' => 'shared.',
172 | * );
173 | * @endcode
174 | * NOTE: MySQL and SQLite's definition of a schema is a database.
175 | *
176 | * Advanced users can add or override initial commands to execute when
177 | * connecting to the database server, as well as PDO connection settings. For
178 | * example, to enable MySQL SELECT queries to exceed the max_join_size system
179 | * variable, and to reduce the database connection timeout to 5 seconds:
180 | * @code
181 | * $databases['default']['default'] = array(
182 | * 'init_commands' => array(
183 | * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
184 | * ),
185 | * 'pdo' => array(
186 | * PDO::ATTR_TIMEOUT => 5,
187 | * ),
188 | * );
189 | * @endcode
190 | *
191 | * WARNING: The above defaults are designed for database portability. Changing
192 | * them may cause unexpected behavior, including potential data loss. See
193 | * https://www.drupal.org/developing/api/database/configuration for more
194 | * information on these defaults and the potential issues.
195 | *
196 | * More details can be found in the constructor methods for each driver:
197 | * - \Drupal\Core\Database\Driver\mysql\Connection::__construct()
198 | * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct()
199 | * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
200 | *
201 | * Sample Database configuration format for PostgreSQL (pgsql):
202 | * @code
203 | * $databases['default']['default'] = array(
204 | * 'driver' => 'pgsql',
205 | * 'database' => 'databasename',
206 | * 'username' => 'sqlusername',
207 | * 'password' => 'sqlpassword',
208 | * 'host' => 'localhost',
209 | * 'prefix' => '',
210 | * );
211 | * @endcode
212 | *
213 | * Sample Database configuration format for SQLite (sqlite):
214 | * @code
215 | * $databases['default']['default'] = array(
216 | * 'driver' => 'sqlite',
217 | * 'database' => '/path/to/databasefilename',
218 | * );
219 | * @endcode
220 | */
221 |
222 | /**
223 | * Location of the site configuration files.
224 | *
225 | * The $config_directories array specifies the location of file system
226 | * directories used for configuration data. On install, the "sync" directory is
227 | * created. This is used for configuration imports. The "active" directory is
228 | * not created by default since the default storage for active configuration is
229 | * the database rather than the file system. (This can be changed. See "Active
230 | * configuration settings" below).
231 | *
232 | * The default location for the "sync" directory is inside a randomly-named
233 | * directory in the public files path. The setting below allows you to override
234 | * the "sync" location.
235 | *
236 | * If you use files for the "active" configuration, you can tell the
237 | * Configuration system where this directory is located by adding an entry with
238 | * array key CONFIG_ACTIVE_DIRECTORY.
239 | *
240 | * Example:
241 | * @code
242 | * $config_directories = array(
243 | * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
244 | * );
245 | * @endcode
246 | */
247 | $config_directories[CONFIG_SYNC_DIRECTORY] = 'sites/default/config';
248 |
249 | /**
250 | * Settings:
251 | *
252 | * $settings contains environment-specific configuration, such as the files
253 | * directory and reverse proxy address, and temporary configuration, such as
254 | * security overrides.
255 | *
256 | * @see \Drupal\Core\Site\Settings::get()
257 | */
258 |
259 | /**
260 | * The active installation profile.
261 | *
262 | * Changing this after installation is not recommended as it changes which
263 | * directories are scanned during extension discovery. If this is set prior to
264 | * installation this value will be rewritten according to the profile selected
265 | * by the user.
266 | *
267 | * @see install_select_profile()
268 | */
269 | # $settings['install_profile'] = '';
270 |
271 | /**
272 | * Salt for one-time login links, cancel links, form tokens, etc.
273 | *
274 | * This variable will be set to a random value by the installer. All one-time
275 | * login links will be invalidated if the value is changed. Note that if your
276 | * site is deployed on a cluster of web servers, you must ensure that this
277 | * variable has the same value on each server.
278 | *
279 | * For enhanced security, you may set this variable to the contents of a file
280 | * outside your document root; you should also ensure that this file is not
281 | * stored with backups of your database.
282 | *
283 | * Example:
284 | * @code
285 | * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt');
286 | * @endcode
287 | */
288 | $settings['hash_salt'] = 'jahsdk123jh1a23123ksdj12354534hakj5645sdhkajshd';
289 |
290 | /**
291 | * Deployment identifier.
292 | *
293 | * Drupal's dependency injection container will be automatically invalidated and
294 | * rebuilt when the Drupal core version changes. When updating contributed or
295 | * custom code that changes the container, changing this identifier will also
296 | * allow the container to be invalidated as soon as code is deployed.
297 | */
298 | # $settings['deployment_identifier'] = \Drupal::VERSION;
299 |
300 | /**
301 | * Access control for update.php script.
302 | *
303 | * If you are updating your Drupal installation using the update.php script but
304 | * are not logged in using either an account with the "Administer software
305 | * updates" permission or the site maintenance account (the account that was
306 | * created during installation), you will need to modify the access check
307 | * statement below. Change the FALSE to a TRUE to disable the access check.
308 | * After finishing the upgrade, be sure to open this file again and change the
309 | * TRUE back to a FALSE!
310 | */
311 | $settings['update_free_access'] = FALSE;
312 |
313 | /**
314 | * External access proxy settings:
315 | *
316 | * If your site must access the Internet via a web proxy then you can enter the
317 | * proxy settings here. Set the full URL of the proxy, including the port, in
318 | * variables:
319 | * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP
320 | * requests.
321 | * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS
322 | * requests.
323 | * You can pass in the user name and password for basic authentication in the
324 | * URLs in these settings.
325 | *
326 | * You can also define an array of host names that can be accessed directly,
327 | * bypassing the proxy, in $settings['http_client_config']['proxy']['no'].
328 | *
329 | * If these settings are not configured, the system environment variables
330 | * HTTP_PROXY, HTTPS_PROXY, and NO_PROXY on the web server will be used instead.
331 | */
332 | # $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080';
333 | # $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080';
334 | # $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost'];
335 |
336 | /**
337 | * Reverse Proxy Configuration:
338 | *
339 | * Reverse proxy servers are often used to enhance the performance
340 | * of heavily visited sites and may also provide other site caching,
341 | * security, or encryption benefits. In an environment where Drupal
342 | * is behind a reverse proxy, the real IP address of the client should
343 | * be determined such that the correct client IP address is available
344 | * to Drupal's logging, statistics, and access management systems. In
345 | * the most simple scenario, the proxy server will add an
346 | * X-Forwarded-For header to the request that contains the client IP
347 | * address. However, HTTP headers are vulnerable to spoofing, where a
348 | * malicious client could bypass restrictions by setting the
349 | * X-Forwarded-For header directly. Therefore, Drupal's proxy
350 | * configuration requires the IP addresses of all remote proxies to be
351 | * specified in $settings['reverse_proxy_addresses'] to work correctly.
352 | *
353 | * Enable this setting to get Drupal to determine the client IP from
354 | * the X-Forwarded-For header (or $settings['reverse_proxy_header'] if set).
355 | * If you are unsure about this setting, do not have a reverse proxy,
356 | * or Drupal operates in a shared hosting environment, this setting
357 | * should remain commented out.
358 | *
359 | * In order for this setting to be used you must specify every possible
360 | * reverse proxy IP address in $settings['reverse_proxy_addresses'].
361 | * If a complete list of reverse proxies is not available in your
362 | * environment (for example, if you use a CDN) you may set the
363 | * $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
364 | * Be aware, however, that it is likely that this would allow IP
365 | * address spoofing unless more advanced precautions are taken.
366 | */
367 | # $settings['reverse_proxy'] = TRUE;
368 |
369 | /**
370 | * Specify every reverse proxy IP address in your environment.
371 | * This setting is required if $settings['reverse_proxy'] is TRUE.
372 | */
373 | # $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...);
374 |
375 | /**
376 | * Set this value if your proxy server sends the client IP in a header
377 | * other than X-Forwarded-For.
378 | */
379 | # $settings['reverse_proxy_header'] = 'X_CLUSTER_CLIENT_IP';
380 |
381 | /**
382 | * Set this value if your proxy server sends the client protocol in a header
383 | * other than X-Forwarded-Proto.
384 | */
385 | # $settings['reverse_proxy_proto_header'] = 'X_FORWARDED_PROTO';
386 |
387 | /**
388 | * Set this value if your proxy server sends the client protocol in a header
389 | * other than X-Forwarded-Host.
390 | */
391 | # $settings['reverse_proxy_host_header'] = 'X_FORWARDED_HOST';
392 |
393 | /**
394 | * Set this value if your proxy server sends the client protocol in a header
395 | * other than X-Forwarded-Port.
396 | */
397 | # $settings['reverse_proxy_port_header'] = 'X_FORWARDED_PORT';
398 |
399 | /**
400 | * Set this value if your proxy server sends the client protocol in a header
401 | * other than Forwarded.
402 | */
403 | # $settings['reverse_proxy_forwarded_header'] = 'FORWARDED';
404 |
405 | /**
406 | * Page caching:
407 | *
408 | * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page
409 | * views. This tells a HTTP proxy that it may return a page from its local
410 | * cache without contacting the web server, if the user sends the same Cookie
411 | * header as the user who originally requested the cached page. Without "Vary:
412 | * Cookie", authenticated users would also be served the anonymous page from
413 | * the cache. If the site has mostly anonymous users except a few known
414 | * editors/administrators, the Vary header can be omitted. This allows for
415 | * better caching in HTTP proxies (including reverse proxies), i.e. even if
416 | * clients send different cookies, they still get content served from the cache.
417 | * However, authenticated users should access the site directly (i.e. not use an
418 | * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
419 | * getting cached pages from the proxy.
420 | */
421 | # $settings['omit_vary_cookie'] = TRUE;
422 |
423 | /**
424 | * Class Loader.
425 | *
426 | * If the APC extension is detected, the Symfony APC class loader is used for
427 | * performance reasons. Detection can be prevented by setting
428 | * class_loader_auto_detect to false, as in the example below.
429 | */
430 | # $settings['class_loader_auto_detect'] = FALSE;
431 |
432 | /*
433 | * If the APC extension is not detected, either because APC is missing or
434 | * because auto-detection has been disabled, auto-loading falls back to
435 | * Composer's ClassLoader, which is good for development as it does not break
436 | * when code is moved in the file system. You can also decorate the base class
437 | * loader with another cached solution than the Symfony APC class loader, as
438 | * all production sites should have a cached class loader of some sort enabled.
439 | *
440 | * To do so, you may decorate and replace the local $class_loader variable. For
441 | * example, to use Symfony's APC class loader without automatic detection,
442 | * uncomment the code below.
443 | */
444 | /*
445 | if ($settings['hash_salt']) {
446 | $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
447 | $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
448 | unset($prefix);
449 | $class_loader->unregister();
450 | $apc_loader->register();
451 | $class_loader = $apc_loader;
452 | }
453 | */
454 |
455 | /**
456 | * Authorized file system operations:
457 | *
458 | * The Update Manager module included with Drupal provides a mechanism for
459 | * site administrators to securely install missing updates for the site
460 | * directly through the web user interface. On securely-configured servers,
461 | * the Update manager will require the administrator to provide SSH or FTP
462 | * credentials before allowing the installation to proceed; this allows the
463 | * site to update the new files as the user who owns all the Drupal files,
464 | * instead of as the user the webserver is running as. On servers where the
465 | * webserver user is itself the owner of the Drupal files, the administrator
466 | * will not be prompted for SSH or FTP credentials (note that these server
467 | * setups are common on shared hosting, but are inherently insecure).
468 | *
469 | * Some sites might wish to disable the above functionality, and only update
470 | * the code directly via SSH or FTP themselves. This setting completely
471 | * disables all functionality related to these authorized file operations.
472 | *
473 | * @see https://www.drupal.org/node/244924
474 | *
475 | * Remove the leading hash signs to disable.
476 | */
477 | # $settings['allow_authorize_operations'] = FALSE;
478 |
479 | /**
480 | * Default mode for directories and files written by Drupal.
481 | *
482 | * Value should be in PHP Octal Notation, with leading zero.
483 | */
484 | # $settings['file_chmod_directory'] = 0775;
485 | # $settings['file_chmod_file'] = 0664;
486 |
487 | /**
488 | * Public file base URL:
489 | *
490 | * An alternative base URL to be used for serving public files. This must
491 | * include any leading directory path.
492 | *
493 | * A different value from the domain used by Drupal to be used for accessing
494 | * public files. This can be used for a simple CDN integration, or to improve
495 | * security by serving user-uploaded files from a different domain or subdomain
496 | * pointing to the same server. Do not include a trailing slash.
497 | */
498 | # $settings['file_public_base_url'] = 'http://downloads.example.com/files';
499 |
500 | /**
501 | * Public file path:
502 | *
503 | * A local file system path where public files will be stored. This directory
504 | * must exist and be writable by Drupal. This directory must be relative to
505 | * the Drupal installation directory and be accessible over the web.
506 | */
507 | # $settings['file_public_path'] = 'sites/default/files';
508 |
509 | /**
510 | * Private file path:
511 | *
512 | * A local file system path where private files will be stored. This directory
513 | * must be absolute, outside of the Drupal installation directory and not
514 | * accessible over the web.
515 | *
516 | * Note: Caches need to be cleared when this value is changed to make the
517 | * private:// stream wrapper available to the system.
518 | *
519 | * See https://www.drupal.org/documentation/modules/file for more information
520 | * about securing private files.
521 | */
522 | # $settings['file_private_path'] = '';
523 |
524 | /**
525 | * Session write interval:
526 | *
527 | * Set the minimum interval between each session write to database.
528 | * For performance reasons it defaults to 180.
529 | */
530 | # $settings['session_write_interval'] = 180;
531 |
532 | /**
533 | * String overrides:
534 | *
535 | * To override specific strings on your site with or without enabling the Locale
536 | * module, add an entry to this list. This functionality allows you to change
537 | * a small number of your site's default English language interface strings.
538 | *
539 | * Remove the leading hash signs to enable.
540 | *
541 | * The "en" part of the variable name, is dynamic and can be any langcode of
542 | * any added language. (eg locale_custom_strings_de for german).
543 | */
544 | # $settings['locale_custom_strings_en'][''] = array(
545 | # 'forum' => 'Discussion board',
546 | # '@count min' => '@count minutes',
547 | # );
548 |
549 | /**
550 | * A custom theme for the offline page:
551 | *
552 | * This applies when the site is explicitly set to maintenance mode through the
553 | * administration page or when the database is inactive due to an error.
554 | * The template file should also be copied into the theme. It is located inside
555 | * 'core/modules/system/templates/maintenance-page.html.twig'.
556 | *
557 | * Note: This setting does not apply to installation and update pages.
558 | */
559 | # $settings['maintenance_theme'] = 'bartik';
560 |
561 | /**
562 | * PHP settings:
563 | *
564 | * To see what PHP settings are possible, including whether they can be set at
565 | * runtime (by using ini_set()), read the PHP documentation:
566 | * http://php.net/manual/ini.list.php
567 | * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime
568 | * settings and the .htaccess file for non-runtime settings.
569 | * Settings defined there should not be duplicated here so as to avoid conflict
570 | * issues.
571 | */
572 |
573 | /**
574 | * If you encounter a situation where users post a large amount of text, and
575 | * the result is stripped out upon viewing but can still be edited, Drupal's
576 | * output filter may not have sufficient memory to process it. If you
577 | * experience this issue, you may wish to uncomment the following two lines
578 | * and increase the limits of these variables. For more information, see
579 | * http://php.net/manual/pcre.configuration.php.
580 | */
581 | # ini_set('pcre.backtrack_limit', 200000);
582 | # ini_set('pcre.recursion_limit', 200000);
583 |
584 | /**
585 | * Active configuration settings.
586 | *
587 | * By default, the active configuration is stored in the database in the
588 | * {config} table. To use a different storage mechanism for the active
589 | * configuration, do the following prior to installing:
590 | * - Create an "active" directory and declare its path in $config_directories
591 | * as explained under the 'Location of the site configuration files' section
592 | * above in this file. To enhance security, you can declare a path that is
593 | * outside your document root.
594 | * - Override the 'bootstrap_config_storage' setting here. It must be set to a
595 | * callable that returns an object that implements
596 | * \Drupal\Core\Config\StorageInterface.
597 | * - Override the service definition 'config.storage.active'. Put this
598 | * override in a services.yml file in the same directory as settings.php
599 | * (definitions in this file will override service definition defaults).
600 | */
601 | # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
602 |
603 | /**
604 | * Configuration overrides.
605 | *
606 | * To globally override specific configuration values for this site,
607 | * set them here. You usually don't need to use this feature. This is
608 | * useful in a configuration file for a vhost or directory, rather than
609 | * the default settings.php.
610 | *
611 | * Note that any values you provide in these variable overrides will not be
612 | * viewable from the Drupal administration interface. The administration
613 | * interface displays the values stored in configuration so that you can stage
614 | * changes to other environments that don't have the overrides.
615 | *
616 | * There are particular configuration values that are risky to override. For
617 | * example, overriding the list of installed modules in 'core.extension' is not
618 | * supported as module install or uninstall has not occurred. Other examples
619 | * include field storage configuration, because it has effects on database
620 | * structure, and 'core.menu.static_menu_link_overrides' since this is cached in
621 | * a way that is not config override aware. Also, note that changing
622 | * configuration values in settings.php will not fire any of the configuration
623 | * change events.
624 | */
625 | # $config['system.site']['name'] = 'My Drupal site';
626 | # $config['system.theme']['default'] = 'stark';
627 | # $config['user.settings']['anonymous'] = 'Visitor';
628 |
629 | /**
630 | * Fast 404 pages:
631 | *
632 | * Drupal can generate fully themed 404 pages. However, some of these responses
633 | * are for images or other resource files that are not displayed to the user.
634 | * This can waste bandwidth, and also generate server load.
635 | *
636 | * The options below return a simple, fast 404 page for URLs matching a
637 | * specific pattern:
638 | * - $config['system.performance']['fast_404']['exclude_paths']: A regular
639 | * expression to match paths to exclude, such as images generated by image
640 | * styles, or dynamically-resized images. The default pattern provided below
641 | * also excludes the private file system. If you need to add more paths, you
642 | * can add '|path' to the expression.
643 | * - $config['system.performance']['fast_404']['paths']: A regular expression to
644 | * match paths that should return a simple 404 page, rather than the fully
645 | * themed 404 page. If you don't have any aliases ending in htm or html you
646 | * can add '|s?html?' to the expression.
647 | * - $config['system.performance']['fast_404']['html']: The html to return for
648 | * simple 404 pages.
649 | *
650 | * Remove the leading hash signs if you would like to alter this functionality.
651 | */
652 | # $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';
653 | # $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
654 | # $config['system.performance']['fast_404']['html'] = '404 Not FoundNot Found
The requested URL "@path" was not found on this server.
';
655 |
656 | /**
657 | * Load services definition file.
658 | */
659 | $settings['container_yamls'][] = __DIR__ . '/services.yml';
660 |
661 | /**
662 | * Override the default service container class.
663 | *
664 | * This is useful for example to trace the service container for performance
665 | * tracking purposes, for testing a service container with an error condition or
666 | * to test a service container that throws an exception.
667 | */
668 | # $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container';
669 |
670 | /**
671 | * Trusted host configuration.
672 | *
673 | * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host
674 | * header spoofing.
675 | *
676 | * To enable the trusted host mechanism, you enable your allowable hosts
677 | * in $settings['trusted_host_patterns']. This should be an array of regular
678 | * expression patterns, without delimiters, representing the hosts you would
679 | * like to allow.
680 | *
681 | * For example:
682 | * @code
683 | * $settings['trusted_host_patterns'] = array(
684 | * '^www\.example\.com$',
685 | * );
686 | * @endcode
687 | * will allow the site to only run from www.example.com.
688 | *
689 | * If you are running multisite, or if you are running your site from
690 | * different domain names (eg, you don't redirect http://www.example.com to
691 | * http://example.com), you should specify all of the host patterns that are
692 | * allowed by your site.
693 | *
694 | * For example:
695 | * @code
696 | * $settings['trusted_host_patterns'] = array(
697 | * '^example\.com$',
698 | * '^.+\.example\.com$',
699 | * '^example\.org$',
700 | * '^.+\.example\.org$',
701 | * );
702 | * @endcode
703 | * will allow the site to run off of all variants of example.com and
704 | * example.org, with all subdomains included.
705 | */
706 |
707 | /**
708 | * Load local development override configuration, if available.
709 | *
710 | * Use settings.local.php to override variables on secondary (staging,
711 | * development, etc) installations of this site. Typically used to disable
712 | * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
713 | * other things that should not happen on development and testing sites.
714 | *
715 | * Keep this code block at the end of this file to take full effect.
716 | */
717 | if (file_exists(__DIR__ . '/settings.local.php')) {
718 | include __DIR__ . '/settings.local.php';
719 | }
720 | $settings['install_profile'] = 'react';
721 |
--------------------------------------------------------------------------------
/web/sites/development.services.yml:
--------------------------------------------------------------------------------
1 | # Local development services.
2 | #
3 | # To activate this feature, follow the instructions at the top of the
4 | # 'example.settings.local.php' file, which sits next to this file.
5 | services:
6 | cache.backend.null:
7 | class: Drupal\Core\Cache\NullBackendFactory
8 |
--------------------------------------------------------------------------------
/web/sites/example.settings.local.php:
--------------------------------------------------------------------------------
1 | ..' => 'directory'. As an
24 | * example, to map https://www.drupal.org:8080/mysite/test to the configuration
25 | * directory sites/example.com, the array should be defined as:
26 | * @code
27 | * $sites = array(
28 | * '8080.www.drupal.org.mysite.test' => 'example.com',
29 | * );
30 | * @endcode
31 | * The URL, https://www.drupal.org:8080/mysite/test/, could be a symbolic link
32 | * or an Apache Alias directive that points to the Drupal root containing
33 | * index.php. An alias could also be created for a subdomain. See the
34 | * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink
35 | * for more information on setting up domains, subdomains, and subdirectories.
36 | *
37 | * The following examples look for a site configuration in sites/example.com:
38 | * @code
39 | * URL: http://dev.drupal.org
40 | * $sites['dev.drupal.org'] = 'example.com';
41 | *
42 | * URL: http://localhost/example
43 | * $sites['localhost.example'] = 'example.com';
44 | *
45 | * URL: http://localhost:8080/example
46 | * $sites['8080.localhost.example'] = 'example.com';
47 | *
48 | * URL: https://www.drupal.org:8080/mysite/test/
49 | * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
50 | * @endcode
51 | *
52 | * @see default.settings.php
53 | * @see \Drupal\Core\DrupalKernel::getSitePath()
54 | * @see https://www.drupal.org/documentation/install/multi-site
55 | */
56 |
--------------------------------------------------------------------------------
/web/sites/template.settings.local.php:
--------------------------------------------------------------------------------
1 | '{MYSQL_DATABASE}',
115 | 'username' => '{MYSQL_USER}',
116 | 'password' => '{MYSQL_PASSWORD}',
117 | 'prefix' => '',
118 | 'host' => 'database-host',
119 | 'port' => '',
120 | 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
121 | 'driver' => 'mysql',
122 | );
123 |
124 | $settings['install_profile'] = 'standard';
125 |
--------------------------------------------------------------------------------
/web/themes/custom/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TallerWebSolutions/drupal-react-boilerplate/471f0791d7db3f9a843361245b86feec3118d092/web/themes/custom/.gitkeep
--------------------------------------------------------------------------------
/web/themes/custom/spa/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "es2015",
4 | "babel-polyfill",
5 | "stage-0",
6 | "react"
7 | ],
8 | "plugins": [
9 | "transform-runtime",
10 | "transform-decorators-legacy",
11 | "transform-es3-property-literals",
12 | "transform-es3-member-expression-literals"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | extends: ["taller/react"],
3 | globals: {
4 | drupalSettings: false
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/.gitignore:
--------------------------------------------------------------------------------
1 | # ===============================================
2 | # Dependencies ----------------------------------
3 | # ===============================================
4 |
5 | node_modules
6 |
7 |
8 | # ===============================================
9 | # Builder files ---------------------------------
10 | # ===============================================
11 |
12 | dist
13 |
14 |
15 | # ===============================================
16 | # Debug files -----------------------------------
17 | # ===============================================
18 |
19 | npm-debug.log
20 | selenium-debug.log
21 |
22 |
23 | # ===============================================
24 | # Test results ----------------------------------
25 | # ===============================================
26 |
27 | tests/results
28 | tests_output
29 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/README.md:
--------------------------------------------------------------------------------
1 | # SPA Theme
2 |
3 | Drupal theme responsible to serve the React application.
4 |
5 | ## What do we have here
6 |
7 | We try not to be much opinionated on the React toolset to use. Therefore, the default app is as simple as any hello world application can be. There are, though, a couple of decisions we made beforehand:
8 |
9 | 1. We use [CSS Modules](https://github.com/css-modules/css-modules) for styles.
10 | 1. We use [Webpack](https://webpack.github.io/) for bundling.
11 | 1. We use [Storybook](https://getstorybook.io/) for component showcase.
12 | 1. We use [Jest](http://facebook.github.io/jest/) for unit tests.
13 | 1. We use [Nightwatch](http://nightwatchjs.org/) for e2e tests (with Selenium).
14 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/html.html.twig:
--------------------------------------------------------------------------------
1 | {#
2 | /**
3 | * @file
4 | * Theme override for the basic structure of a single Drupal page.
5 | *
6 | * Variables:
7 | * - logged_in: A flag indicating if user is logged in.
8 | * - root_path: The root path of the current page (e.g., node, admin, user).
9 | * - node_type: The content type for the current node, if the page is a node.
10 | * - head_title: List of text elements that make up the head_title variable.
11 | * May contain or more of the following:
12 | * - title: The title of the page.
13 | * - name: The name of the site.
14 | * - slogan: The slogan of the site.
15 | * - page_top: Initial rendered markup. This should be printed before 'page'.
16 | * - page: The rendered page markup.
17 | * - page_bottom: Closing rendered markup. This variable should be printed after
18 | * 'page'.
19 | * - db_offline: A flag indicating if the database is offline.
20 | * - placeholder_token: The token for generating head, css, js and js-bottom
21 | * placeholders.
22 | *
23 | * @see template_preprocess_html()
24 | */
25 | #}
26 |
27 |
28 |
29 |
30 | {{ head_title|safe_join(' | ') }}
31 |
32 |
33 |
34 |
35 |
36 |
37 | {{ page }}
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/jest.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "automock": true,
3 | "testRegex": "/__tests__/.*\\.(js|jsx)$",
4 | "unmockedModulePathPatterns": [
5 | "react",
6 | "react-dom",
7 | "react-addons-test-utils",
8 | "enzyme",
9 | "babel-runtime"
10 | ],
11 | "moduleNameMapper": {
12 | "^app/(.*)": "/src/$1",
13 | "^.+\\.(css)$": "identity-obj-proxy"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/nightwatch.conf.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable quote-props */
2 | const hostname = process.env.LAUNCH_URL || require('shelljs').exec('hostname -i', { silent: true }).replace(/^\s+|\s+$/g, '')
3 |
4 | module.exports = {
5 | 'src_folders': ['tests/e2e'],
6 | 'output_folder': 'tests/results',
7 | 'custom_commands_path': '',
8 | 'custom_assertions_path': '',
9 | 'page_objects_path': 'tests/e2e/pages',
10 | 'globals_path': '',
11 |
12 | 'selenium': {
13 | 'start_process': false,
14 | 'host': 'selenium',
15 | 'port': 4444
16 | },
17 |
18 | 'live_output': true,
19 |
20 | 'test_workers': {
21 | 'enabled': true,
22 | 'workers': 'auto'
23 | },
24 |
25 | 'test_settings': {
26 | 'default': {
27 | 'filter': '**/*.test.js',
28 | 'launch_url': `http://${hostname}/app`,
29 | 'selenium_port': 4444,
30 | 'selenium_host': 'selenium',
31 |
32 | 'screenshots': {
33 | 'enabled': true,
34 | 'on_failure': true,
35 | 'on_error': true,
36 | 'path': 'tests_output/screenshots'
37 | },
38 |
39 | 'silent': true,
40 |
41 | 'globals': {
42 | 'waitForConditionTimeout': 3000
43 | },
44 |
45 | 'desiredCapabilities': {
46 | 'browserName': 'chrome',
47 | 'javascriptEnabled': true,
48 | 'acceptSslCerts': true
49 | }
50 | }
51 | }
52 | }
53 |
54 | if (process.env.REAL_BROWSER) {
55 | module.exports.selenium = {
56 | 'start_process': true,
57 | 'server_path': 'node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-3.0.1.jar',
58 | 'log_path': '',
59 | 'host': '127.0.0.1',
60 | 'port': 4444,
61 | 'cli_args': {
62 | 'webdriver.chrome.driver': 'node_modules/chromedriver/lib/chromedriver/chromedriver',
63 | 'webdriver.ie.driver': ''
64 | }
65 | }
66 |
67 | module.exports.test_settings.default.selenium_host = 'localhost'
68 | }
69 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-spa-theme",
3 | "version": "0.1.0",
4 | "description": "React single page application theme.",
5 | "main": "dist/index.js",
6 | "scripts": {
7 | "clean": "rm -Rf dist/",
8 | "build": "npm run clean && webpack",
9 | "watch": "npm run clean && webpack --watch",
10 | "lint": "eslint .",
11 | "test": "npm run test:unit && npm run test:e2e",
12 | "test:unit": "jest --config jest.config.json --verbose --no-cache",
13 | "test:unit:watch": "jest --config jest.config.json --watch --verbose --no-cache",
14 | "test:e2e": "NODE_ENV=test nightwatch",
15 | "test:e2e:debug": "NODE_ENV=test REAL_BROWSER=true nightwatch",
16 | "install": "npm run build",
17 | "prepush": "npm run lint && npm run test:unit",
18 | "storybook": "cd storybook && start-storybook -p 6006"
19 | },
20 | "devDependencies": {
21 | "@kadira/storybook": "^2.29.3",
22 | "@kadira/storybook-addon-knobs": "^1.5.0",
23 | "autoprefixer": "^6.5.2",
24 | "babel-core": "^6.18.2",
25 | "babel-loader": "^6.2.7",
26 | "babel-plugin-transform-decorators-legacy": "^1.3.4",
27 | "babel-plugin-transform-es3-member-expression-literals": "^6.8.0",
28 | "babel-plugin-transform-es3-property-literals": "^6.8.0",
29 | "babel-plugin-transform-runtime": "^6.15.0",
30 | "babel-polyfill": "^6.16.0",
31 | "babel-preset-es2015": "^6.18.0",
32 | "babel-preset-react": "^6.16.0",
33 | "babel-preset-stage-0": "^6.16.0",
34 | "chromedriver": "^2.25.1",
35 | "css-loader": "^0.25.0",
36 | "enzyme": "^2.5.1",
37 | "eslint": "^3.9.1",
38 | "eslint-config-taller": "^1.0.3",
39 | "extract-text-webpack-plugin": "^1.0.1",
40 | "husky": "^0.11.9",
41 | "identity-obj-proxy": "^3.0.0",
42 | "jest": "^16.0.2",
43 | "nightwatch": "^0.9.8",
44 | "postcss-loader": "^1.1.0",
45 | "postcss-nested": "^1.0.0",
46 | "react-addons-test-utils": "^15.3.2",
47 | "react-storybook-addon-backgrounds": "^0.0.7",
48 | "selenium-server-standalone-jar": "^3.0.1",
49 | "shelljs": "^0.7.5",
50 | "storybook-addon-smart-knobs": "^0.2.0",
51 | "style-loader": "^0.13.1",
52 | "webpack": "^1.13.3"
53 | },
54 | "dependencies": {
55 | "react": "^15.3.2",
56 | "react-dom": "^15.3.2"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('postcss-nested'),
4 | require('autoprefixer')({ browsers: ['> 1%', 'last 4 versions', 'Firefox ESR'] })
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TallerWebSolutions/drupal-react-boilerplate/471f0791d7db3f9a843361245b86feec3118d092/web/themes/custom/spa/screenshot.png
--------------------------------------------------------------------------------
/web/themes/custom/spa/spa.info.yml:
--------------------------------------------------------------------------------
1 | name: React SPA
2 | type: theme
3 | description: React single page application theme.
4 | core: 8.x
5 | libraries:
6 | - spa/main
7 | regions:
8 | content: Content
9 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/spa.libraries.yml:
--------------------------------------------------------------------------------
1 | main:
2 | version: 1.x
3 | js:
4 | dist/index.js: {}
5 | css:
6 | theme:
7 | dist/index.css: {}
8 | dependencies:
9 | - core/drupalSettings
10 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/spa.theme:
--------------------------------------------------------------------------------
1 | Hello world! { this.props.children }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/src/components/Application.story.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@kadira/storybook'
3 | import { withKnobs } from '@kadira/storybook-addon-knobs'
4 | import { withSmartKnobs } from 'storybook-addon-smart-knobs'
5 |
6 | import Application from './Application'
7 |
8 | storiesOf('Application')
9 | .addDecorator(withSmartKnobs)
10 | .addDecorator(withKnobs)
11 | .add('sample story', () => )
12 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/src/components/__tests__/Application.js:
--------------------------------------------------------------------------------
1 | jest.unmock('../Application')
2 |
3 | import React from 'react'
4 | import { mount } from 'enzyme'
5 |
6 | import Application from '../Application'
7 |
8 | describe('[Component] Application', () => {
9 | it('should show "Hello world!"', () => {
10 | const ApplicationWrapper = mount()
11 | expect(ApplicationWrapper.text()).toContain('Hello world!')
12 | })
13 | })
14 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom'
3 |
4 | import Application from './components/Application'
5 |
6 | // ========================================================
7 | // Bootstrap
8 | // ========================================================
9 |
10 | ReactDOM.render(, document.getElementById('wrapper-app'))
11 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/storybook/.storybook/addons.js:
--------------------------------------------------------------------------------
1 | import '@kadira/storybook/addons'
2 | import '@kadira/storybook-addon-knobs/register'
3 | import 'react-storybook-addon-backgrounds/register'
4 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/storybook/.storybook/config.js:
--------------------------------------------------------------------------------
1 | import { configure, addDecorator } from '@kadira/storybook'
2 | import backgrounds from 'react-storybook-addon-backgrounds'
3 |
4 | addDecorator(backgrounds([
5 | { name: 'white', value: 'white', default: true },
6 | { name: 'alabaster', value: '#F9F9F9' },
7 | { name: 'eminence', value: '#6E2B78' },
8 | { name: 'tuna', value: '#343343' },
9 | { name: 'scarpa-flow', value: '#4D4C51' },
10 | ]))
11 |
12 | function loadStories () {
13 | require('../stories')
14 | }
15 |
16 | configure(loadStories, module)
17 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/storybook/.storybook/webpack.config.js:
--------------------------------------------------------------------------------
1 | // you can use this file to add your custom webpack plugins, loaders and anything you like.
2 | // This is just the basic way to add addional webpack configurations.
3 | // For more information refer the docs: https://goo.gl/qPbSyX
4 |
5 | // IMPORTANT
6 | // When you add this file, we won't add the default configurations which is similar
7 | // to "React Create App". This only has babel loader to load JavaScript.
8 |
9 | module.exports = require('../../webpack.config.js')
10 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/storybook/stories/index.js:
--------------------------------------------------------------------------------
1 | // Find all component stories by file pattern '*.story.js'.
2 | // @ref: https://getstorybook.io/docs/basics/writing-stories#loading-stories-dynamically
3 | const _require = require.context('../../src', true, /.*\.story\.js/)
4 | _require.keys().forEach(_require)
5 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/tests/e2e/main.test.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = {
3 | '@tags': ['smoke'],
4 |
5 | 'Should render app' (client) {
6 | const page = client.page.home()
7 |
8 | page.navigate()
9 | .waitForElementVisible('@HelloWorld')
10 | .assert.containsText('@HelloWorld', 'Hello world!')
11 |
12 | client.end()
13 | },
14 | }
15 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/tests/e2e/pages/home.js:
--------------------------------------------------------------------------------
1 |
2 | const elements = {
3 | HelloWorld: '.src-components-Application__hello'
4 | }
5 |
6 | module.exports = {
7 | elements,
8 | // commands,
9 |
10 | url () {
11 | return this.api.launchUrl
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/web/themes/custom/spa/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 | const webpack = require('webpack')
3 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
4 |
5 | const env = process.env.NODE_ENV || 'development'
6 |
7 | const config = {
8 | devtool: 'source-map',
9 |
10 | entry: {
11 | index: path.resolve(__dirname, 'src/index.js')
12 | },
13 |
14 | output: {
15 | path: path.resolve(__dirname, 'dist'),
16 | filename: '[name].js',
17 | chunkFilename: '[name].[id].[chunkhash].js',
18 | publicPath: '/themes/custom/spa/dist/'
19 | },
20 |
21 | resolve: {
22 | alias: {
23 | app: path.resolve(__dirname, 'src')
24 | },
25 | },
26 |
27 | module: {
28 | loaders: [
29 | { test: /\.html$/, loader: 'html' },
30 | { test: /\.json$/, loader: 'json' },
31 | { test: /\.js$/, loader: 'babel', exclude: /node_modules/, include: __dirname },
32 | { test: /\.css?$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[path][name]__[local]!postcss-loader') },
33 | { test: /\.gif(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=image/gif' },
34 | { test: /\.png(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=image/png' },
35 | { test: /\.jpg(\?.*)?$/, loader: 'url-loader?limit=10000&minetype=image/jpg' },
36 | { test: /\.svg(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=image/svg+xml' },
37 | { test: /\.woff(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' },
38 | { test: /\.woff2(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' },
39 | { test: /\.ttf(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=application/octet-stream' },
40 | { test: /\.eot(\?.*)?$/, loader: 'url-loader?limit=10000&mimetype=application/vnd.ms-fontobject' },
41 | ],
42 | },
43 |
44 | plugins: [
45 | new ExtractTextPlugin('[name].css', {
46 | allChunks: true,
47 | ignoreOrder: true,
48 | disable: env !== 'production'
49 | }),
50 | new webpack.DefinePlugin({
51 | __DEV__: env === 'development',
52 | __PRODUCTION__: env === 'production',
53 | }),
54 | ],
55 | }
56 |
57 | if (env === 'production') {
58 | config.plugins.push(new webpack.optimize.DedupePlugin())
59 | }
60 |
61 | module.exports = config
62 |
--------------------------------------------------------------------------------
/web/update.php:
--------------------------------------------------------------------------------
1 | handle($request);
20 | $response->send();
21 |
22 | $kernel->terminate($request, $response);
23 |
--------------------------------------------------------------------------------
/web/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
48 |
51 |
60 |
61 |
64 |
73 |
74 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------