Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

📦 JSBox Apps meets Webpack

License

NotificationsYou must be signed in to change notification settings

imyelo/jsbox-webpack-plugin

Repository files navigation

licensenpmPRs Welcome

📦 JSBox meets Webpack

Get Started

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. 🎉

Usage

  1. Set your iPhone's IP (you can find it inJSBox's Setting Tab) into the environment variableJSBOX_HOST.
  2. Runnpm 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}=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 */),],}

Plugin Options

copy

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],],}),// ...

upload

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

uploadTimeout

Arguments:

  • upload: number

Default Value:10 * 1000 (ms)

Example:

// ...newJSBoxPlugin({upload:true,uploadTimeout:2*1000,}),// ...

Who's using?

License

Apache-2.0 © yelo, 2019 - present

About

📦 JSBox Apps meets Webpack

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp