pokore
Collection for postcss.
Last updated 3 years ago by dalphyx .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pokore 
SYNC missed versions from official npm registry.

pokore

Collection for postcss nyan~

##Install

npm install pokore --save-dev

##Plugins

Usage

Gulp:

import gulp from 'gulp'
import postcss from 'postcss'
import pokore from 'pokore'
import rename from 'gulp-rename'

gulp.task('postcss', () => {
  return gulp.src('./a.sss')
    .pipe(postcss([
      pokore.import,
      pokore.colorAlpha,
      pokore.extend,
      pokore.size,
      pokore.reset,
      pokore.propertylookup,
      pokore.nested
    ], {
      parser: pokore.sugarss
    }))
    .pipe(postcss([
      pokore.autoprefixer({ browsers: ['last 1 version'] }),
      pokore.sorting({ 'sort-order': pokore.cssortie })
    ]))
    .pipe(rename({ extname: '.css' }))
    .pipe(gulp.dest('./dest'))
})

Sugarss file: a.sss:

@import './b.sss'

@reset-global pc

.a
  @extend .c
  tab-size: 1px
  width: 40px
  margin-left: @width
  box-shadow: 0 0 1px #222.1

  .d
    width: 300px

.b
  size: 30px
  @reset-nested list

Sugarss file: b.sss:

.c
  color: #fff

Compiled to:

html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/**
 * Other styles from normalize.css
 */

.c, .a {
  color: #fff
}

.a {
  width: 40px;
  margin-left: 40px;
  -moz-tab-size: 1px;
       tab-size: 1px;
  box-shadow: 0 0 1px rgba(34, 34, 34, 0.1)
}

.a .d {
  width: 300px;
}

.b {
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  list-style: none
}

License

MIT

Current Tags

  • 0.4.2                                ...           latest (3 years ago)

10 Versions

  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (11)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |