queekusme / create_queekus_project Goto Github PK
View Code? Open in Web Editor NEWnode project creator to my own specifications
License: MIT License
node project creator to my own specifications
License: MIT License
in the node template it contains the scripts that should be part of the eslint package, this should be extracted into an additional so that any template can add a script if necessary, others should be refactored out as necessary
Until top level async is supported in my current node version, self calling async functions need using.
more than 1 pckage may require this so this should be built in so that only 1 is provided and everything which needs to be within it can be placed appropreately
The templates provide examples for their use such as commander
.argument('<required_argument>', 'a required argument')
.argument('[optional_argument]', 'an optional argument')
.argument('[additional...]', 'multiple additional arguments')
.option("-d, --debug", "an example option")
.requiredOption("-a, --another_debug", "an example required option")
Whilst these are good as a template example to get started, other templates may wish to provide their own options for when packages are used in conjunction...
If a package provides data that another requires but the other package isn't included, the action is to ignore the data.
For example, express could provide the following
.requiredOption("-p, --port <port>", "the port to run the webserver on", CommanderUtils.parseAsInt)
where CommanderUtils is a file such as the following containing utils which will help minimise code required for cross-template information
export function parseAsInt(): number
{
const parsed: number = parseInt(value);
if(isNaN(parsed))
throw new commander.InvalidArgumentError('Port number is invalid (Not a Number)');
return parsed;
}
which would be inserted as a required option within commander
This should use the existing replacements system and an extra config option
e.g.
cross_template_replacements:
- commander_additional_optsargs:
- .requiredOption("-p, --port <port>", "the port to run the webserver on", CommanderUtils.parseAsInt)
- .argument('<express_thing>', 'an example required argument')
code integration to allow these to be passed to things which use them is to be decided by the template
arguments for commander are tricky as well as they are passed in the function args whereas options are the last param as a group
Take ‘external dev @types/fs-extra ^9.0.12 noinclude’
noinclude should be optional in this setting as a dev dependency should never need importing… if it did it shouldn’t be marked as dev…
noinclude should be kept for runtime deps which don’t need including in files
priority being a number is causing some issues with working out ordering...
the following would be better
e.g.
level: process.env.NODE_ENV === "production" ? "info" : "debug",
const port: number = options.port;
is provided however should be process.env.PORT; if commander isn't being used
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.