I have 2 files. ./main.coffee and ./shared.coffee. I'd like to use makefile to compile both then concatinate it into ./main.js.
This is what I currently have:
public: main.min.js
main.min.js: main.js
uglifyjs ./main.js > ./main.min.js
#combine the shared files with the compiled main.coffee
main.js: ./main.coffee
coffee -c ./main.coffee #problem1
cat ./main.js ./shared.js > ./main.js
shared: ./shared.coffee
coffee -c ./shared.coffee
I know this will give an error for the cat operator. How do I just compile and pass the contents from the line labeled problem1 to the cat method without generating main.js from it.
For eg. the coffeescript site gave this: Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. Good for use with processes written in other languages. An example:
cat src/cake.coffee | coffee -sc how do I combine this method with cat to just merge the files?