format
/*
* Project Name : Visual Python
* Description : GUI-based Python code generator
* File Name : [file_name]
* Author : [author_name]
* Note : [description_of_file]
* License : GNU GPLv3 with Visual Python special exception
* Date : [date_of_creation : YYYY. MM. DD]
* Change Date : [date_of_modification: YYYY. MM. DD]
*/
sample
/*
* Project Name : Visual Python
* Description : GUI-based Python code generator
* File Name : loadVisualpython.js
* Author : Black Logic
* Note : Load Visual Python
* License : GNU GPLv3 with Visual Python special exception
* Date : 2021. 08. 14
* Change Date :
*/
//============================================================================
// Load Visual Python
//============================================================================
define([
// external module
'externalModuleSample',
...
// visualpython util
'vp_base/js/com/com_util'
...
], function(externalModuleSample, com_util) {
'use strict';
// ... following steps (4. ~)
...
//========================================================================
// Define Variable
//========================================================================
// Constant
const SAMPLE_CONSTANT = 'hello world';
// Variables
var sampleVariable = 'sample variable';
...
...
//========================================================================
// Internal call function
//========================================================================
/**
* Function description
* @param {type} param1
*/
var _internalFunction = function(param1) {
// internal function should have _(underbar) at the front of its name
...
};
...
//========================================================================
// External call function
//========================================================================
/**
* Function description
* @param {type} param1
*/
var externalFunction = function(param1) {
...
};
// export external function
return { externalFunction: externalFunction };
//========================================================================
// Define Class
//========================================================================
/**
* Example class
*/
class ExampleClass {
constructor() {
}
// internal function
_internalFunction() {
}
// external function
externalFunction() {
}
} // class
//========================================================================
// Define Class Static Variable
//========================================================================
ExampleClass.StaticVariable = 'static variable';