MokoVersity / mokoid-camp2-booklog

6 stars 9 forks source link

Startup Engineering Camp #2 Indonesia

Hello, Indonesia

We are glad to join this camp to share our experience for you and not only tech but also exchange.

If you have any question, any suggest or any idea to implement, just write down on issues or just send email to us.

Terima kasih 謝謝 (xie xie)

About US

Moko365 Inc. (Tapei, Taiwan)

Moko365 on Github

Day 1

Day 2

Github

Git flow

Notice: Always pull/push after commit all tracking files.

jade

Installation

$ npm install -g jade

Run

$ jade templateFolderName
$ jade template.jade
$ jade views/*.jade -o public/

html2jade: Convert html to jade

** It's not working on Windows, so please use html2jade.aaron-powell.com instead.

SASS

Install SASS compiler by npm first

npm install -g sass

Using SASS compiler to generate CSS from SASS

sass style.sass:style.css

Watch your changes

sass --watch style.sass:style.css

Also you can watch a folder. For example, wath all sass files in sass folder and publish css into public/css folder.

sass --watch sass:public/css

convert css to sass

```
$ sass-convert -F css -T sass public/css/wiki.css sass/wiki.sass
```

Bower

Bower will install your packages on bower_components folder in default, so you need a config file to change default install folder.

.bowerrc

{
    "directory": "public/vendor"
}

Express

Installation

$ npm install -g express

Initialize ExpressJS

$ express

Please run this command on your project folder like this:

C:\Users\Hank\myProjects\booklog-camp> 
C:\Users\Hank\myProjects\booklog-camp> express

Install dependencies packages

$ npm i

Run web server

$ node app.js

Learning Resource

Trouble Shooting

Trouble 1: how to install Nodejs and jade

Jade will install by npm (include inside NodeJS) So we need:

  1. Install nodejs

Please visit nodejs website

http://nodejs.org
  1. Install jade
npm install jade --global

npm is a command line tool from NodeJS.

Trouble 2: Sublime 3 with HTML generation (Emmet)

Install Emmet on Sublime Text

  1. Install Package Controller

-- 1.1 visit http://sublime.wbond.net/installation -- 1.2 Ctrl + ` -- 1.3 Copy and paste install command, press enter

  1. Install Emmet

-- 2.1 Ctrl + Shift + P -- 2.2 Type 'Package Control: Install Package' -- 2.3 Type 'Emmet' to find and install. -- 2.4 Restart Sublime after installed. -- 2.5 Happy Zen Coding!

See also

Trouble 3: Must have jQuery installed along with Bootstrap

<script src="https://github.com/MokoVersity/mokoid-camp2-booklog/raw/master/jquery.min.js"></script>
<script src="https://github.com/MokoVersity/mokoid-camp2-booklog/raw/master/bootstrap.min.js"></script>

Trouble 4: Difference between LESS, SCSS and SASS

Trouble 5: How to install npm packages through HTTP/Proxy

npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org"
npm --proxy http://10.14.211.120:8080 install -g jade

Trouble 6: Install SASS on Windows

gem install sass -p http://10.14.211.120:8080
sass -v

If you can't get this work on Windows, please set your ruby bin folder to your PATH environment variables

More