underdog-collie

    1.1.0 • Public • Published

    Collie

    CLI tool for compiling production-ready universal JavaScript applications, powered by webpack.

    Installation

    yarn add underdog-collie
    

    Usage

    Create a .babelrc file in the root of your project to configure Babel:

    {
      "presets": [
        ["env", {
          "targets": {
            "browsers": ["last 2 versions"],
            "node": "current"
          }
        }],
        "react"
      ]
    }

    Also create a file named collie.config.js in the root of your project:

    // Example collie config
    const {join} = require('path');
     
    module.exports = {
      // Specify an array of files to build with webpack.
      build: [{
        // Specify target.
        target: 'browser',
     
        // Specify entry options to pass to webpack.
        entry: {
          app: join(__dirname, 'browser.js')
        },
     
        // Specify output
        output: {
          path: join(__dirname, 'dist/static'),
          publicPath: '/static/'
        },
     
        // Pass options for html-webpack-plugin. Setting html to an array of objects
        // will create a new instance of the html-webpack-plugin with each object.
        html: {
          template: join(__dirname, 'index.html'),
          filename: join(__dirname, 'dist/index.html'),
          inject: true
        }
      }, {
        // Create a JavaScript bundle for server side use.
        target: 'server',
        entry: {
          server: join(__dirname, 'server')
        },
        output: {
          path: join(__dirname, 'dist')
        }
      }]
    };

    Create a build:

    collie build
    

    or watch files for development:

    collie build --watch
    

    Keywords

    none

    Install

    npm i underdog-collie

    DownloadsWeekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    236 kB

    Total Files

    14

    Last publish

    Collaborators

    • restlessbit