GithubHelp home page GithubHelp logo

kiki's Introduction

Build Status

Kiki Bundler

Kiki-Bundler is an opiniated frontend bundler, providing a great out-of-the-box bundling experience with minimal configuration need.

At work we got frustrated with slow watch-tasks, when tools don't support incremental building (except for rollup, which is awesome!). Having recently inherited a huge legacy project with a lot of different root scss files, we needed something faster. The existing code used grunt which took up to 10s to compile.

These simple benchmarks were taken on my Macbook Pro 13" 2016.

Tool Compiler Complete Build incremental Build
grunt-contrib-sass Ruby-Sass 10s 10s
grunt-sass Libsass 2.1s 1.8s
kiki + autoprefixer Libsass 1.8s 150 - 300ms

So yeah, kiki is a LOT faster even with autoprefixer included.

Currently only sass compilation is supported, but support for javascript via rollup or webpack is planned.

Usage

npm install --save-dev kiki-bundler

Add a config called kiki.config.json at the project root:

{
  "sass": {
    "src": "path/to/my/scss",
    "dest": "path/for/compiled/output"
  }
}

Add kiki to your npm scripts in your package.json:

{
  "scripts": {
    "build": "kiki build",
    "watch": "kiki watch"
  }
}

Configuration Options

Sass

Option type default Description
src string null Path to scss root directory
dest string null Path to output directory
addVendorPrefixes boolean true automatic vendor prefix insertion via autoprefixer
cssnext boolean false use tomorrows css features today

CLI-Arguments

Usage: kiki <command> [options]

Commands:
  watch  Watch for file changes and compile immediately
  build  Build minified production files

Options:
  -c, --config   Path to config file      [string] [default: "kiki.config.json"]
  --production   Force production builds
  -v, --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

Examples:
  kiki build -c myconfig.json

Copyright 2016 Marvin Hagemeister

Why the name?

At work we have quite a football table culture (which is called Kicker in German) and some of us even play in the german football table league. It only made sense to name the tools we use daily accordingly.

kiki's People

Contributors

marvinhagemeister avatar

Stargazers

Antonia Rose avatar Katja Lutz avatar Erik Aderhold avatar PaulBGD avatar

Watchers

Erik Aderhold avatar James Cloos avatar  avatar Joachim Feldmann avatar  avatar

kiki's Issues

Watch mode wrong base path for nested styles

Steps to reproduce:

  1. Create scss in subfolder
  2. Trigger watch by making a change
  3. Wrong base path is applied for the destination file

We likely need to change the base option of IFile

Improve Error messages

Improve Error messages instead of throwing the whole stack trace, when there was a compilation error.

Remove first slash in success message paths

I fear that people we incorrectly assume that the file is created at the unix root /.

  /public/assets/css/file1.css
  /public/assets/css/file2.css
  /public/assets/css/file3.css

Investigate stream api

The streaming api seems like a better fit. Have to check how to stream an array instead of a file

Implement browser-sync

Requirements:

  • User can specify watch patterns
  • Won't start when no server property is available in config
  • Allow middlewares (redbox, webpack, etc)
    • How to pass errors to browser-sync/console.log?

Print errors to `stderr`

Currently all errors are printed to stdout.

Moreover the build task should fail with an exit code of 1. Watch tasks should not exit with 1, because that would abort the process and stop the watcher obviously.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.