Coder Social home page Coder Social logo

bal-util's People

Contributors

balupton avatar sfrdmn avatar

Stargazers

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

Watchers

 avatar

bal-util's Issues

TypeError: Arguments to path.join must be strings

I'm getting this error when attempting to run Docpad under the new 0.10 stable version of Node.js. Seems to be originating in bal-util.

The same error repeats about 15 times and then Docpad quits.

error: An error occured:
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at /usr/local/lib/node_modules/docpad/out/lib/plugin-loader.js:73:71
at /usr/local/lib/node_modules/docpad/node_modules/bal-util/out/lib/paths.js:62:18
at fs.js:252:14
at Object.oncomplete (fs.js:93:15)

readPath behind proxy

Working with docpad behind a proxy and having issues with loading the skeletons, could this be related to readPath?

Failure to spawn certain processes on Windows

I am having an issue on windows when trying to spawn ruby processes like compass or sass. I haven't tracked down the exact issue, but it seems related to this: nodejs/node-v0.x-archive#2318

I have applied the proposed fix (commit incoming) and it seems to work well in my case. I don't have time/setup to give a throughout test, though.

getEncodingSync error.

Docpad's articles written in Korean with UTF-8 encoding may be detected as 'binary' in balUtilPaths.getEncodingSync function.

I think the 'chunkBegin' position value of mid-chunk or last-chunk is not fit to Korean. (It uses 3 bytes for a character for Korean in utf-8)

I use modified docpad source (parseData in file.coffee) myself but I try to find solution for this problem.

if data instanceof Buffer
    encoding = balUtil.getEncodingSync(data)
    if this.get('fullPath').substr(this.get('fullPath').length-3) in ['.md', 'tml', 'htm']
        encoding = 'utf8'

http://dogfeet.github.com

Docpad - error thrown in bal-util

SyntaxError: In /usr/local/lib/node_modules/docpad/node_modules/bal-util/lib/paths.coffee, octal literal '0700' must be prefixed with '0o' on line 92
at SyntaxError (unknown source)
at Lexer.error (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/lexer.js:686:13)
at Lexer.numberToken (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/lexer.js:138:14)
at Lexer.tokenize (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/lexer.js:35:159)
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:43:32
at Object..coffee (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:19:17)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)

Causes docpad to fail

getLocaleCode() null error

After updating docpad to v 6.24.2 I startedd getting error, that null object doesn't have replace() method. This error pointed on file modules.js in this module, line 69 code:

localeCode = balUtilModules.getLocaleCode(localeCode);
countryCode = localeCode.replace(/^([a-z]+)_-$/i, '$2').toLowerCase() || null;

So I changed getLocaleCode() method like this(replaced null):

localeCode = lang.replace(/..+/, '').replace('-', '_').toLowerCase() || "";

Maybe this need to be included in code?

Globals

Hello! I recently started using watchr which depends on this package and discovered that it leaks 6 global variables. Just wondering what your reason was as It's common practice to avoid globals wherever possible. Not a huge deal given their names but I like to keep things clean! ๐Ÿ‘

warn: Global Defined: numberOfOpenFiles
warn: Global Defined: maxNumberOfOpenFiles
warn: Global Defined: waitingToOpenFileDelay
warn: Global Defined: numberOfOpenProcesses
warn: Global Defined: maxNumberOfOpenProcesses
warn: Global Defined: waitingToOpenProcessDelay

Cheers!

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.