-
Notifications
You must be signed in to change notification settings - Fork 90
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
Point main to CSS file for usage by bundlers #263
Conversation
@navaati maybe it's not a good idea to hardcode the |
Hi ! I… actually agree, haha, but the generated package that’s uploaded to NPM only has the files with the version number.
What do you prefer ? |
@navaati I like the first option: create two files. One with the version, another one without it. |
Done using command: `for f in $(git ls-files); do sed -i 's/2015-2023/2015-2024/' $f; done`
This allows to just do ```typescript import 'tacit-css' ``` instead of ```typescript import 'tacit-css/dist/tacit-css-1.6.0.css' ``` in your JS code when using a bundler like Webpack.
Hi. So I re-pushed a series of commits to achieve that. I dived into the build system and realize the default task was broken due to a missing dependency, the first commit in the series fixes that. Then the build still failed due to 2024 being there and the checkYear task not being happy with it, I fixed that with the second commit. By the way, I’m not sure why the Github build was green: see https://github.com/yegor256/tacit/actions/runs/7287245373/job/19857523850#step:6:13 for the current state, grunt fails but GH seems ok with it, I don’t know enough Github Actions to understand… Anyway grunt default build is fine now. Then in 3rd and last commits I add the unversionned file and expose it in package.json. I decided to expose the uncompressed file because usually people requiring the CSS in JS that way will have their own CSS minimizing pipeline anyway. Tell me what you think. |
@rultor merge |
@rultor release, tag is |
@navaati thanks a lot for your contribution! New version 1.7.0 has already been published. |
Hum, so… unfortunately, it doesn’t work ><. I’m not sure why, but the resulting files are not in the package on NPM. I get it now that it is this "rultor" tool doing the publish, and there is this |
@rultor release, tag is |
Cool, it works now, thanks ! |
@navaati thanks for your help! |
This allows to just do
instead of
in your JS code when using a bundler like Webpack.