Bootstrap with @wpakcio/cli

The package @wpackio/cli comes with one binary wpackio-cli. We do not recommend installing it directly. It is best to use it with npx (which comes with npm 5.2+). Install globally Using with npx Usage The command doesn’t take any parameters. It is used to bootstrap @wpackio/scripts in your project. Simply navigate to your project. And run it. Then follow the screen instruction.

Read More

Manage project with @wpackio/scripts

This is the main devDependency of your project which will give four functionalities. Bootstrap project and server configuration. Start Development server. Create production build files. Create distributable zip files. Installation This gives you the wpackio-scripts binary within your node_modules/.bin. Usage If you want you can run it directly like OR But we would recommend creating different scripts under package.json file. Now you can just do and it will invoke the command. If you have created your project with @wpackio/cli, then it is already taken care for you. CLI Commands The cli app takes 4 commands and three optional parameters. Remember you can always do something like this. to find out more. wpackio-scripts bootstrap bootstrap Create configuration files on first run. If wpackio.project.js is already present, then just create the wpackio.server.js file. It also checks your package.json file and inserts scripts if not already found. wpackio-scripts start start Starts the development server. wpackio-scripts build build Build production files. wpackio-scripts pack pack Create a distributable .zip file for your WordPress plugin or theme. CLI Parameters All of the commands take the following parameters. -c, --context [path] Path to context or project root directory. Defaults to current working directory. It is recommended to use absolute path, else it is calculated from current working directory. The path you mention here should be what the URL localhost/wp-content/<themes|plugins>/<slug>/ map to. In most cases, you should leave it, because calling the program from npm or yarn script should automatically set it. -p, --project-config [path] Path to project config. If it differs from ./wpackio.project.js. -s, --server-config [path] Path to server config. If it differs from ./wpackio.server.js. -h, --help Output usage information.

Read More