Giter VIP home page Giter VIP logo

autoprefixer-brunch's People

Contributors

indolering avatar lydell avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autoprefixer-brunch's Issues

TypeError: Cannot read property 'css' of undefined

I get TypeError: Cannot read property 'css' of undefined when I try to use autoprefixer-brunch. I am building generated/ from src/. It worked well before I added autoprefixer-brunch.

My config.js looks like this:

/**
 * brunch config
 */

exports.config = {
  paths: {
    'public': 'generated',
    'watched':['src']
  },

  files: {
    javascripts: {
      defaultExtension: 'js',
      joinTo: {
        'js/app.js': /^src/,
        'js/ie.js': /^bower_components[\\/](?=json3|es5-shim)/,
        'js/vendor.js': /^bower_components[\\/](?!json3|es5-shim)/,
      }
    },

    stylesheets: {
      defaltExtension: 'less',
      joinTo: {
        'css/site.css': /^src\/less\/site.less/,
      }
    }
  },

  plugins:{
    autoprefixer:{
      browsers: ["last 1 version", "> 1%", "ie 8", "ie 7"]
    }
  },

  framework: 'AngularJS',

  server:{
    path: 'app.js',
    port: 5000,
    base: 'generated'
  }

};

and my package.json looks like this:

{
  "name": "project",
  "version": "0.0.0",
  "author": "David Konsumer <[email protected]>",
  "dependencies": {
    "express": "^4.0.0",
    "morgan": "^1.0.0",
    "serve-static": "^1.0.4",
    "body-parser": "^1.0.2",
    "chalk": "^0.4.0"
  },
  "devDependencies": {
    "brunch": "^1.7.13",
    "less-brunch": ">=1.7.0",
    "autoprefixer-brunch": "^1.7.7",
    "clean-css-brunch": ">=1.7.1",
    "javascript-brunch": ">=1.7.0",
    "ngmin-uglify-js-brunch": "~1.7.2",
    "auto-reload-brunch": "^1.7.3"
  },
  "engines": {
    "node": ">=0.8.0"
  },
  "scripts": {
    "start": "brunch w -s"
  }
}

The full error, when I run brunch b (even with --production,) looks like this:

/Users/konsumer/Documents/Projects/PROJECT/node_modules/autoprefixer-brunch/lib/index.js:34
      data: result.css,
                  ^
TypeError: Cannot read property 'css' of undefined
    at AutoprefixerCompiler.module.exports.AutoprefixerCompiler.compile (/Users/konsumer/Documents/Projects/PROJECT/node_modules/autoprefixer-brunch/lib/index.js:34:19)
    at /Users/konsumer/Documents/Projects/PROJECT/node_modules/brunch/lib/fs_utils/pipeline.js:94:31
    at fn (/Users/konsumer/Documents/Projects/PROJECT/node_modules/brunch/node_modules/async-waterfall/index.js:19:24)
    at Object._onImmediate (/Users/konsumer/Documents/Projects/PROJECT/node_modules/brunch/node_modules/async-waterfall/index.js:58:22)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

LESS/Sass/Stylus Mixins/Vars Only

I think this plugin should just concern itself with CSS only (not LESS, Sass, Stylus, etc.) by removing the pattern parameter since it would likely be one of the last steps. (at least before minification) EDIT: Likely not the solution.

One issue that happens is I may have a file called variables.xxx or mixins.xxx that only contains variables and mixins that are to be included in other files. Those files don't have any CSS and the plugin complains that result is undefined. I could avoid this by preceding with an underscore, but then it doesn't get monitored by watch.

Current versioning does not follow Brunch guidelines

According to Brunch docs, current versioning does not follow Brunch guidelines.

For example, I am using brunch 1.7.17, I use >= 1.0 < 1.8, version 1.8.3 (the current version) which is compatible with 1.7.17, will not be a candidate for update (npm outdated --depth=0) when running npm update

Solution would be to change the current version to at least 1.7.14 but less than 1.8, otherwise workaround for users would be to change the version to >= 1.0 < 1.8.4 or 1.8.4.

Pipe Source Maps from Brunch to Autoprefixer

Autoprefixer can accept existing source maps. Plugin currently does not use map from Brunch, breaking source map flow. Something like this should fix it.

result = @compiler.process(data, {map: JSON.stringify(map), from: path})

Wrong link to brunch

In REDAME “branch” link use https protocol, but branch.io answers only on http.

Install not working: Error: No compatible version found

Hi, I'm trying to get sass and sourcemaps working with brunch but install fails. Typing npm install --save autoprefixer-brunch, I get the following NPM error:

Error: No compatible version found: autoprefixer@'lydell/autoprefixer#source-maps'

Something missing?

Use Autoprefixer 3.0

Please, use autoprefixer-core, instead of autoprefixer npm package. Core package was cleaned from file system and CLI code and has no fs-extra dependency.

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.