Closed michaelficarra closed 11 years ago
Yes, please. The issue I raised (#11) last time would be moot anyway, if you added a "Generated By" header.
We have a "generated by" header: https://github.com/michaelficarra/commonjs-everywhere/blob/84a590afe9a43fbb6cec287c94d502b16bd75203/src/bundle.coffee#L100-L103
Ah, right. I remembered that, then I searched the issue, found nothing and assumed I was mixing up.
@Nami-Doc: Can you try out branch GH-69
and see if that will be sufficient?
already on it.
works fine. Now I gotta fix coffee-script's run so that it doesn't require fs.realPathSync and we're good to go
Alright, awesome. Open a pull request on jashkenas/coffee-script when you're done. Make sure to add commonjs-everywhere only as a devDependency.
problem : escodegen generates a 32829 lines long parser because of the array ...
@Nami-Doc: Use the minify
option.
yeah, I wanted to avoid it for my debug but that's fine anyway. I still have an issue "cannot set property 'lexer' of undefined" but I'll find a way.
Also, use 0.7.2
. I'll publish a new patch version.
edit: done.
$ make release-patch
node_modules/.bin/mocha --compilers coffee:coffee-script-redux/register -r coffee-script-redux/register -r test-setup.coffee -u tdd -R dot test/*.coffee
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
36 tests complete (776 ms)
Current version is 0.7.1. This will publish version 0.7.2. Press [enter] to continue.
echo "v0.7.2" >CHANGELOG
changelogger changelog >>CHANGELOG
node -e '\
var j = require("./package.json");\
j.version = "0.7.2";\
var s = JSON.stringify(j, null, 2);\
require("fs").writeFileSync("./package.json", s);'
git commit package.json CHANGELOG -m 'Version 0.7.2'
[master 1633449a] Version 0.7.2
2 files changed, 11 insertions(+), 3 deletions(-)
git tag -a "v0.7.2" -m "Version 0.7.2"
git push --tags origin HEAD:master
Counting objects: 8, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 775 bytes, done.
Total 5 (delta 3), reused 0 (delta 0)
To git@github.com:michaelficarra/commonjs-everywhere.git
c94ec2f2..1633449a HEAD -> master
* [new tag] v0.7.2 -> v0.7.2
npm publish
npm http PUT https://registry.npmjs.org/commonjs-everywhere
npm http 409 https://registry.npmjs.org/commonjs-everywhere
npm http GET https://registry.npmjs.org/commonjs-everywhere
npm http 200 https://registry.npmjs.org/commonjs-everywhere
npm http PUT https://registry.npmjs.org/commonjs-everywhere/-/commonjs-everywhere-0.7.2.tgz/-rev/43-7cc768119a5948d31a95bb5bc6d2267d
npm http 201 https://registry.npmjs.org/commonjs-everywhere/-/commonjs-everywhere-0.7.2.tgz/-rev/43-7cc768119a5948d31a95bb5bc6d2267d
npm http PUT https://registry.npmjs.org/commonjs-everywhere/0.7.2/-tag/latest
npm http 201 https://registry.npmjs.org/commonjs-everywhere/0.7.2/-tag/latest
+ commonjs-everywhere@0.7.2
Looks like I broke everything, parser is generated as an empty file ... sigh
Ahah, but I have a bigger problem haha. I can't alias /src/parser.{js,coffee}
to /lib/coffee-script/parser.js
because the file doesn't exist in the first place. I have no idea how to work around that.
@Nami-Doc: Just run it on /lib/coffee-script/browser.js
instead. It's not like you need source maps. It's going to be more efficient that way, too, since you don't need to compile he CoffeeScript and generate JS. If you were using CSR and did want source maps, I still don't have a solution for that. See https://github.com/michaelficarra/CoffeeScriptRedux/blob/master/src/parser.coffee. The resolution function needs to respect aliases, but I use a library for npm-style resolution.
Well, if I want to use an empty parser.coffee
, it means in browser:build, I have to create an empty parser.coffee and delete it when everything is built. And people already asked for source maps from the browser : jashkenas/coffee-script#2847
@Nami-Doc will like this one.