Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 20, 2024
1 parent 94fc67a commit ce18019
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/babel-plugin-canyon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-canyon",
"version": "2.0.0-beta.21",
"version": "2.0.0-beta.22",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
Expand Down
6 changes: 5 additions & 1 deletion plugins/babel-plugin-canyon/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {declare} from "@babel/helper-plugin-utils";
import {visitorProgramExit} from "./visitor-program-exit";
import {template} from "@babel/core";
import tep from './template'
import tep from './template';
import packageJson from '../package.json'
const writeCanyonToLocalTemplate = template(tep["templates/write-canyon-to-local-template.js"])


export default declare((api, config, dirname) => {
api.assertVersion(7);
return {
Expand All @@ -16,6 +19,7 @@ export default declare((api, config, dirname) => {

const servePa:{provider?:string,compareTarget?:string}&any = {
...config,
version: packageJson.version,
projectID: config.projectID || env_projectID || '-',
sha: config.sha || env_sha || '-',
branch: config.branch || env_branch || '-',
Expand Down
2 changes: 1 addition & 1 deletion plugins/babel-plugin-canyon/test-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
oneByOne: true, //可配置代理 默认false
special: true, //默认false
keepMap: true, // 默认false
addAttributes:['branch'], //默认全部,有的话用有的,适用于生产
// addAttributes:['branch'], //默认全部,有的话用有的,适用于生产
}]
]
}

0 comments on commit ce18019

Please sign in to comment.