Giter Club home page Giter Club logo

minty's People

Contributors

angieyeh avatar juniorbird avatar tzilist avatar vitaly-t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

minty's Issues

Problem running example

Hi,
Trying to run simple example, I have created simple index.js and minty.js with following

// minty.js
const minty = require('minty')
minty.file(require('path').join(__dirname, 'index.js'))

I get the jquery error (-1 is correct console log print from index.js)

$ node minty.js 
-1
Minty has finished analyzing index.js
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/gleb/git/test-minty/node_modules/minty/node_modules/jquery/dist/jquery.min.js'
    at Error (native)

does this even work? :)

When I try using this code:

minty.file(path.join(__dirname, 'test.js'));

in any combination, it never works, always complaining about some path-related issues, like this one:

{ [Error: ENOENT: no such file or directory, open 'D:\NodeJS\tests\minty\file\D:\NodeJS\tests\test.js_Sun_Apr_17_2016_13-40-35_GMT+0100_(GMT_Daylight_Time).html']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'D:\\NodeJS\\tests\\minty\\file\\D:\\NodeJS\\tests\\test.js_Sun_Apr_17_2016_13-40-35_GMT+0100_(GMT_Daylight_Time).html' }

I only can make it work by using this:

minty.file('test.js');

Which then produces:

#################################################################################
Minty has found an error! Please check the out put of test.js for more details
#################################################################################

Minty has finished analyzing test.js

when I check that file, all I'm seeing is this:

result

No links, no error reporting,...in fact nothing useful at all. What am I missing?

UPDATE

On another-re-read... it says:

Click forward and back to step through your variables' state as your app executes!

When My app executes, it generates that report, and then it's done. How do I do that parallel running to see the app execute?

Circular JSON

Need to fix issue when wrapping output data that contains circular reference.

decomment

About this code:

minty.splitFile = function splitFile(results, file, callback) {
  results = decomment(results, {
    space: true
  });
  results = decomment(results);
  results = results.split('\n');
  callback(null, results, file);
};

May I ask, what the second call into decomment is supposed to accomplish? The first one removes all comments, replacing them with white spaces, as per option space. And the second one - it won't do anything, imo (I'm the author of decomment).

The other bit is interesting:

  results = results.split('\n');

It made me realize that I should have exposed the method to correctly determine the End-of-Line a while back, so I did it in version 0.8.6 just now.

If you want to use the correct End-of-Line, update to 0.8.6 and use this:

var EOL = decomment.getEOL(results);
results = results.split(EOL);

front-end code in the file being tested may cause graphViz code to be displayed unparsed

Example:

'use strict';
const minty = require('minty');
const http = require('http');


const testDoc = `
<html>
  <head>
    <title>Minty Node Example</title>
    <script type="text/javascript">
    var alertContent = 'If this alert shows, you have done a  great job!';

    function showAlert(string) {
      alert(string);
    }
    </script>
  </head>
  <body onload="showAlert(alertContent);">
    <h1>Minty Node Example</h1>
    <p>
      <a onclick="showAlert(alertContent)">Click to show alert again</a>!
    </p>
  </body>
</html>
`;

const testHeader = { 'Content-Type': 'text/plain' }

function sendContent(response, content, header) {
  response.writeHead(200, header);
  response.end(content);
}

var sendMinty = minty.wrap(sendContent);

http.createServer((req, res) => {
  sendMinty(res, testDoc, testHeader);
}).listen(3000);

Generator Functions aren't yielding output when wrapped

Generator functions when minty.wrapped yield undefined

Example:

const minty = require('minty');

function* fooMaker(bar) {
  yield bar * 2;
  yield* fooMaker(bar);
}

var one = fooMaker(2);
console.log(one.next().value);
console.log(one.next().value);
console.log(one.next().value);

var two = minty.wrap(fooMaker);
console.log(two(2));

/* returns 
{}
4
4
4
undefined // should be 4
*/

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.