Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new private package the cfp-template so it can run as a standalone project #120

Merged
merged 3 commits into from Sep 23, 2022

Conversation

janechu
Copy link
Contributor

@janechu janechu commented Sep 22, 2022

Pull Request

πŸ“– Description

This change copies the files from the @microsoft/cfp-template into a new private package @microsoft/cfp-template-files.

This is the first step in de-coupling the logic for a standalone project and the template providing project.

🎫 Issues

Begins work on #121

πŸ‘©β€πŸ’» Reviewer Notes

These files are the same as the ones in the ./packages/cfp-template/template/ folder.

βœ… Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.

⏭ Next Steps

  • Create a @microsoft/fast-cli export for reading a project as a template and exporting initialization logic

Copy link
Contributor

@EisenbergEffect EisenbergEffect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to update this to the latest fast-element and fast-foundation?

import { welcome } from "./welcome/define.js";

export default [
welcome()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem correct. With the new compose API, this isn''t a function.

import { template } from "./welcome.template.js";
import { styles } from "./welcome.styles.js";

export const definition = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks like out-of-date foundation code...

janechu added a commit that referenced this pull request Sep 23, 2022
…ault export (#123)

# Pull Request

## πŸ“– Description

<!--- Provide some background and a description of your work. -->
This change adds a utility file for use in the `@microsoft/cfp-template` which will take a dependency on the new private package introduced in #120 and use this utility to generate an exported script. This will eliminate pathing problems occurring from the current use of `fs` to read template files. Instead the contents of the files will be imported as they will be written to an exported script.

### 🎫 Issues

<!---
List and link relevant issues here using the keyword "closes"
if this PR will close an issue, eg. closes #411
-->
Continues work on #121 

## βœ… Checklist

### General

<!--- Review the list and put an x in the boxes that apply. -->

- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [ ] 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.
-->
- Merge #120
- Delete `template/` folder from `@microsoft/cfp-template`
- Add `@microsoft/cfp-template-files` as a devDependency of `@microsoft/cfp-template`
- Add a NodeJs script to execute the utility added in this PR against the contents of `@microsoft/cfp-template-files`
@janechu
Copy link
Contributor Author

janechu commented Sep 23, 2022

Is it possible to update this to the latest fast-element and fast-foundation?

I'm in the middle of refactoring to solve a pathing issue, I can make that the next body of work.

@janechu janechu merged commit 25305e1 into main Sep 23, 2022
@janechu janechu deleted the users/janechu/create-private-project-for-cfp-template branch September 23, 2022 17:05
@janechu janechu mentioned this pull request Sep 24, 2022
3 tasks
janechu added a commit that referenced this pull request Sep 24, 2022
# Pull Request

## πŸ“– Description

<!--- Provide some background and a description of your work. -->
This change updates the exports to use named exports from the `template` and `fs` utilities. This will simplify referencing them in the future.

### 🎫 Issues

<!---
List and link relevant issues here using the keyword "closes"
if this PR will close an issue, eg. closes #411
-->
Continues work on #121

## βœ… 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.
- [ ] 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.
-->
- See notes on #120
janechu added a commit that referenced this pull request Sep 25, 2022
…emplate files into a ts file (#129)

# Pull Request

## πŸ“– Description

<!--- Provide some background and a description of your work. -->
This change removes the now redundant (with the addition of the private package in #120) and leverages the utility added in #123 & #128 to generate an export to be used by the `@microsoft/fast-cli`.

### 🎫 Issues

<!---
List and link relevant issues here using the keyword "closes"
if this PR will close an issue, eg. closes #411
-->
Continues work on #121

## βœ… 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.
-->
- Re-evaluate all remaining pathing used by components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants