microsoft / fast-cli Goto Github PK
View Code? Open in Web Editor NEWA project for FAST command line interface tools.
License: MIT License
A project for FAST command line interface tools.
License: MIT License
To aide in the process of using FAST, including such things and project maintenance for SSR, adding components, etc., a CLI should be added.
@microsoft/fast-cli
packagefastconfig.json
fastconfig.json
is available and passes a JSON schema validation testWhen I tried to install the fast-cli: I got the following error:
npm install -g @microsoft/fast-cli
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@microsoft%2ffast-cli - Not found
npm ERR! 404
npm ERR! 404 '@microsoft/fast-cli@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shijirtsogoo\AppData\Local\npm-cache\_logs\2022-06-07T19_57_00_665Z-debug.log
No response
`npm install -g @microsoft/fast-cli`
install -g @microsoft/fast-cli
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@microsoft%2ffast-cli - Not found
npm ERR! 404
npm ERR! 404 '@microsoft/fast-cli@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shijirtsogoo\AppData\Local\npm-cache\_logs\2022-06-07T19_57_00_665Z-debug.log
Currently the CLI makes assumptions about where it is installed. This is due to the initial stab at this project relying on reading template files and copying them as a means of initializing a project.
@microsoft/fast-cli
that will target a folder and convert it to an exported executable that can be used by the @microsoft/fast-cli
to build a project@microsoft/cfp-template
and include the generated file as an export@microsoft/cfp-template
so that different maintained template projects can be specified, for example "project" vs "component library" vs "design-system"Hi,
When running the following, the package is not installed because it is not found in npm registry.
npm install -g @microsoft/fast-cli
@microsoft/fast-cli
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@microsoft%2ffast-cli - Not found
npm ERR! 404
npm ERR! 404 '@microsoft/fast-cli@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
@microsoft/fast-cli
Common options among CLI projects is a help command to list out available commands as well as help for a specific command.
Another common command is a version command that tends to be used to check if the latest version is installed as well as for debugging version issues between locally and globally installed versions of the CLI.
The CLI and CFP template must be updated to match the CLI specification for dealing with project templates.
When multiple components are installed at once they tend to cause an issue in node_modules
for their dependencies.
A package with the naming convention starting with create
should be added to facilitate using npm
and npx
for creating a project.
@microsoft/create-fast-project
@microsoft/fast-cli
The CLI needs a package that will be used as a template for both project creation and maintenance. It should have a very simple "Hello world" component and webpack setup to start out with. This will serve as the method for testing CLI projects and to be used as the default.
@microsoft/cfp-template
fastconfig.json
Allow the addition of multiple foundation components at once in the add-foundation-component
command.
For the upcoming release the dependencies for the CLI config version 1.0.0-alpha.2
necessitates the updating of the CLI components.
components/
folder to match API updates for the updated dependencies in the version matrix for config version 1.0.0-alpha.2
A user may want to set up a project will all available foundation components, this should be facilitated by an --all
command line argument.
The migrate
command necessitates that the new current version is tied to FAST CLI config version 1.0.0-alpha.2
which requires the updating of dependencies of the main app project.
@microsoft/cfp-template-files
private package to the new dependencies for FAST CLI config version 1.0.0-alpha.2
@microsoft/cfp-template
exportAdd a documentation site for the packages that leverages markdown.
The following dependencies that the CLI relies on for templates may be updated at various points:
@microsoft/fast-foundation
@microsoft/fast-element
@microsoft/adaptive-ui
(tbd)There may be others but these are the primary dependencies for foundation components.
Due to this there is a need for the CLI to facilitate migration. The 2.x release of @microsoft/fast-element
is coming up, along with planned changes for @microsoft/fast-foundation
which will facilitate a major version bump.
Each major version bump has the capability to break the CLI and any users on the CLI. If a user is interested in updating to a new version of the CLI, this must be addressed.
Additionally, when the CLI is released, it should provide a migration path for users on the previous version of @microsoft/fast-element
.
migrate
command with arguments for which version should be targeted
Add the option to specify a foundation component to the add-component
command.
foundation/
directory--foundation
Add a configuration command fast config
to the CLI.
config
command per the specification see https://github.com/microsoft/fast-cli/blob/main/specs/fast-cli.md#configuration for detailsCurrently the CLI take a long time to test due to the fact that building a project to test the output takes a long time, this would be better served if the generated files were abstracted and only the full project with all components was tested.
The FAST components are being deprecated and as part of that story, the styles and references to templates are moving to the CLI. Enabling the creation of styled foundation components requires that a documented list of available components must be added.
The @microsoft/fast-components
must be moved as part of their evolution going forward.
@microsoft/fast-components
be integrated into the FAST CLIfastconfig.json
files needed for templatesAdd the command add-component
.
--name
and --template
functionality from the above spec, the foundation logic will be added in another issueAdd a fast add-design-system
command.
add-design-system
command based on the specification - https://github.com/microsoft/fast-cli/blob/main/specs/fast-cli.md#add-a-design-systemi'm in endeavouros "Arch Linux based Distro" i installed nodejs using fnm tried both node v16 and node v14 the output below from v14
steps:-
$ mkdir sbird-design-system
$ cd sbird-design-system
$ npm init
$ npm install --save-dev @microsoft/fast-cli
i aliased fast command in package.json ( "scripts": { "fast": "fast" } )
npm run fast ....
$ npm run fast config
i realized it only added config file so next i ran :
$ npm run fast init
Note: until now things all fine
when i run fast add-component :
$ npm run fast add-component --name test
Note: i tried installed fast-cli globaly as well node v16 same results
[mohammed9@architect-pc sbird-design-system]$ npm run fast add-component --name test
[email protected] fast /home/mohammed9/webdev/design-systems/sbird-design-system
fast "add-component" "test"
npm WARN deprecated [email protected]: this package has been deprecated
npm WARN [email protected] requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
249 packages are looking for funding
run npm fund
for details
found 8 high severity vulnerabilities
run npm audit fix
to fix them, or npm audit
for details
(node:164735) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Object.resolve (path.js:1074:7)
at file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:234:34
at Generator.next ()
at /home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/tslib/tslib.js:118:75
at new Promise ()
at __awaiter (/home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/tslib/tslib.js:114:16)
at checkTemplateForFiles (file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:233:12)
at file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:284:15
(Use node --trace-warnings ...
to show where the warning was created)
(node:164735) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:164735) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✔ The package containing a component template … test
✔ The name of the component … test
last 2 lines after the error above appear i can enter the component name and i pressed enter but nothing happened
i went through docs many times but couldn't see anything wrong with my approach i'm some what still new developer.
Best regards
"@microsoft/fast-cli": "^1.0.0-alpha.5"
mohammed9@architect-pc sbird-design-system]$ npm run fast add-component --name test
> [email protected] fast /home/mohammed9/webdev/design-systems/sbird-design-system
> fast "add-component" "test"
npm WARN deprecated [email protected]: this package has been deprecated
npm WARN [email protected] requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
updated 1 package and audited 1679 packages in 17.083s
249 packages are looking for funding
run `npm fund` for details
found 8 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
(node:164735) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Object.resolve (path.js:1074:7)
at file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:234:34
at Generator.next (<anonymous>)
at /home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at __awaiter (/home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/tslib/tslib.js:114:16)
at checkTemplateForFiles (file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:233:12)
at file:///home/mohammed9/webdev/design-systems/sbird-design-system/node_modules/@microsoft/fast-cli/dist/esm/cli.js:284:15
(Use `node --trace-warnings ...` to show where the warning was created)
(node:164735) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:164735) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✔ The package containing a component template … test
✔ The name of the component … test
The @microsoft/fast-components
package is being deprecated. As a means of supporting consumers who still want to create components with design systems, this work will be migrated to the FAST CLI package.
This issue will serve as a tracking issue for ongoing spec writing and work moving forward.
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.