Skip to content

Commit 26ccc46

Browse files
committed
Merge branch 'master' into user-clip
2 parents 5291ec0 + 3878b5b commit 26ccc46

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ const OUT_DIR_ESM5 = `${NPM_DIR}/package/esm5`;
1818
/* Package version */
1919
shell.echo(`Setup package version`);
2020
let version = config.version;
21-
const versionContent = `export default '${version}';\\n`;
22-
let result = shell.exec(`printf "${versionContent}" >./src/ui-scroll.version.ts`);
23-
if (result.code !== 0) {
24-
shell.echo(chalk.red(`Error: Can't define package version`));
25-
shell.exit(1);
26-
}
21+
const versionContent = `export default '${version}';`;
22+
const versionFilePath = './src/ui-scroll.version.ts'
23+
shell.touch(versionFilePath)
24+
shell.echo(versionContent).to(versionFilePath)
2725
shell.echo(chalk.green(`${PACKAGE} v${version}`));
2826

2927
shell.echo(`Start building...`);

0 commit comments

Comments
 (0)