-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new create FAST project package (#15)
# Pull Request ## 📖 Description <!--- Provide some background and a description of your work. --> This change does the following: - Adds a quick installation and initialization package - Updates the package.json files to point to the fast-cli repository ### 🎫 Issues <!--- List and link relevant issues here using the keyword "closes" if this PR will close an issue, eg. closes #411 --> Resolves #2 ## 👩💻 Reviewer Notes The build will fail until the other packages have been published. ## ✅ Checklist ### General <!--- Review the list and put an x in the boxes that apply. --> - [ ] I have added tests for my changes. - [x] I have tested my changes. - [x] I have updated the project documentation to reflect my changes. ## ⏭ Next Steps <!--- If there is relevant follow-up work to this PR, please list any existing issues or provide brief descriptions of what you would like to do next. --> - Plan next steps for MVP
- Loading branch information
Showing
10 changed files
with
179 additions
and
7 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@microsoft-cfp-template-d0613ed1-f8e9-4021-995c-43640e5be141.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Corrected the package.json repository links", | ||
"packageName": "@microsoft/cfp-template", | ||
"email": "7559015+janechu@users.noreply.github.com", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-create-fast-project-0b262aae-6049-45b7-82e3-0f155d3f8e37.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Added a new create FAST project package", | ||
"packageName": "@microsoft/create-fast-project", | ||
"email": "7559015+janechu@users.noreply.github.com", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@microsoft-fast-cli-1e1f0bef-846c-49d7-87eb-9174e8f9940c.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Corrected the package.json repository links", | ||
"packageName": "@microsoft/fast-cli", | ||
"email": "7559015+janechu@users.noreply.github.com", | ||
"dependentChangeType": "none" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Create FAST Project | ||
|
||
This installation tool will allow you to create and configure your own [FAST](https://www.fast.design) project. | ||
|
||
## Installation | ||
|
||
## Usage | ||
|
||
### npx | ||
|
||
`npx @microsoft/create-fast-project` | ||
|
||
### npm | ||
|
||
`npm init @microsoft/fast-project` |
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,33 @@ | ||
{ | ||
"name": "@microsoft/create-fast-project", | ||
"type": "module", | ||
"version": "1.0.0-alpha.1", | ||
"description": "A FAST project creation tool", | ||
"bin": "./dist/esm/create.js", | ||
"scripts": { | ||
"build": "npm run build:tsc", | ||
"build:tsc": "tsc -p ./tsconfig.json", | ||
"build:tsc:watch": "tsc -p ./tsconfig.json -w" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Microsoft/fast-cli.git" | ||
}, | ||
"author": { | ||
"name": "Microsoft", | ||
"url": "https://discord.gg/FcSNfg4" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Microsoft/fast-cli/issues" | ||
}, | ||
"homepage": "https://github.com/Microsoft/fast-cli#readme", | ||
"dependencies": { | ||
"@microsoft/fast-cli": "^1.0.0-alpha.1", | ||
"cross-spawn": "^7.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^17.0.21", | ||
"typescript": "^4.6.3" | ||
} | ||
} |
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,49 @@ | ||
#!/usr/bin/env node | ||
|
||
import spawn from "cross-spawn"; | ||
|
||
function installCli(): Promise<void> { | ||
return new Promise<void>((resolve, reject) => { | ||
const args = [ | ||
"install", | ||
"@microsoft/fast-cli", | ||
]; | ||
const child = spawn("npm", args, { stdio: "inherit" }); | ||
child.on("close", code => { | ||
if (code !== 0) { | ||
reject({ | ||
command: "npm install @microsoft/fast-cli", | ||
}); | ||
return; | ||
} | ||
resolve(); | ||
}); | ||
}).catch(reason => { | ||
throw reason; | ||
}); | ||
} | ||
|
||
function init(): Promise<void> { | ||
return new Promise<void>((resolve, reject) => { | ||
const args = ["init"]; | ||
const child = spawn("fast", args, { stdio: "inherit" }); | ||
child.on("close", code => { | ||
if (code !== 0) { | ||
reject({ | ||
command: "fast init", | ||
}); | ||
return; | ||
} | ||
resolve(); | ||
}); | ||
}).catch(reason => { | ||
throw reason; | ||
}); | ||
} | ||
|
||
/** | ||
* This package only initializes a project from the FAST CLI | ||
*/ | ||
(function () { | ||
installCli().then(init); | ||
})(); |
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,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"strictNullChecks": true, | ||
"moduleResolution": "node", | ||
"declarationDir": "dist/dts", | ||
"outDir": "dist/esm", | ||
"experimentalDecorators": true, | ||
"noImplicitAny": false, | ||
"strictPropertyInitialization": false, | ||
"importsNotUsedAsValues": "error", | ||
"target": "es2015", | ||
"module": "ESNext", | ||
"importHelpers": true, | ||
"types": [ | ||
"node" | ||
], | ||
"lib": [ | ||
"DOM", | ||
"ES2015", | ||
"ES2016.Array.Include" | ||
] | ||
}, | ||
"include": ["src"] | ||
} |
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