https://github.com/artdecocode/idio-dev
Development tools for idio.
https://github.com/artdecocode/idio-dev
Last synced: 11 months ago
JSON representation
Development tools for idio.
- Host: GitHub
- URL: https://github.com/artdecocode/idio-dev
- Owner: artdecocode
- License: mit
- Created: 2018-05-18T03:38:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T01:04:43.000Z (over 7 years ago)
- Last Synced: 2025-02-14T19:08:15.971Z (11 months ago)
- Language: JavaScript
- Size: 87.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# idio-dev
[](https://badge.fury.io/js/idio-dev)
```sh
yarn add -E -D idio-dev
```
`idio-dev` is a new Node.js npm package.
Development tools for idio.
## `watchBundles`
Make and watch `browserify` bundles. This produces source maps and does not minify output, so that it's useful in development. To build production bundles, use `buildBundles`.
```js
import { watchBundles } from 'idio-dev'
await watchBundles({
from, to,
babelify: {
babelrc: false,
plugins: [
'@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-object-rest-spread',
],
presets: [
'@babel/preset-react',
],
},
})
```
- _from_: where to look for JS files which need to be compiled
- _to_: where to put compiled bundles
- _browserify_: any additional options to pass to `browserify`
- _babelify_: a configuration for `babelify`
- _ignore_: `browserify`'s ignore
- _exclude_: `browserify`'s exclude
```fs
⇢ src/scripts/tamara-de-lempicka.js bundled to src/static/scripts/tamara-de-lempicka.js
```
---
(c) [artdecocode][1] 2018
[1]: https://artdeco.bz