@lipemat/js-boilerplate 9.1.0-beta.2 → 9.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,9 +14,15 @@ let cssLoader = {
|
|
|
14
14
|
modules: {
|
|
15
15
|
exportLocalsConvention: 'camelCase',
|
|
16
16
|
localIdentName: 'Ⓜ[name]__[local]__[contenthash:base64:2]',
|
|
17
|
-
// Default to :global for classes in "global" directories.
|
|
17
|
+
// Default to :global for classes in "global" or "pcss" directories.
|
|
18
18
|
mode: resourcePath => {
|
|
19
|
-
|
|
19
|
+
if ( /globals?\//i.test( resourcePath.replace( /\\/g, '/' ) ) ) {
|
|
20
|
+
return 'global';
|
|
21
|
+
}
|
|
22
|
+
if ( /pcss?\//i.test( resourcePath.replace( /\\/g, '/' ) ) ) {
|
|
23
|
+
return 'global';
|
|
24
|
+
}
|
|
25
|
+
return 'local';
|
|
20
26
|
},
|
|
21
27
|
},
|
|
22
28
|
sourceMap: true,
|
package/config/jest.config.js
CHANGED
|
@@ -3,6 +3,7 @@ global.__TEST__ = true;
|
|
|
3
3
|
|
|
4
4
|
const path = require( 'path' );
|
|
5
5
|
const packageConfig = require( '../helpers/package-config' );
|
|
6
|
+
const fs = require( 'fs' );
|
|
6
7
|
|
|
7
8
|
const babelConfig = require( '../helpers/config' ).getConfig( 'babel.config' );
|
|
8
9
|
delete babelConfig.cacheDirectory;
|
|
@@ -26,7 +27,10 @@ let jestConfig = {
|
|
|
26
27
|
transform: {
|
|
27
28
|
'^.+\\.[tj]sx?$': [ 'babel-jest', babelConfig ],
|
|
28
29
|
},
|
|
29
|
-
setupFilesAfterEnv: [
|
|
30
|
+
setupFilesAfterEnv: [
|
|
31
|
+
path.resolve( packageConfig.workingDirectory, 'tests/setup.js' ),
|
|
32
|
+
path.resolve( packageConfig.workingDirectory, 'tests/setup.ts' ),
|
|
33
|
+
].filter( fs.existsSync ),
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
/**
|
package/config/webpack.dev.js
CHANGED
package/config/webpack.dist.js
CHANGED