swc/packages/helpers/scripts
Jiwon Choi 69719c2acb
refactor(es/helpers): Remove unnecessary exports (#9225)
**Description:**

Helper methods were exporting twice, `_` and it's own function name.
We can map the build script to export `_` as it's own name (filename).
Therefore we export only once as `_`, and map the name on the build
script.

```js
// helpers/_foo.js

function _foo() {
  // ...
}

export { _foo as _ }
```
```js
// index.js

// We know the func name will be `_foo` based on the filename.
export { _ as _foo } from '_foo.js'
```

Closes #9203

---------

Co-authored-by: magic-akari <akari.ccino@gmail.com>
2024-07-13 17:13:25 +09:00
..
.dprint.json refactor(bindingins): Create @swc/counter (#7991) 2023-09-22 23:48:27 +00:00
ast_grep.js refactor(es/helpers): Remove unnecessary exports (#9225) 2024-07-13 17:13:25 +09:00
build.js refactor(es/helpers): Remove unnecessary exports (#9225) 2024-07-13 17:13:25 +09:00
errors.js refactor(es/helpers): Move packages for monorepo (#7833) 2023-08-18 04:25:37 +00:00
utils.js refactor(es/helpers): Move packages for monorepo (#7833) 2023-08-18 04:25:37 +00:00