User Tools


Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
design_guide_projects [2020/06/20 07:41]
z3dev
design_guide_projects [2020/06/20 07:44] (current)
z3dev
Line 5: Line 5:
 Projects are simple directories,​ containing several files (parts) of the design. For example, a project for a RC car design would have various parts. And the reusable parts can be separated out. Projects are simple directories,​ containing several files (parts) of the design. For example, a project for a RC car design would have various parts. And the reusable parts can be separated out.
  
-rc-car +  * .../rc-car 
-  * chassis.js +    * chassis.js 
-  * body.js +    * body.js 
-  * tire.js +    * tire.js 
-  * index.js+    * index.js
  
 The '​index'​ within the project is the entry point of the project. The main function of this piece is to create each of the pieces, move the pieces into position, and return the complete design. And by convention, exports the main function. The '​index'​ within the project is the entry point of the project. The main function of this piece is to create each of the pieces, move the pieces into position, and return the complete design. And by convention, exports the main function.
  
-<​code>​+<​code ​javascript>
 const chassis = require('​./​chassis'​) const chassis = require('​./​chassis'​)
 const body = require('​./​body'​) const body = require('​./​body'​)
Line 26: Line 26:
   return [partA, partB, tires]   return [partA, partB, tires]
 } }
-<​code\>​ 
- 
  
 module.exports = { main } module.exports = { main }
 +</​code>​