From 930ab4d1a2a9f4fb4206888511534663c3cbf14a Mon Sep 17 00:00:00 2001 From: jjurman Date: Sun, 10 Sep 2017 04:13:43 -0400 Subject: [PATCH] remove spec bundle, add readme --- README.md | 37 +++++++++++++++++++++++++++++++++++ package.json | 2 +- template/.gitignore | 3 +++ template/specs/spec-bundle.js | 37 ----------------------------------- 4 files changed, 41 insertions(+), 38 deletions(-) delete mode 100644 template/specs/spec-bundle.js diff --git a/README.md b/README.md index e69de29b..ad24df1e 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,37 @@ +# Tram-One Express + +Tram-One Express is a generator for building tram-one applications. + +## Usage +To use tram-one-express, install using npm, and then run the command with the name of the app you want to build: +``` +$ npm install -g tram-one-express +$ tram-one-express app-name +``` +This will create a directory in your current directory with the name that you pass into tram-one-express. + +## What's in the box +Below are a list of files and directories that are created after running tram-one-express +``` +app-name/ +├── README.md +├── elements +│ └── header.js +├── main.js +├── package.json +├── pages +│ ├── 404.js +│ └── home.js +├── public +│ ├── favicon.png +│ └── index.html +└── specs + ├── header-spec.js + ├── specs.js + ├── testem.html + └── testem.yml +``` + +## Developement Commands +Below are a list of commands used for developement. The logic for all the commands are in the local `package.json` +- `npm start` - creates an example app `tram-one-example` diff --git a/package.json b/package.json index 1c53b3c2..d367e545 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "generator" ], "scripts": { - "start": "node generator tram-one-example", + "start": "node generator.js tram-one-example", "poststart": "npm --prefix ./tram-one-example install ./tram-one-example", "example-start": "npm --prefix ./tram-one-example start", "example-test": "npm --prefix ./tram-one-example test" diff --git a/template/.gitignore b/template/.gitignore index 1408b8a5..c5248e2f 100644 --- a/template/.gitignore +++ b/template/.gitignore @@ -1,6 +1,9 @@ # Distributable dist +# Files built when testing +specs/spec-bundle.js + # Logs logs *.log diff --git a/template/specs/spec-bundle.js b/template/specs/spec-bundle.js deleted file mode 100644 index d94a853c..00000000 --- a/template/specs/spec-bundle.js +++ /dev/null @@ -1,37 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\n %TITLE%\n \n '], ['\n

\n %TITLE%\n

\n ']); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -var Tram = require('tram-one'); -var html = Tram.html(); - -module.exports = function () { - return html(_templateObject); -}; - -},{"tram-one":2}],2:[function(require,module,exports){ -(function (global){ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e["tram-one"]=t()}(this,function(){"use strict";function e(){if(!(this instanceof e))return new e;this.trie={nodes:{}}}function t(e){function n(e){for(var t=new Array(arguments.length),n=1;n-1?t.push(" />"):(t.push(">"),e.childNodes.length?t.push.apply(t,e.childNodes.map(a)):e.textContent||e.innerText?t.push(h(e.textContent||e.innerText)):e.innerHTML&&t.push(e.innerHTML),t.push("")),t.join("")}function s(e,t){var n=K(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===n||"boolean"===n||"number"===n)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t}function l(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(n){var r=e[n];n=n.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=n+":"+r+";"}),t}function c(e){var t=e.dataset,n=[];for(var r in t)n.push({name:"data-"+r,value:t[r]});return n.length?f(n):""}function f(e){var t=[];return e.forEach(function(e){var n=e.name,r=e.value;"style"===n&&(r=l(r)),t.push(n+'="'+d(r)+'"')}),t.length?" "+t.join(" "):""}function p(e){var t=[];for(var n in e)s(e,n)&&t.push({name:n,value:e[n]});for(var r in e._attributes)for(var o in e._attributes[r]){var i=e._attributes[r][o],a=(i.prefix?i.prefix+":":"")+o;t.push({name:a,value:i.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?f(t):""}function h(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(//g,">")}function d(e){return h(e).replace(/"/g,""")}function m(e,t,n){if(!(this instanceof m))return new m(e);var r=void 0===n?me:n||null;this.tagName=r===me?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=r,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}function y(e){if(!(this instanceof y))return new y;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}function v(e){}function g(){if(!(this instanceof g))return new g;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}function b(e,t){Oe[e][0]&&0===Oe[e][2]&&(Oe[e][0](t),Oe[e][2]=1)}function w(e,t){Oe[e][1]&&1===Oe[e][2]&&(Oe[e][1](t),Oe[e][2]=0)}function N(e,t,n){var r=e.target.getAttribute(Te);A(e.oldValue,r)?Oe[r]=Oe[e.oldValue]:(Oe[e.oldValue]&&n(e.oldValue,e.target),Oe[r]&&t(r,e.target))}function A(e,t){return!(!e||!t)&&Oe[e][3]===Oe[t][3]}function E(e,t){for(var n=Object.keys(Oe),r=0;r0&&E(e[r].childNodes,t)}}function C(e,t,n){function r(e){if(Array.isArray(e))for(var t=0;t=0;--s)a=(u=r[s]).name,o=u.namespaceURI,i=u.value,o?(a=u.localName||a,t.getAttributeNS(o,a)!==i&&t.setAttributeNS(o,a,i)):t.hasAttribute(a)?t.getAttribute(a)!==i&&("null"===i||"undefined"===i?t.removeAttribute(a):t.setAttribute(a,i)):t.setAttribute(a,i);for(var l=n.length-1;l>=0;--l)!1!==(u=n[l]).specified&&(a=u.name,(o=u.namespaceURI)?(a=u.localName||a,e.hasAttributeNS(o,a)||t.removeAttributeNS(o,a)):e.hasAttributeNS(null,a)||t.removeAttribute(a))}function D(e,t){for(var n=0;n-1?this.childNodes.splice(n,0,e):this.childNodes.push(e),e.parentNode=this,e},m.prototype.setAttributeNS=function(e,t,n){var r=null,o=t,i=t.indexOf(":");i>-1&&(r=t.substr(0,i),o=t.substr(i+1)),"INPUT"===this.tagName&&"type"===t?this.type=n:(this._attributes[e]||(this._attributes[e]={}))[o]={value:n,prefix:r}},m.prototype.getAttributeNS=function(e,t){var n=this._attributes[e],r=n&&n[t]&&n[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof r?null:r},m.prototype.removeAttributeNS=function(e,t){var n=this._attributes[e];n&&delete n[t]},m.prototype.hasAttributeNS=function(e,t){var n=this._attributes[e];return!!n&&t in n},m.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},m.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},m.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},m.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},m.prototype.removeEventListener=pe,m.prototype.addEventListener=fe,m.prototype.dispatchEvent=ce,m.prototype.focus=function(){},m.prototype.toString=function(){return he(this)},m.prototype.getElementsByClassName=function(e){var t=e.split(" "),n=[];return ue(this,function(e){if(1===e.nodeType){var r=(e.className||"").split(" ");t.every(function(e){return-1!==r.indexOf(e)})&&n.push(e)}}),n},m.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return ue(this.childNodes,function(n){1!==n.nodeType||"*"!==e&&n.tagName.toLowerCase()!==e||t.push(n)}),t},m.prototype.contains=function(e){return ue(this,function(t){return e===t})||!1};var ve=y;y.prototype.type="DocumentFragment",y.prototype.nodeType=11,y.prototype.nodeName="#document-fragment",y.prototype.appendChild=ye.prototype.appendChild,y.prototype.replaceChild=ye.prototype.replaceChild,y.prototype.removeChild=ye.prototype.removeChild,y.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")};var ge=v;v.prototype.initEvent=function(e,t,n){this.type=e,this.bubbles=t,this.cancelable=n},v.prototype.preventDefault=function(){};var be=g,we=g.prototype;we.createTextNode=function(e){return new le(e,this)},we.createElementNS=function(e,t){var n=null===e?null:String(e);return new ye(t,this,n)},we.createElement=function(e){return new ye(e,this)},we.createDocumentFragment=function(){return new ve(this)},we.createEvent=function(e){return new ge(e)},we.createComment=function(e){return new se(e,this)},we.getElementById=function(e){return e=String(e),ue(this.childNodes,function(t){if(String(t.id)===e)return t})||null},we.getElementsByClassName=ye.prototype.getElementsByClassName,we.getElementsByTagName=ye.prototype.getElementsByTagName,we.contains=ye.prototype.contains,we.removeEventListener=pe,we.addEventListener=fe,we.dispatchEvent=ce;var Ne,Ae=new be,Ee=void 0!==ie?ie:"undefined"!=typeof window?window:{};"undefined"!=typeof document?Ne=document:(Ne=Ee["__GLOBAL_DOCUMENT_CACHE@4"])||(Ne=Ee["__GLOBAL_DOCUMENT_CACHE@4"]=Ae);var Ce,xe=Ne,Se=Ce="undefined"!=typeof window?window:void 0!==ie?ie:"undefined"!=typeof self?self:{},Oe=Object.create(null),Te="data-"+("onloadid"+(new Date%9e6).toString(36)),ke=0;Se&&Se.MutationObserver&&new MutationObserver(function(e){if(!(Object.keys(Oe).length<1))for(var t=0;t"!==o||x(a)||a===We?a===We&&/-$/.test(u)&&"-"===o?(t.comments&&n.push([Ze,u.substr(0,u.length-1)],[Ve]),u="",a=Fe):a===Ue&&/^!--$/.test(u)?(t.comments&&n.push([Ue,u],[qe,"comment"],[Ke]),u=o,a=We):a===Fe||a===We?u+=o:a===Ue&&/\s/.test(o)?(n.push([Ue,u]),u="",a=Ge):a===Ue?u+=o:a===Ge&&/[^\s"'=\/]/.test(o)?(a=qe,u=o):a===Ge&&/\s/.test(o)?(u.length&&n.push([qe,u]),n.push([Qe])):a===qe&&/\s/.test(o)?(n.push([qe,u]),u="",a=He):a===qe&&"="===o?(n.push([qe,u],[Ke]),u="",a=ze):a===qe?u+=o:a!==He&&a!==Ge||"="!==o?a!==He&&a!==Ge||/\s/.test(o)?a===ze&&'"'===o?a=Je:a===ze&&"'"===o?a=Xe:a===Je&&'"'===o?(n.push([Ze,u],[Qe]),u="",a=Ge):a===Xe&&"'"===o?(n.push([Ze,u],[Qe]),u="",a=Ge):a!==ze||/\s/.test(o)?a===Ze&&/\s/.test(o)?(n.push([Ze,u],[Qe]),u="",a=Ge):a!==Ze&&a!==Xe&&a!==Je||(u+=o):(a=Ze,r--):(n.push([Qe]),/[\w-]/.test(o)?(u+=o,a=qe):a=Ge):(n.push([Ke]),a=ze):(a===Ue?n.push([Ue,u]):a===qe?n.push([qe,u]):a===Ze&&u.length&&n.push([Ze,u]),n.push([Ve]),u="",a=Fe)}return a===Fe&&u.length?(n.push([Fe,u]),u=""):a===Ze&&u.length?(n.push([Ze,u]),u=""):a===Je&&u.length?(n.push([Ze,u]),u=""):a===Xe&&u.length?(n.push([Ze,u]),u=""):a===qe&&(n.push([qe,u]),u=""),n}for(var a=Fe,u="",s=arguments.length,l=[],c=0;c1&&(m.pop(),m[m.length-1][0][2][A]=e(y[0],y[1],y[2].length?y[2]:void 0))}else if(v===Ue){var g=[p[1],{},[]];y[2].push(g),m.push([g,y[2].length-1])}else if(v===qe||0===v&&p[1]===qe){for(var b,w="";c1&&/^\s*$/.test(d[2][0])&&d[2].shift(),d[2].length>2||2===d[2].length&&/\S/.test(d[2][1]))throw new Error("multiple root elements must be wrapped in an enclosing tag");return Array.isArray(d[2][0])&&"string"==typeof d[2][0][0]&&Array.isArray(d[2][0][2])&&(d[2][0]=e(d[2][0][0],d[2][0][1],d[2][0][2])),d[2][0]}},et=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$"),tt=function(e,t){var n=function(n,r,o){var i=t[n];return i?i(r,o):e(n,r,o)},r=Ye(n);return r.h=n,r},nt=function(e){return null!=e&&"object"===(void 0===e?"undefined":K(e))&&!1===Array.isArray(e)},rt=function(e){var t,n;return!1!==O(e)&&("function"==typeof(t=e.constructor)&&(n=t.prototype,!1!==O(n)&&!1!==n.hasOwnProperty("isPrototypeOf")))},ot=r(function(e,t){function n(e,t){return function(){return t.apply(this,e.concat.apply(e,arguments))}}function r(e,t){return function(){return t.apply(this,[].slice.call(arguments).concat(e))}}function o(e){return n([].slice.call(arguments,1),e)}function i(e){return r([].slice.call(arguments,1),e)}(t=e.exports=n).pa=r,t.apa=function(e,t,n){return function(){return n.apply(this,e.concat.apply(e,arguments).concat(t))}},t.partial=o,t.partialRight=i,t.curry=function(e){return o(o,e)},t.curryRight=function(e){return o(i,e)}}).partial,it=Array.prototype.slice;k.async=R,k.cc=function(){var e=R.apply(null,arguments);return function(){var t=[].slice.call(arguments);t.push(M),e.apply({},t)}};var at=k,ut={createStore:function e(t,n,r){function o(e){if(!e||!rt(e))throw new Error("action parameter is required and must be a plain object");if(!e.type||"string"!=typeof e.type)throw new Error("type property of action is required and must be a string");if(u)throw new Error("modifiers may not emit actions");return u=!0,i=t(i,e),a&&a(i),u=!1,e}if(!t||"function"!=typeof t)throw new Error("reducer must be a function");if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error("enhancer must be a function.");return r(e)(t,n)}var i=n=n||{},a=null,u=!1;return o({type:"@@minidux/INIT"}),{dispatch:o,subscribe:function(e){if(!e||"function"!=typeof e)throw new Error("listener must be a function");a=e},getState:function(){return i},replaceReducer:function(e){if("function"!=typeof e)throw new Error("new reducer must be a function");t=e}}},combineReducers:function(e){if(!e||!rt(e))throw new Error("reducers argument must be an object with reducer methods");var t=Object.keys(e);return function(n,r){for(var o=!1,i={},a=0;a1?r-1:0),i=1;i