NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| var net = require('net') | |
| var sock = net.connect(1337) | |
| process.stdin.pipe(sock) | |
| sock.pipe(process.stdout) | |
| sock.on('connect', function () { | |
| process.stdin.resume(); | |
| process.stdin.setRawMode(true) |
| // This is a combination of two modified files from jQuery Mobile, | |
| // jquery.mobile.vmouse.js and jquery.mobile.event.js | |
| // They were modified to only provide the touch event shortcuts, and | |
| // avoid the rest of the jQuery Mobile framework. | |
| // The normal jQuery Mobile license applies. http://jquery.org/license | |
| // | |
| // This plugin is an experiment for abstracting away the touch and mouse | |
| // events so that developers don't have to worry about which method of input | |
| // the device their document is loaded on supports. | |
| // |
| - Trailing commas are ok | |
| - No reserved words for property names | |
| - NaN, Infinity, undefined : are all constants | |
| - parseInt() defaults to radix 10 | |
| - /regexp/ produces new reg ex object every time | |
| - JSON.parse(), JSON.stringify() | |
| - Function.prototype.bind | |
| - String.prototype.trim | |
| - Array.prototype.every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some, | |
| - Date.now() |
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |
I want to start writing libraries and large applications using the JavaScript language. However, I don't know how to setup the project and which build tools to use. What I do know is that the JavaScript community has moved way beyond using browser developer tool plugins and strategically-placed console.log() statements to debug, test, and build code.
I need help.
Below, I will keep track of articles, tutorials and tools I come across as I search for a way to bring my front-end development chops up-to-date.
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| Critter:lib critter$ brew install node | |
| ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.12.0.yosemite.bottle.1.tar.gz | |
| ######################################################################## 100.0% | |
| ==> Pouring node-0.12.0.yosemite.bottle.1.tar.gz | |
| ==> Caveats | |
| If you update npm itself, do NOT use the npm update command. | |
| The upstream-recommended way to update npm is: | |
| npm install -g npm@latest | |
| Bash completion has been installed to: |
| /* | |
| Incredibly simple Node.js and Express application server for serving static assets. | |
| DON'T USE THIS IN PRODUCTION! | |
| It is meant for learning purposes only. This server is not optimized for performance, | |
| and is missing key features such as error pages, compression, and caching. | |
| For production, I recommend using an application framework that supports server-side rendering, | |
| such as Next.js. https://nextjs.org |