JSBox Webpack Plugin
📦 JSBox meets Webpack
Get Started
We have prepared a scaffolding tool (thanks to saojs) for you, to help you start using Webpack to develop JSBox applications more efficiently.
Please ensure that your NPM client is ready, which should be installed with Node.js.
Just run:
mkdir myapp && cd myappnpx sao sao-jsbox-webpack
Then everything out of the box is ready for you. 🎉
Usage
- Set your iPhone's IP (you can find it in JSBox's Setting Tab) into the environment variable
JSBOX_HOST
. - Run
npm start
(development mode) /npm run build
(production mode) to compiling the codes, and the assembled box file would be sync to your phone automatically while theupload
option is turned on.
GLHF 😉
Plugin Usage
const resolve = const JSBoxPlugin = moduleexports = context: entry: './scripts/main.js' output: path: filename: 'scripts/main.js' plugins: /* options */
Plugin Options
copy
Arguments:
copy: [fromPath: string]
copy: [{ fromPath: string, toRelativePath: string }]
Default Value: []
Basic Example:
// ... copy: 'beta.json' // ...
In case of copying files out of the context:
const resolve = // ... copy: 'README.md], ], }),// ...
upload
Arguments:
upload: boolean
Default Value: false
Important: Should be used with env variable JSBOX_HOST
Example:
// ... upload: true // ...
and then
JSBOX_HOST=192.168.1.10 npx webpack
uploadTimeout
Arguments:
upload: number
Default Value: 10 * 1000
(ms)
Example:
// ... upload: true uploadTimeout: 2 * 1000 // ...
Who's using?
License
Apache-2.0 © yelo, 2019 - present