-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from EDAcation/add-yosys-stat-viewer
Add module statistics viewer
- Loading branch information
Showing
50 changed files
with
1,938 additions
and
319 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,4 +1 @@ | ||
dist/ | ||
|
||
# TODO: un-ignore this file once we find a solution to the jquery import reordering situation | ||
views/digitaljs/src/main.ts |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,38 +1,40 @@ | ||
import {spawnSync} from 'child_process'; | ||
import {readdir} from 'fs/promises'; | ||
import path from 'path'; | ||
import {fileURLToPath} from 'url'; | ||
|
||
const command = process.argv.slice(2); | ||
const commandName = ['npm'].concat(command).join(' '); | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
(async () => { | ||
const command = process.argv.slice(2); | ||
const commandName = ['npm'].concat(command).join(' '); | ||
|
||
const currentDirectory = path.dirname(fileURLToPath(import.meta.url)); | ||
const viewsDirectory = path.resolve(currentDirectory, '..', 'views'); | ||
const failedDirectories: string[] = []; | ||
const currentDirectory = path.dirname(__filename); | ||
const viewsDirectory = path.resolve(currentDirectory, '..', 'views'); | ||
const failedDirectories: string[] = []; | ||
|
||
console.log(`Executing command "${commandName}" for all views.`); | ||
console.log(); | ||
console.log(`Executing command "${commandName}" for all views.`); | ||
console.log(); | ||
|
||
for (const directory of await readdir(viewsDirectory)) { | ||
const directoryName = `./views/${directory}`; | ||
for (const directory of await readdir(viewsDirectory)) { | ||
const directoryName = `./views/${directory}`; | ||
|
||
console.log(`Executing command "${commandName}" in views "${directoryName}"`); | ||
console.log(`Executing command "${commandName}" in views "${directoryName}"`); | ||
|
||
const {status} = spawnSync('npm', command, { | ||
cwd: path.resolve(viewsDirectory, directory), | ||
stdio: ['inherit', 'inherit', 'inherit'] | ||
}); | ||
console.log(); | ||
const {status} = spawnSync('npm', command, { | ||
cwd: path.resolve(viewsDirectory, directory), | ||
stdio: ['inherit', 'inherit', 'inherit'] | ||
}); | ||
console.log(); | ||
|
||
if (status !== 0) { | ||
failedDirectories.push(directoryName); | ||
} | ||
} | ||
|
||
if (status !== 0) { | ||
failedDirectories.push(directoryName); | ||
if (failedDirectories.length === 0) { | ||
console.log(`Executing command "${commandName}" was successful for all views.`); | ||
} else { | ||
console.log(`Executing command "${commandName}" failed for these views:`); | ||
console.log(failedDirectories.map((directory) => ` - ${directory}`).join('\n')); | ||
console.log('See the logs above for more details.'); | ||
} | ||
} | ||
|
||
if (failedDirectories.length === 0) { | ||
console.log(`Executing command "${commandName}" was successful for all views.`); | ||
} else { | ||
console.log(`Executing command "${commandName}" failed for these views:`); | ||
console.log(failedDirectories.map((directory) => ` - ${directory}`).join('\n')); | ||
console.log('See the logs above for more details.'); | ||
} | ||
})(); |
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
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
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,3 +1,3 @@ | ||
export * from './digitaljs.js'; | ||
export * from './yosys.js'; | ||
export * from './nextpnr.js'; | ||
export * from './project.js'; |
Oops, something went wrong.