Code Monkey home page Code Monkey logo

broccoli-postcss-single's Introduction

broccoli-postcss-single

Travis Build Status npm version Coverage Status monthly downloads total downloads

The broccoli-postcss-single plugin runs your css through postcss plugins of your choosing.

Installation

npm install --save-dev broccoli-postcss-single

Compatibility

Due to changes in the plugin API of Postcss V8 some plugins may need to be updated after upgrading Postcss. Otherwise, switching to Postcss V8 should be as simple as updating this package from V4 to V5, however compatibility is not guaranteed.

  • V5 broccoli-postcss -> Postcss V8
  • V4 broccoli-postcss -> Postcss V7

Usage

var compileCSS = require("broccoli-postcss-single");

var outputTree = compileCSS(inputTrees, inputFile, outputFile, options);
  • inputTrees: An array of trees that specify the directories used by Broccoli. If you have a single tree, pass [tree].

  • inputFile: Relative path of the main CSS file to process.

  • outputFile: Relative path of the output CSS file.

  • options:

    • cacheExclude: An array of regular expressions that files and directories in an input node cannot pass in order to be included in the cache hash for rebuilds (blacklist).

    • cacheInclude: An array of regular expressions that files and directories in an input node must pass (match at least one pattern) in order to be included in the cache hash for rebuilds (whitelist).

    • plugins: An array of plugin objects to be used by Postcss (a minimum of 1 plugin is required). The supported object format is module: the plugin module itself, and options: an object of supported options for the given plugin.

    There are two supported methods for defining plugins:

    1. Object form

      plugins: [
        {
          module: require("some-plugin"),
          options: {
            /* options for `some-plugin` */
          },
        },
      ];
    2. Function form

      plugins: [
        require("some-plugin")({
          /* options for `some-plugin` */
        }),
        require("another-plugin")({
          /* options for `another-plugin` */
        }),
      ];
    • map: An object of options to describe how Postcss should handle source maps.

    • browsers: An array of supported browsers following the browserslist format. These will be passed to the options of each postcss plugin. This can be overridden on a per plugin basis.

    • parser: A function that parses different CSS syntax (optional). Use this if you’d like to parse a different syntax, such as Sass or Sugarcss, by passing in a custom function or node module reference.

Example

/* Brocfile.js */
var compileCSS = require("broccoli-postcss-single");
var cssnext = require("cssnext");

var options = {
  plugins: [
    {
      module: cssnext,
      options: {
        browsers: [
          // this will override `options.browsers`
          "> 1%",
          "last 2 versions",
        ],
      },
    },
  ],
  map: {
    inline: true,
  },
  browsers: ["last 2 version"],
};

var outputTree = compileCSS(["styles"], "app.css", "app.css", options);
module.exports = outputTree;

Notes on Caching

The default list of file extensions for caching is set to .css, .scss, .sass, .less for faster incremental builds. If you are using a parser or filetype not in the list you will want to add the file extension as a regex to the cacheInclude option.

If you are using something like Tailwind or a postcss plugin with a config file that you would like to trigger a rebuild, you will need to update the options to cache JS files: cacheInclude: [/.*\.(css|scss|sass|less|js)$/],.

If you are using something like PurgeCSS and would like postcss to rebuild when template files are updated, you will need to update the options to cache HBS files: cacheInclude: [/.*\.(css|scss|sass|less|hbs)$/],. However, in most cases PurgeCSS should only be run for a production build and this shouldn't be necessary.

broccoli-postcss-single's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar ezpuzz avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jeffjewiss avatar webark avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

broccoli-postcss-single's Issues

An in-range update of mocha is breaking the build 🚨

Version 3.4.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… bitHound - Code No failing files. Details,- ❌ bitHound - Dependencies 1 failing dependency. Details,- βœ… continuous-integration/travis-ci/push The Travis CI build passed Details,- βœ… coverage/coveralls First build on greenkeeper/mocha-3.4.0 at 95.833% Details

Release Notes v3.4.0

Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.

This week's highlights:

  • allowUncaught added to commandline as --allow-uncaught (and bugfixed)
  • warning-related Node flags

πŸŽ‰ Enhancements

πŸ› Fixes

πŸ”© Other

Commits

The new version differs by 9 commits0.

  • 7554b31 Add Changelog for v3.4.0
  • 9f7f7ed Add --trace-warnings flag
  • 92561c8 Add --no-warnings flag
  • ceee976 lint test/integration/fixtures/simple-reporter.js
  • dcfc094 Revert "use semistandard directly"
  • 93392dd no special case for macOS running Karma locally
  • 4d1d91d --allow-uncaught cli option
  • fb1e083 fix allowUncaught in browser
  • 4ed3fc5 Add license report and scan status

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.3.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - ❌ **bitHound - Dependencies** 2 failing dependencies. [Details](https://www.bithound.io/github/jeffjewiss/broccoli-postcss-single/ad1925ec131eb82078364d3ce1bba01ac9bb1f11/dependencies/npm#filter-failing-dep),- βœ… **bitHound - Code** No failing files. [Details](https://www.bithound.io/github/jeffjewiss/broccoli-postcss-single/ad1925ec131eb82078364d3ce1bba01ac9bb1f11/files?status=passing),- βœ… **continuous-integration/travis-ci/push** The Travis CI build passed [Details](https://travis-ci.org/jeffjewiss/broccoli-postcss-single/builds/225168975),- βœ… **coverage/coveralls** First build on greenkeeper/mocha-3.3.0 at 95.238% [Details](https://coveralls.io/builds/11210411)

Release Notes coverave

Thanks to all our contributors, maintainers, sponsors, and users! ❀️

As highlights:

  • We've got coverage now!
  • Testing is looking less flaky \o/.
  • No more nitpicking about "mocha.js" build on PRs.

πŸŽ‰ Enhancements

  • #2659: Adds support for loading reporter from an absolute or relative path (@sul4bh)
  • #2769: Support --inspect-brk on command-line (@igwejk)

πŸ› Fixes

  • #2662: Replace unicode chars w/ hex codes in HTML reporter (@rotemdan)

πŸ” Coverage

πŸ”© Other

Commits

The new version differs by 89 commits0.

  • fb1687e :ship: Release v3.3.0
  • 1943e02 Add Changelog for v3.3.0
  • 861e968 Refactor literal play-icon hex code to a var
  • 1d3c5bc Fix typo in karma.conf.js
  • 9bd9389 Fix spec paths in test HTML files
  • 0a93024 Adds tests for loading reporters w/ relative/absolute paths (#2773)
  • 73929ad Comment special treatment of '+' in URL query parsing
  • e2c9514 Merge pull request #2769 from igwejk/support_inspect_break_in_opts
  • 038c636 Support --inspect-brk on command-line
  • b4ebabd Merge pull request #2727 from lamby/reproducible-build
  • 882347b Please make the build reproducible.
  • a2fc76c Merge pull request #2703 from seppevs/cover_utils_some_fn_with_tests
  • ed61cd0 cover .some() function in utils.js with tests
  • f42cbf4 Merge pull request #2701 from craigtaub/landingSpec
  • 6065242 use stubbed symbol

There are 89 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.2.0 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.1.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • ❌ bitHound - Dependencies 2 failing dependencies. Details

  • βœ… bitHound - Code No failing files. Details

Commits

The new version differs by 6 commits .

  • 455619f chore(release): 10.2.0
  • 95cc09a feat: upgrade to version of yargs with extend support (#541)
  • 43535f9 chore: explicit update of istanbuljs dependencies (#535)
  • 98ebdff feat: allow babel cache to be enabled (#517)
  • 50adde4 feat: exclude the coverage/ folder by default πŸš€ (#502)
  • 6a59834 chore(package): update tap to version 10.0.0 (#507)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.12.0 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.11.16
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ bitHound - Dependencies 1 failing dependency. Details

  • βœ… bitHound - Code No failing files. Details

  • βœ… continuous-integration/travis-ci/push The Travis CI build passed Details

  • βœ… coverage/coveralls First build on greenkeeper/coveralls-2.12.0 at 85.484% Details

Release Notes Branch coverage support

Adds branch coverage data to Coveralls API post.

Commits

The new version differs by 2 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Cannot turn off sourcemaps entirely

broccoli-postcss-single seems to not support passing map: false in configuration, as it does || {} to set defaults. This leaves us with no way to completely turn off sourcemaps in production.

An in-range update of mocha is breaking the build 🚨

Version 3.4.2 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… continuous-integration/travis-ci/push The Travis CI build passed Details
  • βœ… coverage/coveralls First build on greenkeeper/mocha-3.4.2 at 95.833% Details
  • βœ… bitHound - Code No failing files. Details
  • ❌ bitHound - Dependencies 1 failing dependency. Details

Release Notes fake-success

3.4.2 / 2017-05-24

πŸ› Fixes

πŸ”© Other

Commits

The new version differs by 7 commits.

  • a15b20a :ship: Release v3.4.2
  • fc802a9 :memo: Add Changelog for v3.4.2
  • 10ff0ec Eagerly set process.exitCode (#2820)
  • fc35691 Merge pull request #2818 from makepanic/issue/2802
  • 3e7152f Remove call to deprecated os.tmpDir (#2802)
  • e249434 Merge pull request #2807 from mochajs/npm-script-lint
  • 17a1770 Move linting into an npm script. Relates to #2805

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of async is breaking the build 🚨

Version 2.4.1 of async just got published.

Branch Build failing 🚨
Dependency async
Current Version 2.4.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As async is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • βœ… bitHound - Code No failing files. Details
  • ❌ bitHound - Dependencies 1 failing dependency. Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of async is breaking the build 🚨

Version 2.2.0 of async just got published.

Branch Build failing 🚨
Dependency async
Current Version 2.1.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As async is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… bitHound - Code No failing files. Details

  • ❌ bitHound - Dependencies 2 failing dependencies. Details

  • βœ… continuous-integration/travis-ci/push The Travis CI build passed Details

  • βœ… coverage/coveralls First build on greenkeeper/async-2.2.0 at 95.238% Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.