Skip to content

Commit

Permalink
logs copy updated
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdas committed May 8, 2024
1 parent aa0db6f commit 2416c6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/actions/loadCachedFilesInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const checkForWildcardImports = require("../parsers/checkForWildcardImports");
* @returns
*/
const loadCachedFilesInfo = (changedFilePath) => {
// TODO: testar o erro que acontece quando um arquivo é removido do import
// TODO: testar o erro que acontece quando um arquivo é removido do import (resolvido?!)
let hasError = null;
const filesInfoRaw = fs.readFileSync(path.join(`./build/filesInfo.json`));
const filesInfo = JSON.parse(filesInfoRaw);
const changedFileSchema = loadFilesInfo(changedFilePath, true).fileSchemas[0];
console.log("FILE:", changedFilePath);

// Verifica cada arquivo jsx e ts para ver se estão quebrados ou não.
hasError = checkSyntaxError(changedFilePath);
Expand Down
10 changes: 6 additions & 4 deletions lib/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const GATEWAY_PATH = path.join(__dirname, "..", "gateway", "dist");

// Main function to orchestrate the dev script
async function dev(opts) {
let loading = log.loading(`Building the project for the first time`);
log.info(`Building project`);
// let loading = log.loading(`Building the project for the first time`);
let NETWORK = opts.network || "mainnet";

await build(opts);
Expand All @@ -31,7 +32,7 @@ async function dev(opts) {
// log.error(err);
// process.exit(1);
// });
loading.finish();
// loading.finish();

// Start serving the development JSON
const { io } = await serveDevJson({
Expand All @@ -48,7 +49,7 @@ async function dev(opts) {
});

watchFolders(["./src"], async (path) => {
loading = log.loading(`Change detected in ${path}, rebuilding...`);
log.info(`Change detected in ${path}, rebuilding...`);

// Atualiza o arquivo no cache para ser acessado posteriormente no re-build()
filesContentCache.updateFileContent(path);
Expand All @@ -61,7 +62,8 @@ async function dev(opts) {
// INFO: Using like this to have better error messages
await build(opts, path);

loading.finish();
// loading.finish();
log.sucess(`Done.`);
if (io) {
const devJson = generateAllDevJson(NETWORK);
io.emit("fileChange", devJson);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alem",
"description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.",
"version": "1.1.0-rc1",
"version": "1.1.0",
"main": "main.js",
"types": "index.d.ts",
"author": "Wenderson Pires - wendersonpires.near",
Expand Down

0 comments on commit 2416c6b

Please sign in to comment.