hikari-no-yume / Firth

Firth is a functional, strongly dynamically-typed, concatenative stack-oriented programming language.
Other
29 stars 2 forks source link

npm-packigification #17

Closed mathroc closed 9 years ago

mathroc commented 9 years ago

First try at making a npm package out of Firth

interpreting a source file from the CLI works!

gulp build concatenated files but minification & sourcemaps don't work

hikari-no-yume commented 9 years ago

I have to say I'm a bit uneasy with the number of dependencies this adds, and it doesn't really get rid of the IIFEs which is unfortunate

hikari-no-yume commented 9 years ago

Also, the compiled output probably shouldn't be in the repository. The whole of dist should probably be .gitignored. GitHub's releases system can be used for pre-compiled versions.

hikari-no-yume commented 9 years ago

But, otherwise, good work so far!

hikari-no-yume commented 9 years ago

Oh, one more thing: four spaces, not tabs, please!

mathroc commented 9 years ago

ow, the dependancies are mostly devDeps. I fixed that and the tabs

about the dist/ folder and what should be inside. in the long run, do you think that test.html & gulpfile.js shoud be inside the package? to me it should be another repo or maybe in exemples/web-firth/

mathroc commented 9 years ago

oh, and I can get rid of the IIFEs, I just wanted to do as few changes as possible to existing files

hikari-no-yume commented 9 years ago

test.html might eventually be moved somewhere, I don't know

mathroc commented 9 years ago

well it makes the diff a lot bigger without the IIFEs as github don't, afaik, have a --ignore-space-changes option

hikari-no-yume commented 9 years ago

Hey, how do I actually use the gulp thing?

mathroc commented 9 years ago

I suppose you have npm installed on your system already

run npm install and then gulp it should build 2 files in dist/ once that's done you can open test.html again and it should work as before. (gulp --watch if you want it to build the file each time a source file is edited)

but you don't need gulp for the CLI tool. for the CLI, after npm install just do ./bin/firth.js some-file.txt

mathroc commented 9 years ago

I just added exemples\web to try what it would look like to move test.html into another folder. it contains the minimum needed Firth into a web project with browserify

if that's something that could work, I can remove /gulpfile.js, /src/web.js, /test.html and devDependancies from package.json

let me know what you think

hikari-no-yume commented 9 years ago

I see

Well, for starters, the English word is ex_a_mples

mathroc commented 9 years ago

since you've already merged the firsts commits, this new version of the PR shows what it would look like with test.html only in examples/web

hikari-no-yume commented 9 years ago

Could be done, but I don't see the point.