├── src ├── audio │ └── .gitkeep ├── data │ └── .gitkeep ├── fonts │ └── .gitkeep ├── scripts │ ├── app.js │ ├── models │ │ └── .gitkeep │ ├── views │ │ └── .gitkeep │ └── shared │ │ ├── comp │ │ └── .gitkeep │ │ └── lib │ │ └── .gitkeep ├── videos │ └── .gitkeep ├── styles │ ├── shared │ │ ├── .gitkeep │ │ ├── comp │ │ │ └── .gitignore │ │ └── spritesheet │ │ │ ├── sprite.styl │ │ │ └── icons.styl │ ├── views │ │ └── .gitkeep │ └── app.styl ├── templates │ ├── views │ │ └── .gitkeep │ ├── comp │ │ └── .gitignore │ └── index.html └── images │ ├── nu.png │ └── icons │ └── nu.png ├── .gitignore ├── public ├── images │ ├── nu.png │ └── icons.png ├── index.html ├── app.js └── app.css ├── gulpfile.js ├── LICENSE ├── package.json └── README.md /src/audio/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/data/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/app.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/videos/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/styles/shared/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/styles/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/shared/comp/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/shared/lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/styles/shared/comp/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/comp/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log -------------------------------------------------------------------------------- /src/images/nu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giuliandrimba/nu/HEAD/src/images/nu.png -------------------------------------------------------------------------------- /public/images/nu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giuliandrimba/nu/HEAD/public/images/nu.png -------------------------------------------------------------------------------- /public/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giuliandrimba/nu/HEAD/public/images/icons.png -------------------------------------------------------------------------------- /src/images/icons/nu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giuliandrimba/nu/HEAD/src/images/icons/nu.png -------------------------------------------------------------------------------- /src/styles/app.styl: -------------------------------------------------------------------------------- 1 | @import "nib"; 2 | global-reset() 3 | 4 | @import "./shared/spritesheet/icons.styl"; 5 | @import "./shared/spritesheet/sprite.styl"; 6 | -------------------------------------------------------------------------------- /src/styles/shared/spritesheet/sprite.styl: -------------------------------------------------------------------------------- 1 | $svg-common 2 | background url("images/sprite-b907ebac.svg") no-repeat 3 | 4 | .svg-a 5 | @extend $svg-common 6 | background-position 0 0 7 | 8 | .svg-a-dims 9 | width 100px 10 | height 100px 11 | 12 | .svg-b 13 | @extend $svg-common 14 | background-position 100% 0 15 | 16 | .svg-b-dims 17 | width 100px 18 | height 100px 19 | 20 | -------------------------------------------------------------------------------- /src/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require("gulp"); 2 | var server = require("./build/tasks/server"); 3 | var build = require("./build/tasks/build"); 4 | var clean = require("./build/tasks/clean"); 5 | var browserify = require("./build/tasks/browserify"); 6 | var styles = require("./build/tasks/styles"); 7 | var images = require("./build/tasks/images"); 8 | var sprites = require("./build/tasks/sprites"); 9 | var watch = require("./build/tasks/watch"); 10 | var bump = require("./build/tasks/bump"); 11 | var fonts = require("./build/tasks/fonts"); 12 | var locale = require("./build/tasks/locale"); 13 | var data = require("./build/tasks/data"); 14 | var audio = require("./build/tasks/audio"); 15 | var html = require("./build/tasks/html"); 16 | var video = require("./build/tasks/video"); 17 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

V. 0.0.1 – At: 2017-01-12T14:08:54.735Z

12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Giulian Drimba 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /public/app.js: -------------------------------------------------------------------------------- 1 | (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 app.styl 114 | 115 | ``` stylus 116 | @import "shared/reset.styl"; 117 | ``` 118 | #### Plain CSS support 119 | Stylus support the plain CSS syntax! 120 | 121 | ## Templates 122 | You can use [Jade](http://jade-lang.com/), [Handlebars](http://handlebarsjs.com/), or regular HTML as templates, and import them in your scripts: 123 | 124 | > Using Jade or Handlebars 125 | 126 | ``` jade 127 | .layout 128 | h1 Hello World! 129 | ``` 130 | 131 | ``` javascript 132 | var tmpl = require("templates/views/layout.jade") 133 | console.log(tmpl()); //

Hello World!

134 | ``` 135 | 136 | and yes, you can use the ES6 import syntax to load the templates: 137 | ``` javascript 138 | import * as tmpl from "templates/views/layout.jade" 139 | console.log(tmpl()); //

Hello World!

140 | ``` 141 | 142 | > Using HTML 143 | 144 | ``` html 145 |
146 |

Hello World!

147 |
148 | ``` 149 | 150 | ``` javascript 151 | var tmpl = require("templates/views/layout.html") 152 | console.log(tmpl); //

Hello World!

153 | ``` 154 | 155 | ## Spritesheet 156 | All the `.png` files inside the `src/images/icons` folder will be assembled as one image at `public/images/icons.png`. 157 | 158 | #### CSS 159 | A `icons.styl` file will be generated at `src/styles/shared/icons.styl`, containing all the information about the icons. 160 | 161 | > Loading an icon: 162 | 163 | ``` stylus 164 | .my-icon 165 | sprite($icon_name) 166 | ``` 167 | 168 | ## SVG spritesheet 169 | All the `.svg` files inside the `src/images/icons` folder will be assembled as one SVG at `public/images/sprite.svg`. 170 | 171 | #### CSS 172 | A `sprite.styl` file will be generated at `src/styles/shared/spritesheets/sprite.styl`, containing all the information about the sprites. 173 | 174 | ## Semver 175 | Every time you run `npm run build:` a minor bump will be added to the version. If you want to have control of the bump, you can run: 176 | 177 | `npm run bump:` 178 | 179 | Also, a html tag will be added on the top of the page with the project version and build time. 180 | > It will be removed if you run the production build 181 | 182 | ## Setup 183 | 184 | __Install dependencies:__ 185 | 186 | ` npm install` 187 | 188 | __Watch:__ 189 | 190 | ` npm run watch` 191 | 192 | > Open http://localhost:3000 193 | 194 | __Build:__ 195 | 196 | ` npm run build:dev` 197 | 198 | or 199 | 200 | ` npm run build:prod` 201 | 202 | __Config:__ 203 | 204 | You can change some config options at `build/config.json` 205 | -------------------------------------------------------------------------------- /public/app.css: -------------------------------------------------------------------------------- 1 | 2 | /* line 5 : /Users/giuliandrimba/Desktop/nu/src/styles/app.styl */ 3 | 4 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/gulp-stylus/node_modules/stylus/lib/functions/index.styl */ 5 | 6 | /* line 297 : /Users/giuliandrimba/Desktop/nu/node_modules/gulp-stylus/node_modules/stylus/lib/functions/index.styl */ 7 | 8 | /* line 15 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/index.styl */ 9 | 10 | /* line 15 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/index.styl */ 11 | 12 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/border.styl */ 13 | 14 | /* line 10 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/border.styl */ 15 | 16 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/border-radius.styl */ 17 | 18 | /* line 53 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/border-radius.styl */ 19 | 20 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/clearfix.styl */ 21 | 22 | /* line 28 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/clearfix.styl */ 23 | 24 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/color-image.styl */ 25 | 26 | /* line 4 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/color-image.styl */ 27 | 28 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/flex.styl */ 29 | 30 | /* line 196 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/flex.styl */ 31 | 32 | /* line 90 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/gradients.styl */ 33 | 34 | /* line 90 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/gradients.styl */ 35 | 36 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/config.styl */ 37 | 38 | /* line 11 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/config.styl */ 39 | 40 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/iconic.styl */ 41 | 42 | /* line 7 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/iconic.styl */ 43 | 44 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/image.styl */ 45 | 46 | /* line 25 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/image.styl */ 47 | 48 | /* line 19 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/index.styl */ 49 | 50 | /* line 19 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/index.styl */ 51 | 52 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/base.styl */ 53 | 54 | /* line 8 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/base.styl */ 55 | 56 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/html5.styl */ 57 | 58 | /* line 19 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/html5.styl */ 59 | 60 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/links.styl */ 61 | 62 | /* line 6 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/links.styl */ 63 | 64 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/text.styl */ 65 | 66 | /* line 30 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/text.styl */ 67 | 68 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/embed.styl */ 69 | 70 | /* line 7 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/embed.styl */ 71 | 72 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/groups.styl */ 73 | 74 | /* line 17 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/groups.styl */ 75 | 76 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/forms.styl */ 77 | 78 | /* line 69 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/forms.styl */ 79 | 80 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/tables.styl */ 81 | 82 | /* line 7 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/normalize/tables.styl */ 83 | 84 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/overflow.styl */ 85 | 86 | /* line 20 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/overflow.styl */ 87 | 88 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/positions.styl */ 89 | 90 | /* line 66 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/positions.styl */ 91 | 92 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 93 | 94 | /* line 78 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 95 | 96 | /* line 5 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/index.styl */ 97 | 98 | /* line 5 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/index.styl */ 99 | 100 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/aliases.styl */ 101 | 102 | /* line 12 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/aliases.styl */ 103 | 104 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/ellipsis.styl */ 105 | 106 | /* line 9 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/ellipsis.styl */ 107 | 108 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/hide-text.styl */ 109 | 110 | /* line 8 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/hide-text.styl */ 111 | 112 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/replace-text.styl */ 113 | 114 | /* line 9 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/replace-text.styl */ 115 | 116 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/shadow-stroke.styl */ 117 | 118 | /* line 2 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/text/shadow-stroke.styl */ 119 | 120 | /* line 487 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/vendor.styl */ 121 | 122 | /* line 11 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/vendor.styl */ 123 | 124 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/config.styl */ 125 | 126 | /* line 523 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/config.styl */ 127 | 128 | /* line 1 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/size.styl */ 129 | 130 | /* line 4 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 131 | html, 132 | body, 133 | div, 134 | span, 135 | applet, 136 | object, 137 | iframe, 138 | h1, 139 | h2, 140 | h3, 141 | h4, 142 | h5, 143 | h6, 144 | p, 145 | blockquote, 146 | pre, 147 | a, 148 | abbr, 149 | acronym, 150 | address, 151 | big, 152 | cite, 153 | code, 154 | del, 155 | dfn, 156 | em, 157 | img, 158 | ins, 159 | kbd, 160 | q, 161 | s, 162 | samp, 163 | small, 164 | strike, 165 | strong, 166 | sub, 167 | sup, 168 | tt, 169 | var, 170 | dl, 171 | dt, 172 | dd, 173 | ol, 174 | ul, 175 | li, 176 | fieldset, 177 | form, 178 | label, 179 | legend, 180 | table, 181 | caption, 182 | tbody, 183 | tfoot, 184 | thead, 185 | tr, 186 | th, 187 | td { 188 | margin: 0; 189 | padding: 0; 190 | border: 0; 191 | outline: 0; 192 | font-weight: inherit; 193 | font-style: inherit; 194 | font-family: inherit; 195 | font-size: 100%; 196 | vertical-align: baseline; 197 | } 198 | 199 | /* line 14 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 200 | body { 201 | line-height: 1; 202 | color: #000; 203 | background: #fff; 204 | } 205 | 206 | /* line 16 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 207 | ol, 208 | ul { 209 | list-style: none; 210 | } 211 | 212 | /* line 18 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 213 | table { 214 | border-collapse: separate; 215 | border-spacing: 0; 216 | vertical-align: middle; 217 | } 218 | 219 | /* line 20 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 220 | caption, 221 | th, 222 | td { 223 | text-align: left; 224 | font-weight: normal; 225 | vertical-align: middle; 226 | } 227 | 228 | /* line 22 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/reset.styl */ 229 | a img { 230 | border: none; 231 | } 232 | 233 | /* line 28 : /Users/giuliandrimba/Desktop/nu/node_modules/nib/lib/nib/size.styl */ 234 | 235 | /* line 1 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/icons.styl */ 236 | 237 | /* line 81 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/icons.styl */ 238 | 239 | /* line 81 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 240 | 241 | /* line 1 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 242 | .svg-a, 243 | .svg-b { 244 | background: url("images/sprite-b907ebac.svg") no-repeat; 245 | } 246 | 247 | /* line 4 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 248 | .svg-a { 249 | background-position: 0 0; 250 | } 251 | 252 | /* line 8 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 253 | .svg-a-dims { 254 | width: 100px; 255 | height: 100px; 256 | } 257 | 258 | /* line 12 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 259 | .svg-b { 260 | background-position: 100% 0; 261 | } 262 | 263 | /* line 16 : /Users/giuliandrimba/Desktop/nu/src/styles/shared/spritesheet/sprite.styl */ 264 | .svg-b-dims { 265 | width: 100px; 266 | height: 100px; 267 | } 268 | --------------------------------------------------------------------------------