UNPKG

nodulator

Version:

Complete NodeJS Framework for Restfull APIs

303 lines (199 loc) 9.94 kB
<!DOCTYPE html> <html> <head> <title>Nodulator-Angular.ls</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <ul id="jump_to"> <li> <a class="large" href="javascript:void(0);">Jump To &hellip;</a> <a class="small" href="javascript:void(0);">+</a> <div id="jump_wrapper"> <div id="jump_page_wrapper"> <div id="jump_page"> <a class="source" href="Nodulator.html"> Nodulator.ls </a> <a class="source" href="ClientDB.html"> ClientDB.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="Resource.html"> Resource.ls </a> <a class="source" href="Bus.html"> Bus.ls </a> <a class="source" href="Cache.html"> Cache.ls </a> <a class="source" href="ChangeWatcher.html"> ChangeWatcher.ls </a> <a class="source" href="Debug.html"> Debug.ls </a> <a class="source" href="Wrappers.html"> Wrappers.ls </a> <a class="source" href="Nodulator.html"> Nodulator.ls </a> <a class="source" href="Resource.html"> Resource.ls </a> <a class="source" href="Schema.html"> Schema.ls </a> <a class="source" href="NModule.html"> NModule.ls </a> <a class="source" href="AccountResource.html"> AccountResource.ls </a> <a class="source" href="User.html"> User.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="Nodulator-Angular.html"> Nodulator-Angular.ls </a> <a class="source" href="TaskDirective.html"> TaskDirective.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="TaskService.html"> TaskService.ls </a> <a class="source" href="main.html"> main.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="Task.html"> Task.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="DOM.html"> DOM.ls </a> <a class="source" href="View.html"> View.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="Nodulator.html"> Nodulator.ls </a> <a class="source" href="Mongo.html"> Mongo.ls </a> <a class="source" href="Mysql.html"> Mysql.ls </a> <a class="source" href="SqlMem.html"> SqlMem.ls </a> <a class="source" href="index.html"> index.ls </a> <a class="source" href="Resource.html"> Resource.ls </a> <a class="source" href="Request.html"> Request.ls </a> <a class="source" href="Route.html"> Route.ls </a> <a class="source" href="index.html"> index.ls </a> </div> </div> </li> </ul> <ul class="sections"> <li id="title"> <div class="annotation"> <h1>Nodulator-Angular.ls</h1> </div> </li> <li id="section-1"> <div class="annotation"> <div class="pilwrap "> <a class="pilcrow" href="#section-1">&#182;</a> </div> </div> <div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span> path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span> exec = <span class="hljs-built_in">require</span>(<span class="hljs-string">'child_process'</span>).exec async = <span class="hljs-built_in">require</span> <span class="hljs-string">'async'</span> NRoot = path.resolve __dirname, <span class="hljs-string">'..'</span> appRoot = path.resolve <span class="hljs-string">'.'</span> <span class="hljs-function"> <span class="hljs-title">exists</span> = <span class="hljs-params">(path, done)</span> -&gt;</span> fs.open path, <span class="hljs-string">'r'</span>, <span class="hljs-function"><span class="hljs-params">(err, fd)</span> -&gt;</span> <span class="hljs-keyword">if</span> err? done <span class="hljs-literal">false</span> <span class="hljs-keyword">else</span> fs.closeSync fd done <span class="hljs-literal">true</span> <span class="hljs-built_in">module</span>.exports = <span class="hljs-function"><span class="hljs-params">(done)</span> -&gt;</span> async.series [ (done) -&gt; process.stdout.write <span class="hljs-string">' Create base folder..............'</span> exec <span class="hljs-string">'mkdir -p '</span> + appRoot + <span class="hljs-string">'/client/'</span>, done (done) -&gt; process.stdout.write <span class="hljs-string">'Ok\n'</span> process.stdout.write <span class="hljs-string">' Init base folder tree...........'</span> exec <span class="hljs-string">'cp -ran '</span> + (path.resolve NRoot, <span class="hljs-string">'bin/baseFiles'</span>) + <span class="hljs-string">'/* '</span> + appRoot + <span class="hljs-string">'/client/'</span>, done (done) -&gt; process.stdout.write <span class="hljs-string">'Ok\n'</span> process.stdout.write <span class="hljs-string">' Downloading AngularJS v1.3.8....'</span> exists appRoot + <span class="hljs-string">'/client/public/js/angular.js'</span>, <span class="hljs-function"><span class="hljs-params">(exist)</span> -&gt;</span> <span class="hljs-keyword">if</span> exist process.stdout.write <span class="hljs-string">'Exists\n'</span> <span class="hljs-keyword">return</span> done() exec <span class="hljs-string">'wget https://code.angularjs.org/1.3.8/angular.js -O '</span> + appRoot + <span class="hljs-string">'/client/public/js/angular.js'</span>, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span> <span class="hljs-keyword">return</span> done err <span class="hljs-keyword">if</span> err? process.stdout.write <span class="hljs-string">'Ok\n'</span> done() ], <span class="hljs-function"><span class="hljs-params">(err, results)</span> -&gt;</span> <span class="hljs-keyword">return</span> done err <span class="hljs-keyword">if</span> err? done()</pre></div></div> </li> </ul> </div> </body> </html>