Giter Club home page Giter Club logo

np's Introduction

Np

Source for node pattern debugger

Development

After checking out the repo, run bin/setup to install dependencies.

Do rake serve to start a local server.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/marcandre/np.

License

The gem is available as open source under the terms of the MIT License.

np's People

Contributors

marcandre avatar sambostock avatar

Stargazers

Jerome Dalbert avatar Gaston Morixe avatar Yudai Takada avatar Bart de Water avatar  avatar Pedro Augusto Ramalho Duarte avatar Marco Roth avatar Kohei Yamada avatar Andy Maleh avatar Jordan Tepper avatar Scott Moore avatar Dat Le-Tien avatar

Watchers

 avatar James Cloos avatar  avatar

np's Issues

To do

Search

  • run locally, search files
  • run pattern against top 500 gems
  • replace, with list of captures/location => text/capture/location

Debugging

  • allow defining patterns as methods and allow calling them from other patterns

UI

  • show last value attempted as a match (as popover?) (already part of the JSON response)
  • improve display of Ruby AST. One day use astexplorer's?

Editing

  • generate URLs to be able to restore state (not saved to DB, just long URL with all the data in it)
  • button to produce pattern from ruby code (e.g. hello(42, _) => (send nil? :hello (int 42) _))
  • same, but to add/remove to an existing pattern (seems hard to produce something good)

Code

  • Create README / contributing / ...
  • Spec for server (with VCR)
  • Setup CI
  • Add rubocop

Use code block for AST

A quick win to improve the rendering of the Ruby AST would be to use a Bootstrap code block, instead of a <div>. This would preserve the whitespace included by the output of to_s.

I would have opened a PR, but I can't get the server to run, and am not familiar with Parcel to debug it.

How do I run np locally?

Hey @marcandre. While trying to run np locally, I found that:

  1. It requires Ruby 3.1 (3.2 won’t work), but doesn’t have a .ruby-version file.
  2. It has a gemspec, but is a service. Or can it be used as a gem too?
  3. Running rake serve isn’t documented in Readme. Also, I think I need to compile assets first.
  4. There is a build_assets rake task which seems to require Parcel (could it be added to package.json?). But even after installing it, I cannot figure out how to build the assets.

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.