-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
779 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/node_modules/ | ||
/node_helper.js | ||
/MMM-Glassy.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Install src code without minify | ||
* @busgounet | ||
*/ | ||
|
||
const path = require("node:path"); | ||
const { copyFileSync } = require("node:fs"); | ||
const { globSync } = require("glob"); | ||
|
||
var files = []; | ||
|
||
let project = require("../package.json").name; | ||
|
||
/** | ||
* search all javascript files | ||
*/ | ||
function searchFiles () { | ||
let components = globSync("../src/**/*.js"); | ||
files = files.concat(components); | ||
console.log(`Found: ${files.length} files to install\n`); | ||
} | ||
|
||
/** | ||
* Install all files in array with Promise | ||
*/ | ||
async function installFiles () { | ||
searchFiles(); | ||
await Promise.all(files.map((file) => { return install(file); })).catch(() => process.exit(255)); | ||
} | ||
|
||
/** | ||
* Install filename with copyFileSync | ||
* @param {string} file to install | ||
* @returns {boolean} resolved with true | ||
*/ | ||
function install (file) { | ||
let FileName = file.replace("../src/", "../"); | ||
let GAFileName = `${project}/${FileName.replace("../", "")}`; | ||
let pathInResolve = path.resolve(__dirname, file); | ||
let pathOutResolve = path.resolve(__dirname, FileName); | ||
console.log("Process File:", GAFileName); | ||
return new Promise((resolve, reject) => { | ||
try { | ||
copyFileSync(pathInResolve, pathOutResolve); | ||
resolve(true); | ||
} catch { | ||
reject(); | ||
} | ||
}); | ||
} | ||
|
||
console.log("⚠ This Tools is reserved for develop only ⚠\n"); | ||
installFiles(); | ||
console.log("\n✅ All sources files are installed and ready for developing\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Install new source code to src (develop) | ||
* @busgounet | ||
*/ | ||
|
||
const path = require("node:path"); | ||
const { copyFileSync } = require("node:fs"); | ||
const { globSync } = require("glob"); | ||
|
||
var files = []; | ||
|
||
let project = require("../package.json").name; | ||
|
||
/** | ||
* search all javascript files | ||
*/ | ||
function searchFiles () { | ||
let components = globSync("../src/**/*.js"); | ||
files = files.concat(components); | ||
console.log(`Found: ${files.length} files to install\n`); | ||
} | ||
|
||
/** | ||
* Install all files in array with Promise | ||
*/ | ||
async function installFiles () { | ||
searchFiles(); | ||
await Promise.all(files.map((file) => { return install(file); })).catch(() => process.exit(255)); | ||
} | ||
|
||
/** | ||
* Install filename with copyFileSync | ||
* @param {string} file to install | ||
* @returns {boolean} resolved with true | ||
*/ | ||
function install (file) { | ||
let FileName = file.replace("../src/", "../"); | ||
let GAFileName = `${project}/${FileName.replace("../", "")}`; | ||
let pathInResolve = path.resolve(__dirname, file); | ||
let pathOutResolve = path.resolve(__dirname, FileName); | ||
console.log("Process File:", GAFileName); | ||
return new Promise((resolve, reject) => { | ||
try { | ||
copyFileSync(pathOutResolve, pathInResolve); | ||
resolve(true); | ||
} catch { | ||
reject(); | ||
} | ||
}); | ||
} | ||
|
||
console.log("⚠ This Tools is reserved for develop only ⚠\n"); | ||
installFiles(); | ||
console.log("\n✅ All new sources files are copied to the src folder\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.