Giter Club home page Giter Club logo

coffeelint-brunch's Introduction

Brunch Weekly downloads Yearly downloads

Web applications made easy. Since 2011.

Fast front-end web app build tool with simple declarative config and seamless incremental compilation for rapid development.

Usage

Install Brunch with a simple node.js package manager command:

npm install -g brunch
  1. Create a new Brunch project: brunch new [--skeleton url]
    • skeleton specifies a skeleton from which your application will be initialized. The default skeleton (dead-simple) doesn't have any opinions about frameworks or libraries.
    • brunch.io/skeletons contains over 50 boilerplate projects, which you can use to init your app from.
  2. Develop with Brunch: brunch watch --server
    • tells Brunch to watch your project and incrementally rebuild it when source files are changed. The optional server flag launches a simple web server with push state support.
  3. Deploy with Brunch: brunch build --production
    • builds a project for distribution. By default it enables minification.

Learn

Contributing

See the CONTRIBUTING.md document for more info on how to file issues or get your head into the Brunch's internals.

  • To install edge version (from GitHub master branch): npm install -g brunch/brunch
  • To enable debug mode, simply pass -d flag to any command like that: brunch build -d
  • To create your own plugin, check out our plugin boilerplate as a starting point.

License

MIT license (c) 2021 Paul Miller paulmillr.com, Elan Shanker, Nik Graf, Thomas Schranz, Allan Berger, Jan Monschke, Martin Schürrer

See LICENSE file.

coffeelint-brunch's People

Contributors

anaphase avatar denysdovhan avatar es128 avatar gabehayes avatar goshacmd avatar ilkosta avatar paulmillr avatar urosgruber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

marsch dantaub

coffeelint-brunch's Issues

brunch crash with unmatched indent/outdent

Would be nice if brunch didnt crash at this point:

-> brunch w

/usr/local/share/npm/lib/node_modules/brunch/lib/fs_utils/source_file.js:51
        if (error != null ? error.match(/^warn\:\s/i) : void 0) {
                                  ^
TypeError: Object SyntaxError: unmatched OUTDENT on line 131 has no method 'match'
    at /usr/local/share/npm/lib/node_modules/brunch/lib/fs_utils/source_file.js:51:35
    at /usr/local/share/npm/lib/node_modules/brunch/node_modules/async/lib/async.js:110:21
    at /usr/local/share/npm/lib/node_modules/brunch/node_modules/async/lib/async.js:24:16
    at CoffeeLinter.module.exports.CoffeeLinter.lint (/Users/andreas/www/beepsend/webportal/lunch/node_modules/coffeelint-brunch/lib/index.js:49:14)
    at /usr/local/share/npm/lib/node_modules/brunch/lib/fs_utils/source_file.js:21:23
    at /usr/local/share/npm/lib/node_modules/brunch/node_modules/async/lib/async.js:108:13
    at Array.forEach (native)
    at _each (/usr/local/share/npm/lib/node_modules/brunch/node_modules/async/lib/async.js:32:24)
    at Object.async.each (/usr/local/share/npm/lib/node_modules/brunch/node_modules/async/lib/async.js:107:9)
    at lint (/usr/local/share/npm/lib/node_modules/brunch/lib/fs_utils/source_file.js:20:20)
    at /usr/local/share/npm/lib/node_modules/brunch/lib/fs_utils/source_file.js:50:14
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

Broken pattern

After investigation why Coffee linter stopped throwing warnings I noticed that pattern is broken. Looks like bug introduced during interface upgrade to 2.0. #17 fix this.

Error on using npm install

I tried to add the linter to an already existing brunch application. Upon installing, npm throws the following error (paths changed for my privacy :)

> [email protected] postinstall project/node_modules/coffeelint-brunch
> node setup.js postinstall

Executing node node_modules/coffee-script/bin/coffee -o lib/ src/

module.js:340
    throw err;
          ^
Error: Cannot find module 'project/node_modules/coffeelint-brunch/node_modules/coffee-script/bin/coffee'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
[email protected] node_modules/coffeelint-brunch
└── [email protected] ([email protected], [email protected])

It's trying to reach the coffee-script module assuming it's installed within the coffeelint-brunch module, but as my project already has coffee-script as a dependancy, it's not installed at that path.

linter warnings should not prevent compilation

Coffeelint allows error, warn, and ignore as level settings for each of its tests. It would be better if options set to warn raised their warning, but still allowed brunch compilation to complete.

Brunch build fails with "ReferenceError: async is not defined"

I added "coffeelint-brunch": "git://github.com/ilkosta/coffeelint-brunch.git#master" to my package.json and ran npm install.

Running brunch build failed with this stacktrace:

/usr/local/lib/node_modules/brunch/lib/fs_utils/source_file.js:48
        return async.forEach(this.linters, function(linter, callback) {
               ^
ReferenceError: async is not defined
    at SourceFile.module.exports.SourceFile._lint (/usr/local/lib/node_modules/brunch/lib/fs_utils/source_file.js:48:16)
    at module.exports.SourceFile.compile (/usr/local/lib/node_modules/brunch/lib/fs_utils/source_file.js:86:22)
    at fs.readFile (fs.js:176:14)
    at fs.close (/usr/local/lib/node_modules/brunch/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js:92:5)
    at Object.oncomplete (fs.js:297:15)

Other brunch dependencies I'm using:

    "dependencies":{
        "javascript-brunch":"git://github.com/brunch/javascript-brunch.git#master",
        "coffee-script-brunch":"git://github.com/brunch/coffee-script-brunch.git#master",
        "sass-brunch":"1.4.1",
        "css-brunch":"git://github.com/brunch/css-brunch.git#master",
        "jade-brunch":"git://github.com/brunch/jade-brunch.git#master",
        "uglify-js-brunch":"git://github.com/brunch/uglify-js-brunch.git#master",
        "coffeelint-brunch": "git://github.com/ilkosta/coffeelint-brunch.git#master",
        "clean-css-brunch":"git://github.com/brunch/clean-css-brunch.git#master",
        "auto-reload-brunch":"git://github.com/brunch/auto-reload-brunch.git#master"
    }

Environment: node 0.8.4, npm 1.1.45, Mac OS 10.8

Coffeelint support for server code in brunch?

I use brunch for both my client and server code. I would like to run coffeelint-brunch against both, but if I update coffeelint.pattern to include my server directory, it only works if I also add my server directory to paths.watched (which I believe is the wrong way to go). Is there a way to do this?

Change version to 1.4

As per brunch convention (in the project readme), if you’ve been making the plugin for brunch 1.4, it should be versioned as 1.4.x. This allows to update plugins simply, just changing 1.5 on new brunch release to 1.6:

{
    "javascript-brunch": ">= 1.0 < 1.5",
    "coffee-script-brunch": ">= 1.0 < 1.5",

    "css-brunch": ">= 1.0 < 1.5",
    "stylus-brunch": ">= 1.0 < 1.5",
    "less-brunch": ">= 1.0 < 1.5",

    "handlebars-brunch": ">= 1.0 < 1.5",

    "uglify-js-brunch": ">= 1.0 < 1.5",
    "clean-css-brunch": ">= 1.0 < 1.5",

    "coffeelint-brunch": ">= 1.0 < 1.5"
}

I’ve picked the convention because version is not as important for brunch plugins as it is important for software plugin consumes (coffeelint) and for what it’s made (brunch). You won’t bump it as often etc. And even if you will, you can always bump only patch ver.

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.