-
Notifications
You must be signed in to change notification settings - Fork 132
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
Merge /vue-strap into /markbind #1248
Conversation
@acjh one thing led to another (as explained particularly in the 2nd last (move all frontend build dependencies to /markbind) commit message), and I needed to make quite a few changes to ensure the build, linting and testing processes didn't break minimally. Most notably I ended up deciding to remove
Future plans:
|
43a01ba
to
ecce674
Compare
4eaa1f2
to
04e7fab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this attempt.
However, we may be moving in the wrong direction by merging the tests and dependencies.
We can provide a single helper command in package.json to run both tests, but not like this.
package.json
Outdated
], | ||
"author": "Jiang Sheng <gisonrg@gmail.com>", | ||
"license": "MIT", | ||
"homepage": "https://markbind.org/index.html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just https://markbind.org
?
package.json
Outdated
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/MarkBind/markbind.git" | ||
}, | ||
"scripts": { | ||
"autolint": "npm run lintfix && npm run csslintfix", | ||
"build": "webpack --progress --hide-modules --config frontend/components/webpack.build.js", | ||
"builddev": "webpack --progress --hide-modules --config frontend/components/webpack.dev.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should combine frontend dependencies with backend dependencies here.
How about having vuebuild
, vuelint
etc. that cd frontend/components
and then run these there?
We can have similar commands in frontend/components/package.json
for those working on only FE.
Thanks for the thorough review! Wasn't expecting one so quick. Apologies for the late reply as well, needed some time to give it more thought.
To provide more context, on top of the reasons mentioned in the commit messages,
I haven't thought of the specifics of course, more problems will always arise when actually implementing these, but just on a quick glance I think going for a mono-package structure for now would help tremendously in these goals, since many of /vue-strap's dependencies are necessary for the above. On the other hand, sub packages do provide a clear seperation of dependencies. On this note and the above raised points, perhaps we could eventually create a new sub-package for the whole of TLDR: perhaps we can shift back when we start to have a ton of dependencies lumped together and it's not clear what is used where. |
Even so, we shouldn't make those changes (that should be assessed separately) in this PR.
It's very messy now. I'm not sure why you phrase it differently, you are just "migrating" now. |
Noted. The commit organization is quite messy. Will split this into 2/3 prs. This PR should be able to retain up to the first 4 commits though
I guess I meant "sticking to the existing structure for now then migrating later" 😅 |
7e1577c
to
b0b5788
Compare
updated @acjh, just 5 commits now
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! The diff is more reasonable now.
frontend/components/.eslintignore
Outdated
src/Tab.vue | ||
src/TabGroup.vue | ||
src/Tabset.vue | ||
src/Thumbnail.vue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go under # MarkBind/vue-strap
; wrongly added in MarkBind/vue-strap#107.
Actually, I ignored .vue
files in MarkBind/vue-strap#29 to avoid large code style changes (especially those under # yuche/vue-strap
) — for files that we barely touch, we tolerate the style for cleaner git annotate
. New files should be linted and we can consider linting those under # MarkBind/vue-strap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I ignored .vue files in MarkBind/vue-strap#29 to avoid large code style changes
I'll open an issue for this sometime, but it's rather unrelated at the moment.
Perhaps we could use git annotate to see the % of lines changed to decide which to unignore, but as we migrate more components to bootstrap-vue this shouldn't be necessary 😄
frontend/components/package.json
Outdated
"lint": "./node_modules/.bin/eslint . --ext .js,.vue; exit 0", | ||
"lintwin": "./node_modules/.bin/eslint . --ext .js,.vue", | ||
"lintfix": "./node_modules/.bin/eslint . --fix --ext .js,.vue" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add helper commands (e.g. vuebuild
, vuelint
, lintall
) that cd frontend/components
and then run these in the "scripts"
of the root package.json?
Or do we plan to do it in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we go with removing package.json
and use nested eslintrcs that won't be necessary, but either way a separate PR would be better.
Right now i'm aiming for "copy and paste + make ci work + edit whatever documentation dosen't make sense anymore" (I'll add in devdocs as well once #1246 gets merged)
b0b5788
to
46f7594
Compare
@acjh ready for another review, resolved your comments and updated with a 6th commit updating the dev guide as well |
@acjh @marvinchin on the multi package topic, I was curious how much larger projects handled the amount of subpackages they had - and found this https://lerna.js.org/ This potentially resolves all the concerns I had with duplicated dependencies / It even has some features like lerna publish to publish multiple packages with the same version simultaneously, which can help improve multi package release processes If all goes well (not having compatibilty issues with nested babel configs, etc.), I feel this would be the next logical step to take before attempting any more of the plans #1248 (comment). What do you think of it? On second thought, I'm still not sure if there's much point in maintaining a seperate package just for the vue components though. To reiterate,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested some improvements for phrasing and consistency.
frontend/components/package.json
Outdated
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's further adjust the order based on https://docs.npmjs.com/files/package.json.
"name": "vue-strap",
"version": "2.14.1",
"description": "Bootstrap components built with Vue.js",
+ "keywords": [
+ "homepage": "https://markbind.org",
+ "license": "MIT",
+ "files": [
"main": "dist/vue-strap.js",
"repository": {
- "homepage": "https://markbind.org",
- "license": "MIT",
+ "scripts": {
"dependencies": {
- "files": [
- "keywords": [
"devDependencies": {
- "scripts": {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do the ones for markbind/markbind-cli
in a seperate PR as well
I don't think we currently need Lerna. MarkBind has way fewer packages than several of the repos — only 3 (we haven't adopted my npm plugin proposal) — and we currently only publish one.
If we develop a feature that adds significant value and absolutely requires combining the dependencies, then we will cross that bridge. Separation of concerns has value. It's not something we should abandon for convenience. |
5cf6059
to
d69cff5
Compare
Thanks for the thorough suggestions! @acjh Rectified accordingly
Definitely, I just don't think that having the formalities of a That said, I don't have a lot of experience working with multi package environments; I'm willing to see where this goes for now, if need be we can always eliminate it in the future.
👍, could reconsider if we have more / actually restructure I just found out that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested some touch-ups.
"vue", | ||
"markbind" | ||
], | ||
"homepage": "https://markbind.org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be https://markbind.org/userGuide/usingComponents.html?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm might be better to just use markbind.org
in case we shift usingComponents
next time. it contains some irrelevant things like the page/sitenav too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
frontend/components/package.json
Outdated
"LICENSE", | ||
"README.md", | ||
"CHANGELOG.md", | ||
"src", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems there was never CHANGELOG.md
and it's not necessary to package src
.
Markbind's vue component definitions are stored in the vue-strap fork. This has some implications on development and maintainer workflow (see issue MarkBind#411 for more detail), most notably needing to manually copy the minified bundle to test changes in /vue-strap. An alternative was raised in issue MarkBind#981 to alleviate this, that is to make /vue-strap a scoped package. This still has several drawbacks as compared to a complete repo merge as outlined in MarkBind#411, such as needing to run tests on both repos. Hence, let's prepare the directory structure of the vue-strap fork to allow for a clean merge into the /markbind repo, preserving the commit history of /vue-strap.
Vue-strap enables coverage reporting for snapshot tests. The linting and jest configurations need to be updated as well to isolate linting and tests to their original repos as well. Let's add the coverage folder to .gitignore to avoid large coverage diffs. Let's also update the eslint, stylelint and jest configurations to ignore the appropriate folders. Some vue component no longer exist that are still in the .eslintrc file as well. Let's remove these.
d69cff5
to
8d7e4a8
Compare
With the /vue-strap fork now merged, let's update README.md to reflect the origins of the project, and attribute the components modified from /vue-strap.
Let's update package.json to remove some unneeded fields leftover from the fork, such as browserify, and to reflect the new homepage.
8d7e4a8
to
0d2ee5a
Compare
Btw, I suggest using https://blog.sebastian-daschner.com/entries/git-commit-fixup-autosquash |
thanks for the review and tip! I don't quite get the force pushing though - since the commits after the fixup-ed commit have their hashes changed, wouldn't that still require a force push? (or do you mean to do the |
Yup. |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] Other, please explain:
Resolves #411
Resolves #981
What is the rationale for this request?
Merge /vue-strap repo into /markbind
What changes did you make? (Give an overview)
I aimed for minimal changes for now, but one thing lead to another as explained in the commit messages (particularly the last one), and had to make quite a few changes still.
Is there anything you'd like reviewers to focus on?
na
Testing instructions:
npm run build
should build the minifiedvue-strap
as per normalnpm run test/lint
should pass, and the snapshot tests should also be runProposed commit message: (wrap lines at 72 characters)
Merge /vue-strap into /markbind
Markbind's vue component definitions are stored in the vue-strap fork.
This has some implications on development and maintainer workflow (see
issue #411 for more detail), most notably needing to manually copy the
minified bundle to test changes in /vue-strap.
An alternative was raised in issue #981 to alleviate this, that is to
make /vue-strap a scoped package. This still has several drawbacks as
compared to a complete repo merge as outlined in #411, such as needing
to run tests on both repos.
Hence, let's change the directory structure and configurations of
/markbind to accomodate the linting, testing and building processes
from /vue-strap.