Notes on how to include data in a project repo...
An ideal folder structure:
/my-project
.gitignore
/data
- things.csv
| html{font:400 110%/1.3 sans-serif;box-sizing: border-box;}*,*:before,*:after{box-sizing: inherit;} | |
| body{margin:0;} | |
| h1,h2,h3,h4{font:400 1.5rem/1.1 sans-serif;} | |
| h1,h2,h3,h4,p,.w0,.w1,.w2,.w3,.w4{display:block;margin-left:auto;margin-right:auto;width:100%;max-width:35rem;} | |
| .w1{max-width:40rem;}.w2{max-width:45rem;}.w3{max-width:50rem;}.w4{max-width:55rem;} | |
| h1,h2,h3,h4,.v1,.v2,.v3,.v4{margin-top:0;margin-bottom:0;} | |
| .v1{margin-bottom:0.5rem;}.v2{margin-bottom:1rem;}.v3{margin-bottom:1.5rem;}.v4{margin-bottom:2.5rem;} | |
| .v5{margin-bottom:4rem;}.v6{margin-bottom:6rem;} | |
| .outline{display:block;outline:1px dotted rgba(0,0,0,0.2);} | |
| .sm{font-size:smaller;}.lg{font-size:larger;} |
| #!/usr/bin/env bash | |
| echo "" | |
| read -p "Local directory for the project (use lowercase with dashes) : " dir; | |
| read -p "(press enter to use the default \"master\") : " branch; | |
| git clone -b ${branch:-master} --single-branch ssh://[email protected]/ft-interactive/starter-kit.git $dir && cd $dir && ./configure && npm start -- --open |
Notes on how to include data in a project repo...
An ideal folder structure:
/my-project
.gitignore
/data
- things.csv
| <button class="foo">Foo</button> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| // ---- | |
| // Sass (v3.3.5) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| @function option($map, $name, $default) { | |
| @return if(map-has-key($map, $name), map-get($map, $name), $default); | |
| } | |
| @mixin foo($opts...) { |
Modules should rely on services to get or save data. Access to these services SHOULD be via an o-io service to allow the product the ability to override or extend all (or part) of the module's strategy for doing I/O.
A module should NOT:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Save SVG</title> | |
| </head> | |
| <body> | |
| <svg | |
| xmlns:svg="http://www.w3.org/2000/svg" | |
| xmlns="http://www.w3.org/2000/svg" | |
| version="1.0" |
| var express = require('../../'); | |
| var app = express(); | |
| app.get('/', function(req, res){ | |
| res.send('Hello World'); | |
| }); | |
| app.listen(3000); | |
| console.log('Express started on port 3000'); |