-
Notifications
You must be signed in to change notification settings - Fork 12
/
crafty-preset-postcss-webpack.js.snap
212 lines (185 loc) · 17.3 KB
/
crafty-preset-postcss-webpack.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Compiles CSS within webpack 1`] = `
Object {
"status": 0,
"stdall": "
[__:__:__] Starting Crafty __version__...
[__:__:__] Files will be stored in:
css: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/compiles/dist/css
js: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/compiles/dist/js
[__:__:__] Starting 'default' ...
[__:__:__] Starting 'js' ...
[__:__:__] Starting 'js_myBundle' ...
postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
asset myBundle.min.js ___ KiB [emitted] [minimized] (name: default)
sourceMap myBundle.min.js.map ___ KiB [emitted] [dev] (auxiliary name: default)
Entrypoint default ___ KiB (___ KiB) = myBundle.min.js 1 auxiliary asset
chunk (runtime: default) myBundle.min.js (default) ___ KiB (javascript) ___ bytes (runtime) [entry] [rendered]
runtime modules ___ bytes 4 modules
dependent modules ___ KiB [dependent] 3 modules
./js/app.js + 2 modules ___ bytes [built] [code generated]
Compiled successfully!
Δt ____ms
[__:__:__] Finished 'js_myBundle' after ____ ms
[__:__:__] Finished 'js' after ____ ms
[__:__:__] Finished 'default' after ____ ms
",
}
`;
exports[`Compiles CSS within webpack 2`] = `
"(function(e,n){if(\\"object\\"===typeof exports&&\\"object\\"===typeof module)module.exports=n();else if(\\"function\\"===typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)(\\"object\\"===typeof exports?exports:e)[r]=t[r]}})(self,(function(){return function(){\\"use strict\\";var e={396:function(e,n,t){function r(e,n){if(!(e instanceof n))throw new TypeError(\\"Cannot call a class as a function\\")}t.r(n),t.d(n,{default:function(){return u}});var o=t(191);var a=/*#__PURE__*/t.n(o);var i=t(241);var c={};c.insert=\\"head\\",c.singleton=!1;a()(i.Z,c);i.Z.locals;var u=function e(){r(this,e)}},241:function(e,n,t){var r=t(70);var o=/*#__PURE__*/t.n(r);var a=o()((function(e){return e[1]}));a.push([e.id,\\"a{color:#00f}.Child{background:#000}.Parent{background:#fff}.Parent--before{color:#333}.Parent--after{color:#eee}.Button{color:orange}.Menu{width:800px}.MenuLink{color:red;background:#056ef0;width:200px}\\",\\"\\"]),n.Z=a},70:function(e){e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=e(n);if(n[2])return\\"@media \\".concat(n[2],\\" {\\").concat(t,\\"}\\");return t})).join(\\"\\")},n.i=function(e,t,r){\\"string\\"===typeof e&&(e=[[null,e,\\"\\"]]);var o={};if(r)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);if(r&&o[u[0]])continue;t&&(u[2]?u[2]=\\"\\".concat(t,\\" and \\").concat(u[2]):u[2]=t),n.push(u)}},n}},191:function(e,n,t){var r=function(){var e;return function(){return\\"undefined\\"===typeof e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}();var o=function(){var e={};return function(n){if(\\"undefined\\"===typeof e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}();var a=[];function i(e){var n=-1;for(var t=0;t<a.length;t++)if(a[t].identifier===e){n=t;break}return n}function c(e,n){var t={};var r=[];for(var o=0;o<e.length;o++){var c=e[o];var u=n.base?c[0]+n.base:c[0];var f=t[u]||0;var s=\\"\\".concat(u,\\" \\").concat(f);t[u]=f+1;var l=i(s);var d={css:c[1],media:c[2],sourceMap:c[3]};-1!==l?(a[l].references++,a[l].updater(d)):a.push({identifier:s,updater:h(d,n),references:1}),r.push(s)}return r}function u(e){var n=document.createElement(\\"style\\");var r=e.attributes||{};if(\\"undefined\\"===typeof r.nonce){var a=t.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){n.setAttribute(e,r[e])})),\\"function\\"===typeof e.insert)e.insert(n);else{var i=o(e.insert||\\"head\\");if(!i)throw new Error(\\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\\");i.appendChild(n)}return n}function f(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}var s=function(){var e=[];return function(n,t){return e[n]=t,e.filter(Boolean).join(\\"\\\\n\\")}}();function l(e,n,t,r){var o=t?\\"\\":r.media?\\"@media \\".concat(r.media,\\" {\\").concat(r.css,\\"}\\"):r.css;if(e.styleSheet)e.styleSheet.cssText=s(n,o);else{var a=document.createTextNode(o);var i=e.childNodes;i[n]&&e.removeChild(i[n]),i.length?e.insertBefore(a,i[n]):e.appendChild(a)}}function d(e,n,t){var r=t.css;var o=t.media;var a=t.sourceMap;if(o?e.setAttribute(\\"media\\",o):e.removeAttribute(\\"media\\"),a&&\\"undefined\\"!==typeof btoa&&(r+=\\"\\\\n/*# sourceMappingURL=data:application/json;base64,\\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a)))),\\" */\\")),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var v=null;var p=0;function h(e,n){var t;var r;var o;if(n.singleton){var a=p++;t=v||(v=u(n)),r=l.bind(null,t,a,!1),o=l.bind(null,t,a,!0)}else t=u(n),r=d.bind(null,t,n),o=function(){f(t)};return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else o()}}e.exports=function(e,n){n=n||{},n.singleton||\\"boolean\\"===typeof n.singleton||(n.singleton=r()),e=e||[];var t=c(e,n);return function(e){if(e=e||[],\\"[object Array]\\"!==Object.prototype.toString.call(e))return;for(var r=0;r<t.length;r++){var o=t[r];var u=i(o);a[u].references--}var f=c(e,n);for(var s=0;s<t.length;s++){var l=t[s];var d=i(l);0===a[d].references&&(a[d].updater(),a.splice(d,1))}t=f}}}};var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={id:r,exports:{}};return e[r](o,o.exports,t),o.exports}return t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.r=function(e){\\"undefined\\"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},t(396)}()}));
//# sourceMappingURL=myBundle.min.js.map"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' boolean option) 1`] = `
Object {
"status": 0,
"stdall": "
[__:__:__] Starting Crafty __version__...
[__:__:__] Files will be stored in:
css: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-boolean/dist/css
js: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-boolean/dist/js
[__:__:__] Starting 'default' ...
[__:__:__] Starting 'js' ...
[__:__:__] Starting 'js_myBundle' ...
postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
asset myBundle.min.js ___ bytes [emitted] [minimized] (name: default)
sourceMap myBundle.min.js.map ___ KiB [emitted] [dev] (auxiliary name: default)
asset myBundle-default.min.css ___ bytes [emitted] (name: default)
sourceMap myBundle-default.min.css.map ___ KiB [emitted] [dev] (auxiliary name: default)
Entrypoint default ___ KiB (___ KiB) = myBundle-default.min.css ___ bytes myBundle.min.js ___ bytes 2 auxiliary assets
chunk (runtime: default) myBundle-default.min.css, myBundle.min.js (default) ___ bytes (javascript) ___ bytes (css/mini-extract) ___ bytes (runtime) [entry] [rendered]
runtime modules ___ bytes 3 modules
code generated modules ___ bytes (javascript) ___ bytes (css/mini-extract) [code generated]
./js/app.js + 1 modules ___ bytes [built] [code generated]
css ../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../crafty-preset-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./css/style.scss ___ bytes [code generated]
Compiled successfully!
Δt ____ms
[__:__:__] Finished 'js_myBundle' after ____ ms
[__:__:__] Finished 'js' after ____ ms
[__:__:__] Finished 'default' after ____ ms
",
}
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' boolean option) 2`] = `
"(function(e,t){if(\\"object\\"===typeof exports&&\\"object\\"===typeof module)module.exports=t();else if(\\"function\\"===typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)(\\"object\\"===typeof exports?exports:e)[n]=o[n]}})(self,(function(){return function(){\\"use strict\\";var e={185:function(e,t,o){function n(e,t){if(!(e instanceof t))throw new TypeError(\\"Cannot call a class as a function\\")}o.r(t),o.d(t,{default:function(){return r}});var r=function e(){n(this,e)}}};var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}return o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){\\"undefined\\"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},o(185)}()}));
//# sourceMappingURL=myBundle.min.js.map"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' boolean option) 3`] = `
"a{color:#00f}.Child{background:#000}.Parent{background:#fff}.Parent--before{color:#333}.Parent--after{color:#eee}.Button{color:orange}.Menu{width:800px}.MenuLink{color:red;background:#056ef0;width:200px}
/*# sourceMappingURL=myBundle-default.min.css.map*/"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' object option) 1`] = `
Object {
"status": 0,
"stdall": "
[__:__:__] Starting Crafty __version__...
[__:__:__] Files will be stored in:
css: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-object/dist/css
js: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-object/dist/js
[__:__:__] Starting 'default' ...
[__:__:__] Starting 'js' ...
[__:__:__] Starting 'js_myBundle' ...
postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
asset myBundle.min.js ___ bytes [emitted] [minimized] (name: default)
sourceMap myBundle.min.js.map ___ KiB [emitted] [dev] (auxiliary name: default)
asset myBundle-object.min.css ___ bytes [emitted] (name: default)
sourceMap myBundle-object.min.css.map ___ KiB [emitted] [dev] (auxiliary name: default)
Entrypoint default ___ KiB (___ KiB) = myBundle-object.min.css ___ bytes myBundle.min.js ___ bytes 2 auxiliary assets
chunk (runtime: default) myBundle-object.min.css, myBundle.min.js (default) ___ bytes (javascript) ___ bytes (css/mini-extract) ___ bytes (runtime) [entry] [rendered]
runtime modules ___ bytes 3 modules
code generated modules ___ bytes (javascript) ___ bytes (css/mini-extract) [code generated]
./js/app.js + 1 modules ___ bytes [built] [code generated]
css ../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../crafty-preset-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./css/style.scss ___ bytes [code generated]
Compiled successfully!
Δt ____ms
[__:__:__] Finished 'js_myBundle' after ____ ms
[__:__:__] Finished 'js' after ____ ms
[__:__:__] Finished 'default' after ____ ms
",
}
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' object option) 2`] = `
"(function(e,t){if(\\"object\\"===typeof exports&&\\"object\\"===typeof module)module.exports=t();else if(\\"function\\"===typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)(\\"object\\"===typeof exports?exports:e)[n]=o[n]}})(self,(function(){return function(){\\"use strict\\";var e={185:function(e,t,o){function n(e,t){if(!(e instanceof t))throw new TypeError(\\"Cannot call a class as a function\\")}o.r(t),o.d(t,{default:function(){return r}});var r=function e(){n(this,e)}}};var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}return o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){\\"undefined\\"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},o(185)}()}));
//# sourceMappingURL=myBundle.min.js.map"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' object option) 3`] = `
"a{color:#00f}.Child{background:#000}.Parent{background:#fff}.Parent--before{color:#333}.Parent--after{color:#eee}.Button{color:orange}.Menu{width:800px}.MenuLink{color:red;background:#056ef0;width:200px}
/*# sourceMappingURL=myBundle-object.min.css.map*/"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' string option) 1`] = `
Object {
"status": 0,
"stdall": "
[__:__:__] Starting Crafty __version__...
[__:__:__] Files will be stored in:
css: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-string/dist/css
js: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/extract-string/dist/js
[__:__:__] Starting 'default' ...
[__:__:__] Starting 'js' ...
[__:__:__] Starting 'js_myBundle' ...
postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
asset myBundle.min.js ___ bytes [emitted] [minimized] (name: default)
sourceMap myBundle.min.js.map ___ KiB [emitted] [dev] (auxiliary name: default)
asset myBundle-string.min.css ___ bytes [emitted] (name: default)
sourceMap myBundle-string.min.css.map ___ KiB [emitted] [dev] (auxiliary name: default)
Entrypoint default ___ KiB (___ KiB) = myBundle-string.min.css ___ bytes myBundle.min.js ___ bytes 2 auxiliary assets
chunk (runtime: default) myBundle-string.min.css, myBundle.min.js (default) ___ bytes (javascript) ___ bytes (css/mini-extract) ___ bytes (runtime) [entry] [rendered]
runtime modules ___ bytes 3 modules
code generated modules ___ bytes (javascript) ___ bytes (css/mini-extract) [code generated]
./js/app.js + 1 modules ___ bytes [built] [code generated]
css ../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../crafty-preset-postcss/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./css/style.scss ___ bytes [code generated]
Compiled successfully!
Δt ____ms
[__:__:__] Finished 'js_myBundle' after ____ ms
[__:__:__] Finished 'js' after ____ ms
[__:__:__] Finished 'default' after ____ ms
",
}
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' string option) 2`] = `
"(function(e,t){if(\\"object\\"===typeof exports&&\\"object\\"===typeof module)module.exports=t();else if(\\"function\\"===typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)(\\"object\\"===typeof exports?exports:e)[n]=o[n]}})(self,(function(){return function(){\\"use strict\\";var e={185:function(e,t,o){function n(e,t){if(!(e instanceof t))throw new TypeError(\\"Cannot call a class as a function\\")}o.r(t),o.d(t,{default:function(){return r}});var r=function e(){n(this,e)}}};var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,o),r.exports}return o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){\\"undefined\\"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},o(185)}()}));
//# sourceMappingURL=myBundle.min.js.map"
`;
exports[`Compiles CSS within webpack, extracts CSS ('extractCSS' string option) 3`] = `
"a{color:#00f}.Child{background:#000}.Parent{background:#fff}.Parent--before{color:#333}.Parent--after{color:#eee}.Button{color:orange}.Menu{width:800px}.MenuLink{color:red;background:#056ef0;width:200px}
/*# sourceMappingURL=myBundle-string.min.css.map*/"
`;
exports[`Fails gracefully on broken markup 1`] = `
Object {
"status": 1,
"stdall": "
[__:__:__] Starting Crafty __version__...
[__:__:__] Files will be stored in:
css: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/fails/dist/css
js: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/fails/dist/js
[__:__:__] Starting 'default' ...
[__:__:__] Starting 'js' ...
[__:__:__] Starting 'js_myBundle' ...
postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
assets by status ___ KiB [cached] 1 asset
Entrypoint default = myBundle.min.js 1 auxiliary asset
chunk (runtime: default) myBundle.min.js (default) ___ KiB (javascript) ___ bytes (runtime) [entry] [rendered]
runtime modules ___ bytes 4 modules
dependent modules ___ KiB [dependent] 2 modules
./js/app.js + 2 modules ___ bytes [built] [code generated] [1 error]
Failed to compile.
Syntax error: __PATH__/packages/integration/fixtures/crafty-preset-postcss-webpack/fails/css/style.scss Unknown word (10:13)
8 | @at-root {
9 | .Child
> 10 | background: black;
| ^
11 | }
12 | }
Δt ____ms ✖ 1 problem (1 error, 0 warnings)
[__:__:__] 'js_myBundle' errored after ____ ms
[__:__:__] Webpack compilation failed
[__:__:__] 'js' errored after ____ ms
[__:__:__] 'default' errored after ____ ms
",
}
`;