1.0.4 • Published 3 months ago

@digigov/postcss-banner v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

@digigov/postcss-banner

postcss-banner plugin to add text banner and footer to resulting file.

Usage

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

Add PostCSS Banner to your build tool:

npm install --save-dev postcss 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.

1.0.4

3 months ago

1.0.4-fd2cea11

3 months ago

1.0.2

3 months ago

1.0.3

3 months ago

1.1.0-2a507fd6

4 months ago

1.0.1

5 months ago

1.0.0

5 months ago

1.0.0-rc.5

5 months ago

1.0.0-rc.6

5 months ago

1.0.0-51c931ab

5 months ago

1.0.0-23c81d9f

5 months ago

1.0.0-b0737a96

5 months ago

1.0.0-47312a12

5 months ago

1.0.0-rc.4

5 months ago

1.0.0-b4257f67

5 months ago

1.0.0-a131264d

5 months ago

1.0.0-8b33e4c8

5 months ago

1.0.0-8ae63a77

6 months ago

1.0.0-blabla-test2

9 months ago

1.0.0-77ee23d9

6 months ago

0.3.24-rc

9 months ago

1.0.0-eb2842b4

6 months ago

1.0.0-266e80f3

6 months ago

1.0.0-7c9716da

8 months ago

1.0.0-c768d137

9 months ago

1.0.0-290a96e2

7 months ago

1.0.0-002c630d

9 months ago

1.0.0-rc.3

6 months ago

1.0.0-rc.1

6 months ago

1.0.0-079f34f3d

7 months ago

1.0.0-rc.2

6 months ago

1.0.0-75e5086d

6 months ago

1.0.0-758a1807

7 months ago

1.0.0-rc

9 months ago

1.0.0-60addd4a

5 months ago

1.0.0-05af31dd

5 months ago

1.0.0-8bbf3ef2

6 months ago

1.0.0-ab30975f

5 months ago

1.0.0-88820b1e

8 months ago

1.0.0-480e3d97

7 months ago

1.0.0-3bfc7d37

6 months ago

1.0.0-605437dc

9 months ago

1.0.0-e322b0cc

5 months ago

1.0.0-55e4210c

7 months ago

1.0.0-6b93ebf2

8 months ago

1.0.0-4e7b7994

9 months ago

1.0.0-00643e1d

5 months ago

1.0.0-21c8c3dc

6 months ago

1.0.0-blabla-test

9 months ago

1.0.0-871b6be5

7 months ago

0.3.24

11 months ago

0.3.23

1 year ago

0.3.22

1 year ago

0.3.21

1 year ago

0.3.20

1 year ago

0.3.19

1 year ago

0.3.19-alpha

2 years ago

0.3.17

2 years ago

0.3.18

2 years ago

0.3.16

2 years ago

0.3.15

2 years ago

0.3.14

2 years ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.9

2 years ago

0.3.8

2 years ago