-
Notifications
You must be signed in to change notification settings - Fork 48
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
Restructure project src & fixed some other issues #27
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
@@ -13,8 +13,8 @@ GHPAGES = $(MODULES)/gh-pages | |||
|
|||
DEST = dist | |||
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
@@ -4,6 +4,7 @@ | |||
"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:
.gitignore
file@jh3y