@websolutespa/bom-compiler 0.2.2 → 0.2.3
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.
- package/CHANGELOG.md +12 -0
- package/babel.config.js +4 -4
- package/index.d.ts +1 -4
- package/index.js +2 -1
- package/package.json +4 -1
- package/rollup.config.js +31 -6
package/CHANGELOG.md
CHANGED
package/babel.config.js
CHANGED
|
@@ -12,15 +12,15 @@ module.exports = {
|
|
|
12
12
|
targets: test ?
|
|
13
13
|
{ node: 'current' } :
|
|
14
14
|
{ browsers: 'defaults, not IE 11' },
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
],
|
|
17
17
|
[
|
|
18
18
|
'@babel/preset-react',
|
|
19
19
|
{
|
|
20
|
-
runtime: 'automatic'
|
|
21
|
-
}
|
|
20
|
+
runtime: 'automatic',
|
|
21
|
+
},
|
|
22
22
|
],
|
|
23
|
-
'@babel/preset-typescript'
|
|
23
|
+
'@babel/preset-typescript',
|
|
24
24
|
],
|
|
25
25
|
/*
|
|
26
26
|
plugins: [
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
1
2
|
const spawn = require('cross-spawn');
|
|
2
3
|
const path = require('path');
|
|
3
4
|
const fs = require('fs');
|
|
@@ -46,7 +47,7 @@ function emitDeclaration() {
|
|
|
46
47
|
'tsc',
|
|
47
48
|
['--project', tsConfigPath, '--emitDeclarationOnly'],
|
|
48
49
|
{
|
|
49
|
-
stdio: 'inherit'
|
|
50
|
+
stdio: 'inherit',
|
|
50
51
|
});
|
|
51
52
|
} catch (error) {
|
|
52
53
|
console.log('BomCompiler.emitDeclaration', error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@websolutespa/bom-compiler",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Compiler helper of the BOM Repository",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bom",
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
"@rollup/plugin-terser": "^0.4.4",
|
|
24
24
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
25
25
|
"@svgr/rollup": "^8.1.0",
|
|
26
|
+
"autoprefixer": "^10.4.19",
|
|
26
27
|
"babel-loader": "^9.1.3",
|
|
27
28
|
"cross-spawn": "latest",
|
|
28
29
|
"node-sass": "^9.0.0",
|
|
30
|
+
"postcss-modules": "^4.3.1",
|
|
31
|
+
"postcss-modules-scope": "^3.2.0",
|
|
29
32
|
"rimraf": "3.0.2",
|
|
30
33
|
"rollup-plugin-copy": "^3.5.0",
|
|
31
34
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
package/rollup.config.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { babel } from '@rollup/plugin-babel';
|
|
1
2
|
import json from '@rollup/plugin-json';
|
|
3
|
+
import terser from '@rollup/plugin-terser';
|
|
4
|
+
import typescript from '@rollup/plugin-typescript';
|
|
2
5
|
import svgr from '@svgr/rollup';
|
|
6
|
+
import autoprefixer from 'autoprefixer';
|
|
3
7
|
import * as path from 'path';
|
|
4
|
-
import scss from 'rollup-plugin-scss';
|
|
5
|
-
// import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
6
8
|
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
|
9
|
+
import postcss from 'rollup-plugin-postcss';
|
|
10
|
+
// import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
7
11
|
// import typescript from 'rollup-plugin-typescript2';
|
|
8
|
-
import { babel } from '@rollup/plugin-babel';
|
|
9
|
-
import terser from '@rollup/plugin-terser';
|
|
10
|
-
import typescript from '@rollup/plugin-typescript';
|
|
11
12
|
|
|
12
13
|
const DEBUG = true;
|
|
13
14
|
const TERSER = false;
|
|
14
15
|
|
|
15
|
-
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.json'];
|
|
16
|
+
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.json', '.scss', '.css'];
|
|
16
17
|
|
|
17
18
|
const cwd = process.cwd();
|
|
18
19
|
|
|
@@ -26,6 +27,9 @@ function getBabelConfigFile() {
|
|
|
26
27
|
return path.resolve(__dirname, 'babel.config.js');
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
const cssExportMap = {};
|
|
31
|
+
|
|
32
|
+
/** @type {import('rollup').RollupOptions} */
|
|
29
33
|
const rollupConfig = {
|
|
30
34
|
input: 'src/index.ts',
|
|
31
35
|
makeAbsoluteExternalsRelative: true,
|
|
@@ -63,9 +67,30 @@ const rollupConfig = {
|
|
|
63
67
|
stroke: 'currentColor',
|
|
64
68
|
},
|
|
65
69
|
}),
|
|
70
|
+
postcss({
|
|
71
|
+
modules: true,
|
|
72
|
+
autoModules: true,
|
|
73
|
+
extract: false,
|
|
74
|
+
use: ['sass'],
|
|
75
|
+
extensions: ['.css', '.scss'],
|
|
76
|
+
inject: true,
|
|
77
|
+
plugins: [
|
|
78
|
+
autoprefixer(),
|
|
79
|
+
/*
|
|
80
|
+
postcssModules({
|
|
81
|
+
getJSON: function(cssFileName, json, outputFileName) {
|
|
82
|
+
// nope
|
|
83
|
+
},
|
|
84
|
+
exportGlobals: true,
|
|
85
|
+
}),
|
|
86
|
+
*/
|
|
87
|
+
],
|
|
88
|
+
}),
|
|
89
|
+
/*
|
|
66
90
|
scss({
|
|
67
91
|
fileName: 'index.css',
|
|
68
92
|
}),
|
|
93
|
+
*/
|
|
69
94
|
typescript({
|
|
70
95
|
compilerOptions: {
|
|
71
96
|
baseUrl: '.',
|