Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Combine all Slate repos into a single monorepo #212

Merged
merged 235 commits into from
Aug 11, 2017
Merged

Combine all Slate repos into a single monorepo #212

merged 235 commits into from
Aug 11, 2017

Conversation

t-kelly
Copy link
Contributor

@t-kelly t-kelly commented Aug 3, 2017

What are you trying to accomplish with this PR?

Combines all Slate repos into a monorepo. This will simplify the Slate project by having a single build, test, and release process. It will make creating and managing issues and PRs easier by having them all in one place.

Improvements to the publishing and deployment workflow have also been made, with most the work being handled by a new npm run publish command. Check out the new CONTRIBUTING.md for more details.

Note: All commits in this PR except the last are pulled from the slate-cli and slate-tools repos to preserve git history

After this PR is merged, I will migrate Github issues from slate-tools and slate-cli to this repo.

Checklist

For contributors:

For maintainers:

  • I have 🎩'd these changes.

m-ux and others added 30 commits July 31, 2017 10:33
* initial yeoman scaffold / generator test
* slate cli command scaffolding
…[--manual] * watch [--nosync] * zip

* ------
* update npm shrinkwrap
* install themekit with bin-wrapper

* themekit abstraction setup

* remove extra rule

* remove placeholder bundler installer

* refactoring and updating for feedback

* EOL gitignore
* generates a new section scaffold in the current theme's `src/sections/` directory
* fixed a bug with theme generation when no name was provided.
* improve ThemeKit comments

* one more ThemeKit comment
* Clone a repo to your project folder

* Changes

* changes

* Changes

* Change

* refactor some code

* install dependencies

* remove random files

* git init and replace slate pkg

* add git/yeoman tpl files/env questions

* finish todos and start commenting code

* remove extra logs

* update comment on private function

* add last private function comment

* absolute dep

* commit stuff

* get generator files from slate repo

* pull templates from cache

* fix indent
…ort for deploying to multiple environments
* add slate theme as a dependency

* remove nodegit

* refactor to only slate for now

* remove unused dependencies

* improve handling of scaffold

* re-add git questions on new theme

* fix spacing

* add gitignore to new theme

* ignore npmignore when converting to gitignore

* remove scaffold question
* exploring help design pattern

* update new mock

* add help to commands

* update me being silly and forgetting things

* remove try catch in favour of lodash

* change double space formatting on help messages
@t-kelly t-kelly self-assigned this Aug 3, 2017
@t-kelly t-kelly force-pushed the lerna branch 9 times, most recently from d4249a9 to f788cc5 Compare August 3, 2017 19:28
@jonathanmoore
Copy link
Contributor

This looks great! I'm positive this will make maintaining Slate significantly easier.

Hopefully, soon there will be some type of plugin solution for pre/post slate-tools tasks. Right now maintaining a fork of shopify/slate-tools for custom tasks is fairly straightforward, but it will be more complex as a monorepo. I don't see a clear way to with NPM to install a forked monorepo package.

@t-kelly t-kelly changed the base branch from 0.12.0 to master August 7, 2017 18:30
@t-kelly
Copy link
Contributor Author

t-kelly commented Aug 7, 2017

@jonathanmoore how are you currently NPM installing your forked version of slate-tools? I don't think this should change anything as all the packages are still structured the same.

The only issue I see is that you will now need to merge in updates from all slate repos, not just slate-tools.

Copy link
Contributor

@bertiful bertiful left a comment

Choose a reason for hiding this comment

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

Minor documentation typos to fix, rest looks good to me.

While I didn't run npm run publish, I ran all other commands and they seems to be working just fine. I'd be good to merge this once @NathanPJF tests on his side.

CONTRIBUTING.md Outdated

This repo is a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) consisting of multiple packages and is managed using [Lerna](https://github.com/lerna/lerna).

The `slate-theme` scaffolding is [intentionally barebones](https://shopify.github.io/slate/theme/#intentionally-blank) to provide an unopinionated starting point. If you're thinking of adding a new feature, consider opening an issue first to discuss it to ensure it aligns to the direction of the project (and potentially save yourself some time!).
Copy link
Contributor

Choose a reason for hiding this comment

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

The "If you're thinking of adding... sentence is duplicated - once here and once above.

CONTRIBUTING.md Outdated
To start working on the codebase, first fork the repo, then clone it:
```
git clone git@github.com:your-username/slate.git
```
*Note: replace "your-username" with your Github handle*

Install the project's dependencies:
Install the all package dependencies and link local packages:
Copy link
Contributor

Choose a reason for hiding this comment

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

"Install all package dependencies"

CONTRIBUTING.md Outdated
| +-- styles/
| +-- templates/
+-- packages/ ** Contains the different components of the Slate project
| +-- slate-cli/ ** A command line interface used to execute slate commands
Copy link
Contributor

Choose a reason for hiding this comment

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

"execute Slate commands"

CONTRIBUTING.md Outdated
| +-- templates/
+-- packages/ ** Contains the different components of the Slate project
| +-- slate-cli/ ** A command line interface used to execute slate commands
| +-- slate-theme/ ** A boilerplate theme to get started on theme development
Copy link
Contributor

Choose a reason for hiding this comment

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

"with theme development"

CONTRIBUTING.md Outdated

## Getting Started

To start working on the codebase, first fork the repo, then clone it:
```
git clone git@github.com:your-username/slate.git
```
*Note: replace "your-username" with your Github handle*
Copy link
Contributor

Choose a reason for hiding this comment

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

"your GitHub handle"

CONTRIBUTING.md Outdated
The [CHANGELOG.md](https://github.com/Shopify/slate/blob/master/CHANGELOG.md) file is generated by the gem [github_changelog_generator](https://github.com/skywinder/github-changelog-generator). Changelog will itemize changes between tags on GitHub.
The changelog is updated by the repo's maintainers since a [personal access token](https://github.com/settings/tokens) with repository access is needed to handle GitHub's API call limits.

If this is your first time generating changelog entries, add your personal access token with `public_repo` privledges to the `GITHUB_AUTH` environment variable by adding the following to your `.bashrc` file:
Copy link
Contributor

Choose a reason for hiding this comment

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

"privileges to the"

CONTRIBUTING.md Outdated
# Lerna Changelog Personal Access Token for shopify/slate repo
export GITHUB_AUTH=your_personal_access_token
```
*Note: replace "your_personal_access_token" with your Github personal access token*
Copy link
Contributor

Choose a reason for hiding this comment

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

"GitHub personal access token"

npm run changelog -- --tag-from=v0.12.0
```

Copy the generated markdown from your terminal into [CHANGELOG.md](https://github.com/Shopify/slate/blob/master/CHANGELOG.md) and add any additional comments you wish to include. If the title of the autogenerated changelog is `Unreleased`, make sure you change it the new version name.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

"enhancement": ":rocket: Enhancement",
"bug": ":bug: Bug Fix",
"documentation": ":memo: Documentation",
"internal": ":house: Internal"
Copy link
Contributor

Choose a reason for hiding this comment

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

What does internal refer to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Internal refers to behind the scenes changes that don't necessarily change anything for users. This PR is an example of an internal change.

}
this.bucket = process.env.AWS_BUCKET;
AWS.config.credentials = new AWS.Credentials(process.env.AWS_ACCESS_KEY_ID, process.env.AWS_SECRET_ACCESS_KEY);
AWS.config.region = 'us-east-1';
Copy link
Contributor

Choose a reason for hiding this comment

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

All the updates in this file look good to me - I assume there's really no way to test until we merge the changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Any changes needed to be done to these files can me committed directly to master.

Copy link
Contributor

@NathanPJF NathanPJF left a comment

Choose a reason for hiding this comment

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

A couple of documentation and URLs that will need to be updated.

I spent some time testing this branch and ran into some issues. I'm going to send you a separate note with those because it's a bit much to get into in a GitHub thread.

CONTRIBUTING.md Outdated
```

## View changes to `slate-theme` package in a live store

Create a config.yml file with private app settings from your shop. See [config-sample.yml](https://github.com/Shopify/slate/blob/master/config-sample.yml) as an example.
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to config-sample will have to reflect new repo structure. Worth doing a mass search and replace for that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did a search for all blob/master links

@@ -0,0 +1,214 @@
# Slate CLI
[![CircleCI](https://circleci.com/gh/Shopify/slate-cli.svg?style=svg&circle-token=83ed3f203115767f7bc4e6f3be07cb93788f4bd2)](https://circleci.com/gh/Shopify/slate-cli)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still relevant?

You will need to fill in the required fields for each store / environment. Comment out any environments that you want to set up later or Theme Kit will throw an error.

> _For more details on configuring your environments please see our
**[Store configuration guide](https://github.com/Shopify/slate-cli/blob/master/store-configuration.md)**._
Copy link
Contributor

Choose a reason for hiding this comment

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

URL will need to be updated.


## License

MIT, see [LICENSE.md](http://github.com/Shopify/slate-cli/blob/master/LICENSE.md) for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

URL will need to be updated.


### Finding your theme_id

_**warning:** some commands ([`start`](https://github.com/Shopify/slate-cli#start), [`deploy`](https://github.com/Shopify/slate-cli#deploy)) will overwrite the existing code on this `theme_id` with empty boilerplate.
Copy link
Contributor

Choose a reason for hiding this comment

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

URLs will need to be updated.

Copy link
Contributor

@NathanPJF NathanPJF Aug 11, 2017

Choose a reason for hiding this comment

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

([`start`](https://github.com/Shopify/slate/packages/slate-cli#start)

and

([`deploy`](https://github.com/Shopify/slate/packages/slate-cli#deploy)

@@ -0,0 +1,29 @@
# @shopify/slate-tools
[![CircleCI](https://circleci.com/gh/Shopify/slate-tools.svg?style=svg&circle-token=0b8147527ef88134b4238064a563ceaaae98f06a)](https://circleci.com/gh/Shopify/slate-tools)
Copy link
Contributor

Choose a reason for hiding this comment

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

Still relevant?


## Contributing
For help on setting up the repo locally, building, testing, and contributing
please see [CONTRIBUTING.md](https://github.com/Shopify/slate-tools/blob/master/CONTRIBUTING.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

URLs will need to be updated. A couple below as well.

@t-kelly t-kelly force-pushed the lerna branch 3 times, most recently from 706dce4 to e3a299a Compare August 11, 2017 13:37
Copy link
Contributor

@NathanPJF NathanPJF left a comment

Choose a reason for hiding this comment

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

One comment above about updating the URLs. Rest looks good 😎

@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants