tcorral / Design-Patterns-in-Javascript

Design Patterns applied to Javascript code.
http://tcorral.github.com/Design-Patterns-in-Javascript/
2.63k stars 528 forks source link

Displaying code in index.html files #1

Closed adamnbowen closed 13 years ago

adamnbowen commented 13 years ago

If you had a minimal amount of css in your .html files, you could display the code present when people open it (so they can see the code while they play with the console:

script {
    display: block;
    white-space: pre;
}
adamnbowen commented 13 years ago

Though I suppose there is still the issue of displaying the actual pattern in the html... might want to use some javascript templating language to automatically include the js files inline so we can see the pattern in a given .html file. You could possibly eliminate the .html files entirely if you just assembled the pages from 'Pattern.js' files and 'console.js' files.

tcorral commented 13 years ago

Thanks. I hope you like the new implementation.