@tmsfe/tmskit 0.0.33 → 0.0.34

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/dist/index.cjs.js CHANGED
@@ -2783,7 +2783,8 @@ var watch_1 = function (globValue, watchOptions, callback, module) {
2783
2783
  const tmsConfig = global$6.getData('tmsConfig');
2784
2784
  let targetFile = getTargetFile$1(sourceFile, module, tmsConfig.outputDir);
2785
2785
  if (module.custom) {
2786
- targetFile = path$4.join(module.to, sourceFileName);
2786
+ const filePath = sourceFile.replace(/\\/g, '/').replace(module.from, '');
2787
+ targetFile = path$4.join(module.to, filePath);
2787
2788
  }
2788
2789
  if (vinyl.event === 'unlink' || vinyl.event === 'unlinkDir') {
2789
2790
  info$a(`删除${sourceFileName}`);
@@ -2893,7 +2894,7 @@ var dev$4 = async (tmsConfig, modules, isDev = true) => {
2893
2894
  glob: item.rules,
2894
2895
  module: {
2895
2896
  custom: true,
2896
- from: '',
2897
+ from: item.from,
2897
2898
  to: item.to
2898
2899
  },
2899
2900
  destPath: item.to,
@@ -3902,7 +3903,7 @@ var entry = [{
3902
3903
 
3903
3904
  var require$$12 = {
3904
3905
  name: "@tmsfe/tmskit",
3905
- version: "0.0.33",
3906
+ version: "0.0.34",
3906
3907
  description: "tmskit",
3907
3908
  main: "dist/index.cjs",
3908
3909
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tmskit",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "tmskit",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {
@@ -33,7 +33,7 @@ module.exports = async (tmsConfig, modules, isDev = true) => {
33
33
  glob: item.rules,
34
34
  module: {
35
35
  custom: true,
36
- from: '',
36
+ from: item.from,
37
37
  to: item.to,
38
38
  },
39
39
  destPath: item.to,
@@ -58,7 +58,8 @@ module.exports = function (globValue, watchOptions, callback, module) {
58
58
  const tmsConfig = global.getData('tmsConfig');
59
59
  let targetFile = getTargetFile(sourceFile, module, tmsConfig.outputDir);
60
60
  if (module.custom) {
61
- targetFile = path.join(module.to, sourceFileName);
61
+ const filePath = sourceFile.replace(/\\/g, '/').replace(module.from, '');
62
+ targetFile = path.join(module.to, filePath);
62
63
  }
63
64
  if (vinyl.event === 'unlink' || vinyl.event === 'unlinkDir') {
64
65
  info(`删除${sourceFileName}`);