Skip to content

Commit

Permalink
fix: 修改注入版本插件
Browse files Browse the repository at this point in the history
  • Loading branch information
xuying.xu committed Sep 18, 2024
1 parent 787abb2 commit 17f182d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node_version: ['16', '18']
node_version: ['18']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/danger-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node_version: ['16']
node_version: ['18']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
"signal-exit": "3.0.3"
},
"devDependencies": {
"babel-plugin-search-and-replace": "^1.1.1",
"@octokit/core": "^4.2.0",
"@types/jest": "^26.0.20",
"@types/jest-image-snapshot": "^6.1.0",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"adm-zip": "^0.5.10",
"babel-plugin-minify-replace": "^0.5.0",
"canvas-to-buffer": "^1.1.1",
"cross-env": "^6.0.3",
"danger": "^11.2.3",
Expand Down
21 changes: 12 additions & 9 deletions packages/f2/.fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ export default process.env.CI && process.env.CI === 'true'
},
},
},
extraBabelPlugins: [['babel-plugin-minify-replace', {
"replacements": [{
"identifierName": "VERSION",
"replacement": {
"type": "identifier",
"value": JSON.stringify(require('./package').version),
}
}]
}]],
extraBabelPlugins: [[
"search-and-replace",
{
"rules": [
{
"search": "VERSION",
"searchTemplateStrings": true,
"replace": JSON.stringify(require('./package').version)
}
]
}
]],
extraRollupPlugins: [...(isBundleVis ? [visualizer()] : [])],
};
2 changes: 1 addition & 1 deletion packages/f2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export { Scale, ScaleConfig } from './deps/f2-scale/src';
export * from './components';

//@ts-ignore
export default { version: VERSION };
export default { version: 'VERSION' };

0 comments on commit 17f182d

Please sign in to comment.