shawnbot / TODO

Somebody hold me accountable to this stuff.
0 stars 0 forks source link

Kirke build tool #20

Open shawnbot opened 7 years ago

shawnbot commented 7 years ago

KIRKE (Circe) was a goddess of sorcery (pharmakeia) who was skilled in the magic of transmutation, illusion, and necromancy. She lived on the mythical island of Aiaia (Aeaea) with her nymph companions.

Kirke is what I'm calling my ideal and (so far) mythical build tool that can simply transform different types of source files (ES6, Sass, design assets) into their corresponding, production-ready assets (browser-ready JS and CSS with source maps, compressed images, custom fonts, etc. etc.).

Some usage examples:

# build src => dist using the default configuration (or as defined in package.json)
kirke --from src --to dist

# watch using YAML config, which specifies source and dest dirs
kirke --config .kirke.yml --watch

# use a recipe, i.e. kirke-recipe-18F
kirke --recipe 18F

# or, extend via configuration
echo 'extends: 18F' > .kirkerc.yml
kirke

Maybe a sample configuration looks like:

'**/*.js':
  - browserify:
      transform:
        - rollupify: {}
        - babelify: {presets: [es2015-rollup]}
        - uglifyify: {global: true}

'**/*.s[ac]ss':
  - sass:
      includePath: [node_modules/uswds/src/stylesheets]
      sourceMap: true
  - postcss: [cssnext, cssnano]

'**/*.{png,jpg}':
  - imageoptim: {}

'**/*.svg':
  - svgo: {}