- Notifications
You must be signed in to change notification settings - Fork0
imyelo/jsbox-webpack-plugin
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
📦 JSBox meets Webpack
We have prepared ascaffolding tool (thanks tosaojs) 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. 🎉
- Set your iPhone's IP (you can find it inJSBox'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 theuploadoption is turned on.
GLHF 😉
const{ resolve}=require('path')constJSBoxPlugin=require('jsbox-webpack-plugin')module.exports={context:resolve('src'),entry:'./scripts/main.js',output:{path:resolve(`dist`),filename:'scripts/main.js',},plugins:[newJSBoxPlugin(/* options */),],}
Arguments:
copy: [fromPath: string]copy: [{ fromPath: string, toRelativePath: string }]
Default Value:[]
Basic Example:
// ...newJSBoxPlugin({copy:['beta.json',],}),// ...
In case of copying files out of the context:
const{ resolve}=require('path')// ...newJSBoxPlugin({copy:[[resolve(__dirname,'README.md'),'README.md],],}),// ...
Arguments:
upload: boolean
Default Value:false
Important: Should be used with env variableJSBOX_HOST
Example:
// ...newJSBoxPlugin({upload:true,}),// ...
and then
JSBOX_HOST=192.168.1.10 npx webpack
Arguments:
upload: number
Default Value:10 * 1000 (ms)
Example:
// ...newJSBoxPlugin({upload:true,uploadTimeout:2*1000,}),// ...
Apache-2.0 © yelo, 2019 - present
About
📦 JSBox Apps meets Webpack
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.