Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foy for the building not working properly #104

Open
JUSTIVE opened this issue Feb 10, 2024 · 2 comments
Open

foy for the building not working properly #104

JUSTIVE opened this issue Feb 10, 2024 · 2 comments

Comments

@JUSTIVE
Copy link
Sponsor

JUSTIVE commented Feb 10, 2024

I'm trying to contribute to this project, but the foy for the build.ts script seems not working properly(build artifacts are not created).

from my perspective, these are the only logs displayed on the terminal:

yarn build
yarn run v1.22.19
warning ../../../package.json: No license field
$ yarn foy -c ./scripts/build.ts
warning ../../../package.json: No license field
$ ~/git/personal/ts-belt/node_modules/.bin/foy -c ./scripts/build.ts
✨  Done in 0.43s.

and the exit code is 0. Is there anyone who could help with this?

@JUSTIVE
Copy link
Sponsor Author

JUSTIVE commented Feb 11, 2024

for now, I just rewrote scripts/build.ts to be run with bun runtime, just for ease. I guess it works just same as the original.

@JUSTIVE
Copy link
Sponsor Author

JUSTIVE commented Mar 21, 2024

here's the script I use for build

import { execSync } from "child_process"
const globby = require("globby");
import { copyFileSync } from "node:fs"
import 'chalk'

console.log('Build dist')
console.log('yarn clean')
execSync('yarn clean')
console.log('yarn re:clean')
execSync('yarn re:clean')
console.log('yarn re:build')
execSync('yarn re:build')
console.log('yarn transform all')
execSync('yarn transform all')
console.log('yarn generate docs')
execSync('yarn generate docs')
console.log('yarn rollup -c rollup.config.js --bundleConfigAsCjs')
execSync('yarn rollup -c rollup.config.js --bundleConfigAsCjs')
const files = await globby('dist/*.js')
const js = files.join(' ')
console.log(`jscodeshift`)
execSync(`node node_modules/.bin/jscodeshift --run-in-band -t tools/javascript-codemods/post/index.ts ${js}`)
console.log('yarn generate tsc')
execSync('yarn generate tsc')
copyFileSync('./src/global.d.ts', './dist/types/global.d.ts')
copyFileSync('./src/types.ts', './dist/types/types.d.ts')
execSync('yarn test run -c')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant