Browse Source

KERNEL-10608 refactor: 不额外放图片包

es6
Zhenfei.Li 3 years ago
parent
commit
324d1eb1a1
  1. 1
      .npmignore
  2. BIN
      dist/images/1x/icon/auto_normal.png
  3. BIN
      dist/images/1x/icon/auto_select.png
  4. BIN
      dist/images/1x/icon/dark/trans_disable.png
  5. BIN
      dist/images/2x/background/trans_disable.png
  6. BIN
      dist/images/2x/icon/dark/trans_disable.png
  7. 8
      lib/prepublish/prepublish.js

1
.npmignore

@ -1,4 +1,5 @@
* *
!src/less/**/*.less
!dist/lib/*.d.ts !dist/lib/*.d.ts
!dist/lib/**/*.d.ts !dist/lib/**/*.d.ts
!dist/font.css !dist/font.css

BIN
dist/images/1x/icon/auto_normal.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dist/images/1x/icon/auto_select.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dist/images/1x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

BIN
dist/images/2x/background/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

BIN
dist/images/2x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

8
lib/prepublish/prepublish.js

@ -57,7 +57,9 @@ function readDirSync(directoryPath) {
} }
function finalizeCompile() { function finalizeCompile() {
const componentsLessContent = readDirSync(lessPath); let componentsLessContent = readDirSync(lessPath);
componentsLessContent += `@import "./public.less";\n`;
writeFileSync( writeFileSync(
join(lessPath, 'fineui.less'), join(lessPath, 'fineui.less'),
@ -65,11 +67,11 @@ function finalizeCompile() {
); );
} }
removeFiles(`${lessPath}/images`);
removeFiles(`${lessPath}/font`); removeFiles(`${lessPath}/font`);
removeFiles(`${lessPath}/public.less`);
removeFiles(`${lessPath}/fineui.less`); removeFiles(`${lessPath}/fineui.less`);
finalizeCompile(); finalizeCompile();
copyFiles(`${process.cwd()}/dist/images`, lessPath);
copyFiles(`${process.cwd()}/dist/font`, lessPath); copyFiles(`${process.cwd()}/dist/font`, lessPath);
copyFiles(`${process.cwd()}/public/less/var.less`, `${lessPath}/public.less`);

Loading…
Cancel
Save