User Tools

Site Tools


webdesign:html5-and-javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
webdesign:html5-and-javascript [2016/09/22 00:32] – [Custom css with less file which don't change variables of bootstrap.less] adminwebdesign:html5-and-javascript [2018/04/24 16:56] – [Node.js] admin
Line 10: Line 10:
  
 ==== Node.js ==== ==== Node.js ====
-refer: https://nodejs.org/+refer:  
 +  * https://nodejs.org/ 
 +  * tutorials: https://www.w3schools.com/nodejs/default.asp
 Node.js® is a platform built on **Chrome's JavaScript runtime** for easily building fast, scalable network applications. Node.js uses an **event-driven, non-blocking I/O model** that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Node.js® is a platform built on **Chrome's JavaScript runtime** for easily building fast, scalable network applications. Node.js uses an **event-driven, non-blocking I/O model** that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  
Line 21: Line 23:
 </code>output:<code> </code>output:<code>
 v4.2.6 v4.2.6
 +</code>
 +Install nodejs from source on linux:
 +  - Step1: Get nodejs source<code bash>
 +https://nodejs.org/dist/v8.11.1/node-v8.11.1.tar.gz
 +</code>
 +  - Step2: Install<code bash>
 +tar xzvf node-v* && cd node-v*
 +./configure
 +make
 +make install
 +</code>
 +  - Error:<code>
 +WARNING: C++ compiler too old, need g++ 4.9.4 or clang++ 3.4.2 (CXX=g++)
 +</code>
 +Install nodejs from linux binary: https://github.com/nodejs/help/wiki/Installation
 +  - Step1: Get linux binay<code bash>
 +wget https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz
 +</code>
 +  - Step2: Unzip linux binary to /usr/local/nodejs<code bash>
 +mkdir /usr/local/nodejs
 +yum install xz
 +tar -xJvf node-v8.11.1-linux-x64.tar.xz -C /usr/local/nodejs
 +</code>
 +  - Step3: Set the environment variable ~/.profile or ~/.bash_profile, add below to the end<code bash>
 +# Nodejs
 +export NODEJS_HOME=/usr/local/nodejs/node-v8.11.1/bin
 +export PATH=$NODEJS_HOME:$PATH
 +</code>
 +  - Step4:Refresh profile<code bash>
 +.~/.profile
 +</code>
 +  - Step6: Check environment:<code bash>
 +echo $PATH
 +/usr/local/nodejs/node-v8.11.1/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
 +</code>
 +  - Step5: Test installation using<code bash>
 +node -v
 +npm version
 +</code>output:<code>
 +v8.11.1
 +{ npm: '5.6.0',
 +  ares: '1.10.1-DEV',
 +  cldr: '32.0',
 +  http_parser: '2.8.0',
 +  icu: '60.1',
 +  modules: '57',
 +  nghttp2: '1.25.0',
 +  node: '8.11.1',
 +  openssl: '1.0.2o',
 +  tz: '2017c',
 +  unicode: '10.0',
 +  uv: '1.19.1',
 +  v8: '6.2.414.50',
 +  zlib: '1.2.11' }
 </code> </code>
 ==== npm(node package manager for javascript...) ==== ==== npm(node package manager for javascript...) ====
Line 419: Line 475:
 } }
 </code>  </code> 
-=== Custom css with less file which don't change variables of bootstrap.less(Best Method) ===+=== Custom css with less file which don't change variables of bootstrap.less ===
 We **create the new less file** and using **less tool** to rebuild new less file We **create the new less file** and using **less tool** to rebuild new less file
   - Step1: Create **style.less** which import **bootstrap** and other changes in **nav.less, header.less, footer.less**<code javascript>   - Step1: Create **style.less** which import **bootstrap** and other changes in **nav.less, header.less, footer.less**<code javascript>
webdesign/html5-and-javascript.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1