This tool has webpack, jest and other technologies built in to help you bundle and test your React modules
You should install it globally first:
$ npm install iceberg-packer -g
and then run:
$ iceberg init
which will help you create a project.
The watch starts the webpack watch, jest watch and the resources copy. You can choose to exclude: resources
, webpack
, jest
, dev-server
.
$ iceberg watch [bundle]
The options for the watch are:
-h, --help outputs the usage information
-e, --exclude <packages> what packages to exclude (separated by comma)
-s, --single run once and then exit (webpack and jest)
--silent this flag will hide OS notifications
--host <hostname> hostname for the cache clear
--port <port> port for the cache clear
--dev-port <dev-port> port for the webpack-dev-server
--prod production environment (builds just like for production without the split)
$ iceberg watch --e jest,webpack
$ iceberg watch --exclude resources,jest
$ iceberg watch -s --silent
$ iceberg watch --prod
The run command starts a task, like: webpack
, jest
, eslint
.
$ iceberg run <package>
The options for the run are:
-h, --help outputs the usage information
--silent this flag will hide OS notifications
--host hostname for the cache clear
--port port for the cache clear
--fix this is only useful for eslint - fixes some linting errors
$ iceberg run jest --silent
$ iceberg run webpack
$ iceberg run eslint --fix
A tool to scaffold components or prop-types.
$ iceberg make [name] [options]
The options for the make are:
-h, --help outputs the usage information
-t, --type <type> the type of element you are scaffolding
For type you can use: component
, prop-type
.
$ iceberg make common/visualization -t component
$ iceberg make highcharts --type component
$ iceberg make common/visualization/chart-options -t prop-type
It builds the JS bundle ready for production
$ iceberg build
Remove iceberg from the project.
$ iceberg remove
MIT