-
-
Notifications
You must be signed in to change notification settings - Fork 790
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
Build system updates #71
Conversation
I think the second one is better.
For the first one, this will create a messy scss structure and the development will be pain to see flattened files in one folder.
I guess no one will use this template if it can't work in a sub-path. And it's important to create a demo in Github Pages, which the root project URL is in
And this is the one that I guess is the best option. In the current In case to avoid the sass problem, we'll just use the copied // The way to import from node_modules
@import "~@icon/dripicons/dripicons.css"; Instead, we can do this: // turn off the processCssUrls so Laravel Mix wouldn't change the URL we point to the dist folder.
mix.options({
processCssUrls: false
})
// copy the deps to vendors folder
mix.copy("node_modules/apexcharts", "dist/assets/vendors/apexcharts") And finally, we link the script to the {% block js %}
<script src="assets/vendors/dayjs/dayjs.min.js"></script>
<script src="assets/vendors/apexcharts/apexcharts.js"></script>
<script src="assets/js/pages/ui-apexchart.js"></script>
{% endblock %} What do you think? |
I think by copying over files, a lot of advantages of using a bundler are getting lost. However, I think I found a good solution now. I was wrongly assuming we had to flatten the scss structure. Instead, we need to flatten the structure of the generated css structure which is much less of a pain. |
Hi @zuramai |
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.
Hi @Niksac,
That's a completely great improvement and we could release after this for version 2 of Mazer.
And there's one missing dependency, I guess you can add it to package.json
file.
Module not found: Error: Can't resolve 'datatables.net' in '/mazer/src/assets/js/extensions'
And we actually need the "dist" folder for them who want to directly use the build result. Is there any way to include the "dist" folder automatically on release? So it would be included in the zip release file. If there is not, I guess we could upload the zip manually to the releases. |
Hi @zuramai Regarding the dist folder and releases: I created a branch on my fork and did a basic setup. This will bundle the files, zip them, and attach the dist.zip when releasing to GitHub. Warning: |
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.
can you make a pull request from your release-it-test branch?
After your two pull requests merged, I will release a RC version before it goes to V2.
@zuramai Also, you should decide, if the lack of RTL is a show-stopper for a release. |
I have made the RC branch, check it out. For RTL issue, it shouldn't be a problem for early v2, we can still add features gradually. We need this PR and release-it stuff to be merged because it changed the development environment much better. |
I figured out the problem with Maybe we add a notice for windows users. |
I don't know if there's an issue around the OS, but it's working on my both systems, Windows and Arch Linux. |
I'm working with the dev on solving it. |
Hi @zuramai I removed the broken RTL page from the demo and replaced it with a "coming soon" page with a notice about existing support in old versions. While on it, I did quite some textual changes. There were spelling errors or unfitting text on several places.
|
Great! We can upgrade the |
As discussed in the other MR, i put some work into loading all dependencies from the npm sources and reorganized the built system quite a bit.
The dist folder and especially the included "vendor" folder is not part of the repo anymore and all third party code is loaded and budled via npm and webpack.
Fonts and the file uploaded (filepond) are also loaded from there.
Package remarks
Extension vs page
Although most examples are being used on a single page only, some resources are loaded from folders called
extension
and some are loaded frompages
.I'd suggest that for the demo, we load page specific SCSS and JS only so the
extensions
resources folders would be moved into thepages
folders.RTL support
Because the RTL layout used a separate, modified stylesheet which is now gone with the dist folder, RTL is broken.
I dont really know
rtlcss
and dont know which changes were done to make rtl work.There are some page specific adaptations as well.
I would suggest creating a separate RTL entry point which can load the (experimental) bootstrap5 rtl version and make some overwrites to the mazer styles.
Maybe @MahdiMajidzadeh can help us out here.
I'm creating this MR for discussion purposes - please don't merge right away.
Please try, if the build works on your end and if you notice something.