@kaliber/build 0.0.120 → 0.0.123

Sign up to get free protection for your applications and to get access to all the features.
package/lib/build.js CHANGED
@@ -284,9 +284,11 @@ module.exports = function build({ watch }) {
284
284
  },
285
285
 
286
286
  {
287
- test: /\.css$/,
287
+ resource: {
288
+ test: /\.css$/,
289
+ or: [{ exclude: /node_modules/ }, ...compileWithBabel],
290
+ },
288
291
  loaders: ['json-loader', cssLoader],
289
- exclude: /node_modules/
290
292
  },
291
293
 
292
294
  {
package/lib/serve.js CHANGED
@@ -8,7 +8,7 @@ const morgan = require('morgan')
8
8
 
9
9
  const templateRenderers = require('./getTemplateRenderers')
10
10
 
11
- const { kaliber: { serveMiddleware, helmetOptions, publicPath = '/' } = {} } = require('@kaliber/config')
11
+ const { kaliber: { serveMiddleware, helmetOptions, publicPath = '/', reportError } = {} } = require('@kaliber/config')
12
12
 
13
13
  const recognizedTemplates = Object.keys(templateRenderers)
14
14
  const blockedTemplateFiles = recognizedTemplates.reduce(
@@ -59,6 +59,8 @@ app.use((err, req, res, next) => {
59
59
  if (!err) return next()
60
60
 
61
61
  console.error(err)
62
+ if (reportError) reportError(err)
63
+
62
64
  const response = res.status(500)
63
65
  if (isProduction) {
64
66
  findFile(req.path, internalServerError)
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.120",
2
+ "version": "0.0.123",
3
3
  "name": "@kaliber/build",
4
4
  "description": "Zero configuration, opinionated webpack / react build setup",
5
5
  "scripts": {
@@ -4,7 +4,7 @@ const {
4
4
  withRootRules, withNestedRules,
5
5
  isPseudoElement,
6
6
  } = require('../../machinery/ast')
7
- const { flexChildProps, gridChildProps } = require('../../machinery/css')
7
+ const { flexChildProps, gridChildProps, flexOrGridChildProps } = require('../../machinery/css')
8
8
 
9
9
  const intrinsicUnits = ['px', 'em', 'rem', 'vw', 'vh']
10
10
  const intrinsicProps = ['width', 'height', 'max-width', 'min-width', 'max-height', 'min-height']
@@ -25,6 +25,7 @@ const layoutRelatedProps = [ // only allowed in child
25
25
  'justify-self', 'align-self',
26
26
  ...flexChildProps,
27
27
  ...gridChildProps,
28
+ ...flexOrGridChildProps,
28
29
  ...allowedInRootAndChild,
29
30
  ]
30
31
  const layoutRelatedPropsWithValues = extractPropsWithValues(layoutRelatedProps)
@@ -36,9 +37,9 @@ const messages = {
36
37
  `move to a nested selector in a another root rule, if you are forced by a third party ` +
37
38
  `library, you can rename your selector to \`_rootXyz\` or \`component_rootXyz\`` + (
38
39
  intrinsicProps.includes(prop)
39
- ? `\nif you are trying to define an intrinsic ${prop}, make sure you set the unit to ` +
40
+ ? `\nif you are trying to define an intrinsic ${prop}, make sure you set the unit to ` +
40
41
  `one of \`${intrinsicUnits.join('`, `')}\` and add \`!important\``
41
- : ''
42
+ : ''
42
43
  ),
43
44
  'nested - only layout related props in nested': prop =>
44
45
  `illegal non-layout related prop\n` +
@@ -127,6 +127,7 @@ Examples of *correct* code for this rule:
127
127
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
128
128
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
129
129
  justify-self: 0; align-self: 0;
130
+ order: 0;
130
131
  }
131
132
  }
132
133
  ```
@@ -143,6 +144,7 @@ Examples of *incorrect* code for this rule:
143
144
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
144
145
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
145
146
  justify-self: 0; align-self: 0;
147
+ order: 0;
146
148
  max-width: 0; min-width: 0; max-height: 0; min-height: 0;
147
149
  }
148
150
  ```
@@ -19,6 +19,7 @@ test('layout-related-properties', {
19
19
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
20
20
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
21
21
  justify-self: 0; align-self: 0;
22
+ order: 0;
22
23
  }
23
24
  }
24
25
  `,
@@ -101,6 +102,7 @@ test('layout-related-properties', {
101
102
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
102
103
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
103
104
  justify-self: 0; align-self: 0;
105
+ order: 0;
104
106
  max-width: 0; min-width: 0; max-height: 0; min-height: 0;
105
107
  }
106
108
  `,
@@ -113,6 +115,7 @@ test('layout-related-properties', {
113
115
  'grid', 'grid-area', 'grid-column', 'grid-row',
114
116
  'grid-column-start', 'grid-column-end', 'grid-row-start', 'grid-row-end',
115
117
  'justify-self', 'align-self',
118
+ 'order',
116
119
  'max-width', 'min-width', 'max-height', 'min-height',
117
120
  ])
118
121
  },
@@ -133,6 +136,7 @@ test('layout-related-properties', {
133
136
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
134
137
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
135
138
  justify-self: 0; align-self: 0;
139
+ order: 0;
136
140
  }
137
141
  }
138
142
  `,
@@ -145,6 +149,7 @@ test('layout-related-properties', {
145
149
  'grid', 'grid-area', 'grid-column', 'grid-row',
146
150
  'grid-column-start', 'grid-column-end', 'grid-row-start', 'grid-row-end',
147
151
  'justify-self', 'align-self',
152
+ 'order',
148
153
  ])
149
154
  },
150
155
  {
@@ -138,6 +138,7 @@ test('naming-policy', {
138
138
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
139
139
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
140
140
  justify-self: 0; align-self: 0;
141
+ order: 0;
141
142
  }
142
143
 
143
144
  .component_rootTest {
@@ -149,6 +150,7 @@ test('naming-policy', {
149
150
  grid: 0; grid-area: 0; grid-column: 0; grid-row: 0;
150
151
  grid-column-start: 0; grid-column-end: 0; grid-row-start: 0; grid-row-end: 0;
151
152
  justify-self: 0; align-self: 0;
153
+ order: 0;
152
154
  }
153
155
  `,
154
156
  },