All Projects → princed → Postcss Banner

princed / Postcss Banner

Licence: mit
PostCSS plugin to add text banner and footer to resulting file

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Postcss Banner

Postcss Interpolate
PostCSS plugin for values interpolation between breakpoints.
Stars: ✭ 9 (-30.77%)
Mutual labels:  postcss, postcss-plugin
postcss-typed-css-classes
PostCSS plugin that generates typed entities from CSS classes for chosen programming language.
Stars: ✭ 12 (-7.69%)
Mutual labels:  postcss, postcss-plugin
postcss-clean
PostCss plugin to minify your CSS with clean-css
Stars: ✭ 41 (+215.38%)
Mutual labels:  postcss, postcss-plugin
postcss-gtk
Processes GTK+ CSS into browser CSS
Stars: ✭ 23 (+76.92%)
Mutual labels:  postcss, postcss-plugin
Postcss Position
PostCSS plugin that adds shorthand declarations for position attributes
Stars: ✭ 26 (+100%)
Mutual labels:  postcss, postcss-plugin
postcss-font-pack
PostCSS plugin to simplify font declarations by validating only configured font packs are used and adding fallbacks.
Stars: ✭ 18 (+38.46%)
Mutual labels:  postcss, postcss-plugin
Postcss Easing Gradients
PostCSS plugin to create smooth linear-gradients that approximate easing functions.
Stars: ✭ 689 (+5200%)
Mutual labels:  postcss, postcss-plugin
postcss-purgecss
PostCSS plugin for purgecss
Stars: ✭ 92 (+607.69%)
Mutual labels:  postcss, postcss-plugin
postcss-relaxed-unit
🍮Postcss-relaxed-unit is a postcss plugin for unit tranformation and make write css easier with custom unit.
Stars: ✭ 44 (+238.46%)
Mutual labels:  postcss, postcss-plugin
postcss-sort-media-queries
PostCSS plugin for combine and sort CSS media queries with mobile first or desktop first methods.
Stars: ✭ 118 (+807.69%)
Mutual labels:  postcss, postcss-plugin
Purgecss
Remove unused CSS
Stars: ✭ 6,566 (+50407.69%)
Mutual labels:  postcss-plugin, postcss
Postcss Responsive Type
Automagical responsive typography, built on PostCSS
Stars: ✭ 363 (+2692.31%)
Mutual labels:  postcss, postcss-plugin
postcss-windicss
PostCSS integrations for Windi CSS
Stars: ✭ 33 (+153.85%)
Mutual labels:  postcss, postcss-plugin
postcss-lazyimagecss
A PostCSS plugin that generates images's CSS width & height properties automatically.
Stars: ✭ 38 (+192.31%)
Mutual labels:  postcss, postcss-plugin
postcss-prefixwrap
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
Stars: ✭ 54 (+315.38%)
Mutual labels:  postcss, postcss-plugin
postcss-define-function
PostCSS plugin for Sass-like function directive
Stars: ✭ 25 (+92.31%)
Mutual labels:  postcss, postcss-plugin
postcss-rename
Replace class names based on a customizable renaming scheme.
Stars: ✭ 77 (+492.31%)
Mutual labels:  postcss, postcss-plugin
postcss
No description or website provided.
Stars: ✭ 59 (+353.85%)
Mutual labels:  postcss, postcss-plugin
postcss-aspect-ratio
A PostCSS plugin to fix an element's dimensions to an aspect ratio.
Stars: ✭ 38 (+192.31%)
Mutual labels:  postcss, postcss-plugin
postcss-momentum-scrolling
PostCSS plugin add 'momentum' style scrolling behavior (-webkit-overflow-scrolling: touch) for elements with overflow (scroll, auto) on iOS
Stars: ✭ 69 (+430.77%)
Mutual labels:  postcss, postcss-plugin

PostCSS Banner Dependency Status Current version NPM downloads Build Status

PostCSS plugin to add text banner and footer to resulting file.

Migration from previous versions

  • Asterisks to beginning of line are added automatically (use inline: false to disable)
  • Bang isn't added automatically (use important: true to enable)

Usage

Add PostCSS Banner to your build tool:

npm install --save-dev postcss-banner

Set banner and/or footer properties to add banner and/or footer to your resulting css (so use after minifier).

Example:

postcss(require('postcss-banner')({banner: 'banner'}))

yields

/*
 * banner
 */
.foo {
}

Value will be converted to string and wrapped with spaces by default. Set inline to true to render the comment in a single line.

Example:

var postcss = require('gulp-postcss');
var postcssBanner = require('postcss-banner');

var banner = 'single line comment';

gulp.task('css', function () {
  return gulp.src('./css/src/*.css')
    .pipe(postcss(
      [
        postcssBanner({
          banner: banner,
          inline: true
        })
      ]))
    .pipe(gulp.dest('./css'));
});

yields

/* single line comment */
.foo {
}

Options

banner

Type: String

The string will be converted in a css comment and put at the beginning of the css file.

footer

Type: String

The string will be converted in a css comment and put at the end of the css file.

inline

Type: Boolean

Default: false

Render the banner all in one line.

important

Type: Boolean

Default: false

Add a bang to the comment. (eg. /*! banner v.0.0.1 */)

NOTE: Important css comments are generally preserved from being removed during a minification process.

License

MIT License © Eugene Datsky

See PostCSS docs for examples for your environment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].