Code Monkey home page Code Monkey logo

ysprite's Issues

Memory error

When images are large than normal icon, it will have no enough memory:

<--- Last few GCs --->

   93221 ms: Mark-sweep 1376.9 (1434.5) -> 1376.9 (1434.5) MB, 1398.0 / 0.0 ms [allocation failure] [GC in old space requested].
   94574 ms: Mark-sweep 1376.9 (1434.5) -> 1376.9 (1405.5) MB, 1352.5 / 0.0 ms [last resort gc].
   95946 ms: Mark-sweep 1376.9 (1405.5) -> 1376.9 (1405.5) MB, 1371.7 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1f10224cfb51 <JS Object>
    1: getPixel [/Users/creeper/.nvm/versions/node/v6.9.0/lib/node_modules/.ysprite_npminstall/node_modules/.0.0.9@lwip/lib/ImagePrototypeInit.js:~78] [pc=0x1f65238634e5] (this=0x3a34d0decd89 <an Image with map 0x35bc58057d99>)
    2: arguments adaptor frame: 2->0
    3: appendImage [/Users/creeper/.nvm/versions/node/v6.9.0/lib/node_modules/.ysprite_npminstall/node_modules/.3.0.0@ysprite/lib/im...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/creeper/.nvm/versions/node/v6.9.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/creeper/.nvm/versions/node/v6.9.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/creeper/.nvm/versions/node/v6.9.0/bin/node]
 4: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/Users/creeper/.nvm/versions/node/v6.9.0/bin/node]
 5: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/creeper/.nvm/versions/node/v6.9.0/bin/node]
 6: 0x1f65235092a7
[1]    13460 abort      ysprite -s "*.png" -o tt.png --no-retina --no-style

failed generate sprite

just install with:
npm install -g ysprite

folder structure:
2016-02-16 9 38 05

and run with:
2016-02-16 9 38 46

However,it do generate a sprite image without css file,but it seems that the result is repeating.
2016-02-16 9 40 13

i try to run ysprite -r in the folder sprites and it works!

v3

ysprite v3:

  • update to [email protected], so we can support [email protected]+.
  • use nyc to run code coverage.
  • only support node@6+ (users should use webpack to transfrom code himself on demand).
  • change code style.
  • more simple API

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.