Project file watcher for Smallfox


Keywords
amd-modules, bundle, bundler, es6, javascript, requirejs, split-testing, webpack
License
MIT
Install
npm install smallfox-watcher@0.0.9-16

Documentation

smallfox

Smallfox is a bundling compiler and middleware for web applications. By preparing app code as discrete modules, while bundling third-party code using Webpack, Smallfox avoids the rigidity of traditional bundlers. At runtime, customized collections of code and style can be delivered to each visitor, based on variables such as locale, language, A/B test, etc.

Install

Install with Yarn:

yarn add --dev smallfox

Basic Development Usage

yarn run smallfox-dev-server

This command will monitor and compile all the source file in the ./src/ directory (out of the box, Smallfox includes Babel and PostCSS compilers). Those resulting files, and any dependencies they pull in, will be served up via a development web server.

For example:

yarn add --dev smallfox
mkdir src
echo "body { background: green; }" > src/colors.css
echo "export default function sayHi() { alert('Hello, Smallfox!') }" > src/hello.js
echo "import './colors.css' \nimport sayHi from './hello.js' \nsayHi();" > src/index.js
yarn run smallfox-dev-server

The resulting server renders the following: