jorgebucaran / classcat

Build a class attribute string quickly
MIT License
905 stars 22 forks source link

Running benchmarks locally requires build #22

Closed eps1lon closed 6 years ago

eps1lon commented 6 years ago
$ git clone https://github.com/jorgebucaran/classcat.git
$ cd classcat/bench
$ npm i
$ node .
[...]
Error: Cannot find module '../'
[...]

Only after running npm run build and applying to following patch to bench/index.js

-const cc = require("../")
+const cc = require("../dist/classcat")

was I able to run the benchmarks as described in bench/README.md

jorgebucaran commented 6 years ago

Thanks for discovering this. I've added a new npm script npm run bench to simplify running the benchmarks.

Thanks! 🎉

https://github.com/jorgebucaran/classcat/blob/0bfd90dfbd9b183f852d3b0070955bd7e1683e53/package.json#L29