twoside.js is released.

359 views
Skip to first unread message

Simeon Chaos

unread,
Dec 3, 2013, 5:31:11 PM12/3/13
to nod...@googlegroups.com
twoside.js can make module to be used in both server side and client side.
Just ·npm install twoside·, and then copy twoside.js to your folder.

Ryan Schmidt

unread,
Dec 3, 2013, 7:18:48 PM12/3/13
to nod...@googlegroups.com
Perhaps you could explain how this differs from the existing solutions, why one would use this instead of the existing solutions, etc.


Simeon Chaos

unread,
Dec 3, 2013, 10:09:41 PM12/3/13
to nod...@googlegroups.com
Just simpler, smaller. It's only one file about 1.4kb.
Require.js and sea.js target the client side javascript moularization, but do not access how to make module to be used in both side.
Browserify traverses the ast of javascript and comile to a new generated file for client side use. So maybe there are some inconveniences with debug when developping.

在 2013年12月4日星期三UTC+8上午8时18分48秒,ryandesign写道:

Дмитрий Карпич

unread,
Dec 3, 2013, 10:42:56 PM12/3/13
to nod...@googlegroups.com
I'm really dont see why this solution better than dosen other.
You write in docs - "wrap module" - looks like bad idia. How I can use node.js (server-side) tests?
Actually I use my own solution for CJS -> browser compilling and its not 'lite & simply' just becouse its hard :-)

Simeon Chaos

unread,
Dec 4, 2013, 7:17:20 AM12/4/13
to nod...@googlegroups.com
My solution is not perfect, and is not better than other, but it meets my own requirements. Besides, I'm very interested in your solution. Have you published it? 

在 2013年12月4日星期三UTC+8上午11时42分56秒,Дмитрий Карпич写道:

Дмитрий Карпич

unread,
Dec 4, 2013, 11:13:19 AM12/4/13
to nod...@googlegroups.com

Sure :-)
It's called clinch - sort of browserify idea, but specified for CoffeeScript (my love) All here - https://npmjs.org/package/clinch

04.12.2013 16:17 пользователь "Simeon Chaos" <simeon...@gmail.com> написал:
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/lUbVUFEVVrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Simeon Chaos

unread,
Dec 4, 2013, 10:03:24 PM12/4/13
to nod...@googlegroups.com
Great works. 
How about comparing clinch vs browserify?
If clinch or browserify can do 100%, then twoside can do only 20%. Maybe 20% is enough for 80% of people. :) 

在 2013年12月5日星期四UTC+8上午12时13分19秒,Дмитрий Карпич写道:

Дмитрий Карпич

unread,
Dec 5, 2013, 12:04:04 AM12/5/13
to nod...@googlegroups.com

I build clinch becouse browserify v1 was be, hm 'great but huge', as Dart :-) .
At now it should be better with v2, but I dont compare it another once, I have clich now :-)
May be 20% by twoside is enough - any way dozen of tools better than none.   May you orovide some more examples of usage?

05.12.2013 7:03 пользователь "Simeon Chaos" <simeon...@gmail.com> написал:

Simeon Chaos

unread,
Dec 5, 2013, 5:58:40 PM12/5/13
to nod...@googlegroups.com
May you orovide some more examples of usage?
I'm really sorry. I'm afraid that I have no spare time. I'm busy in another private project, twoside.js is just one utility I created in the project.

在 2013年12月5日星期四UTC+8下午1时04分04秒,Дмитрий Карпич写道:

Simeon Chaos

unread,
Dec 26, 2013, 10:53:32 PM12/26/13
to nod...@googlegroups.com
Now twoside.js is upgraded to 0.1.7.  A initial big bug, which had been prevented it working on node.js,  was fixed in earlier version. After testing it with karm test runner in client side, mocha test framework on server side, I have used it on my own project successfully. Now I have forgotten browerifyjs for a long time :)

在 2013年12月6日星期五UTC+8上午6时58分40秒,Simeon Chaos写道:

Simeon Chaos

unread,
Mar 6, 2014, 2:35:09 AM3/6/14
to nod...@googlegroups.com
twoside.js 0.1.8 is released. With gulp-twoside.js (a gulpjs plugings I wrote, under the root folder of the twoside package), now it is not necessary to wrap the twoside modules manually. Besides, now twoside support require node_modules and folders with index.js in it. Please "npm install twoside" or see https://github.com/chaosim/twoside for more information.

# what's new in 0.1.8
  * use gulpjs to build
  * now twoside can make npm package and require folder by putting an index.js in it.
  * modify and add new stuffs in nodesample.js, twoside-samples.js, twoside-in-npm twoside-in-npm
  * minify by google-closure(using gulp-closure-compiler), twoside.js is 976 bytes now.

Simeon Chaos

unread,
Mar 7, 2014, 1:10:35 AM3/7/14
to nod...@googlegroups.com
### what's new in 0.1.9
  * add pathMap as third argument for gulp-twoside plugin, so that the module name in browser can be renamed, the packages can be reorganized, see src/lib and gulpfile.coffee for examples.
  * the first parameter "basepath" of gulp-twoside plugin  add __dirname automatically now.
  * path in `twoside(path)` can be a package name now. 
Reply all
Reply to author
Forward
0 new messages