-
Notifications
You must be signed in to change notification settings - Fork 48
Restructure project src & fixed some other issues #27
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
Conversation
| public/ | ||
|
|
||
| test/test.js | ||
| dist/ |
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'm not sure if dist should be ignored. If someone pulls this package in via different means, this forces them to create the output files themselves.
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.
In general, we should always avoid committing dist or build stuff. For GitHub users, we can publish distributions to the release page so that they can directly download the distribution without clone the whole repo.
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.
Had completely forgot about attaching files to the release π great shout!
Makefile
Outdated
| FILE_NAME = ep | ||
| SCRIPT_SRC = src/script/entries/ep/index.js | ||
| STYLE_SRC = src/script/entries/ep/ep.scss | ||
| SCRIPT_SRC = src/script/entries/ep/scripts/index.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 should have maybe been more clear in my wording within the issue. My aim was to make the structure more intuitive in the sense of extracting styles from the src/script folder.
Something like;
- src
- script
- index.js
- styles
- ep.scss
| "description": "enhance your progress bars with minimal effort!", | ||
| "main": "dist/ep.js", | ||
| "scripts": { | ||
| "prepublish": "make dist", |
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 I understand correctly, this is why dist has been ignored? It's assumed that a user will pull the package in via npm and therefore creating the dist output prepublish makes it available to those who pull in via npm etc.?
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.
Yep, this script make npm build the package before it is published to the npm central repository, therefore after npm users installing the package, the dist will just be there. In this way, we can guarantee that the build is always newest and relax us from manually building.
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 contributing @unixzii π
I've just got a couple of comments regarding the changes π
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.
Looks good! π
Just one last thing, can we bump the version number before squash and merge? π
|
@jh3y Okay, done. |
|
imo, semver should've changed to 2.1 with this change -- mainly because bower installs are broken if were relying on the dist/ files as bower doesn't build them out with current config. I have a production site I had to lock in to 2.0.3 as ^2.0.3 on a fresh install updated it which lost the dist files in which we relied on. I'll figure it out in some free time and patch it so bower install is no longer without any dist files. |
Fixes #25.
Changes include:
.gitignorefile@jh3y