8000 Updates builder to handle multiple css and js file outputs - Fixes #34 by brettg2 · Pull Request #40 · frozeman/meteor-build-client · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Updates builder to handle multiple css and js file outputs - Fixes #34 #40

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

Closed
wants to merge 1 commit into from

Conversation

brettg2
Copy link
@brettg2 brettg2 commented Nov 15, 2016

@frozeman this should fix the issue where multiple css files generated by the meteor build tool were not being included in the index.html output. Let me know if there's any issues. Thank you!

@fegemo
Copy link
fegemo commented Mar 8, 2018

Hi @brettg2, I know this PR is from a long time ago, but I'm in need of solving the same issue you were tackling here. One thing that I'm concerned is with the order of inclusion of the CSS files, as it matters for the correct resolution of the cascading rules.

If I understood it right, the proposed change uses fs.readdirSync, filters all files ending with .css and then adds each of them to index.html source code, in the same order returned by fs.readdirSync.

The readdirSync documentation points to the POSIX man page for readdir, which states:

The order in which filenames are read by successive calls to
readdir() depends on the filesystem implementation; it is unlikely
that the names will be sorted in any fashion

So, the order in which readdirSync returns the files is probably not the order in which we should include the files. In this regard, have you done it differently somehow, for your case? I'm thinking here that it might be possible to look into the file creation time and sort by that - I know close to nothing of meteor internal workings, but I'm guessing this might work... do you (and maybe @frozeman) have any thoughts on this?

Thank you both!

dr-dimitru added a commit that referenced this pull request May 28, 2020
- ES6;
- Overall codebase refactoring and linting;
- Remove spinner, `simple-spinner` dependency, and `-hide,
--hideSpinner` command line options;
- Support for modern (ES6) and legacy (ES5) builds (legacy build is
used by default);
- Support for Meteor's `<meteor-bundled-js/>` and
`<meteor-bundled-css/>`;
- Support for `body.html` and `blaze-html-templates` (see updated
readme);
- Support for `{{url-to-meteor-bundled-css}}` placeholder, which can be
used in `<link rel="preload">`;
- `--usebuild` option now accepts `<path>` to the build;
- Update NPM dependencies;
- Closing: #53, #40;
- Solving: #61, #57, #55, #42;
- Taking into account: #59, #35;
@dr-dimitru dr-dimitru mentioned this pull request May 28, 2020
Merged
dr-dimitru added a commit that referenced this pull request Aug 11, 2020
## v1.0

- Update codebase to ES6;
- Overall codebase refactoring and linting;
- __Breaking__: Remove spinner, `simple-spinner` dependency, and `-hide, --hideSpinner` command line options;
- Support for modern (ES6) and legacy (ES5) builds (legacy build is used by default);
- Support for Meteor's `<meteor-bundled-js/>` and `<meteor-bundled-css/>`;
- Support for `body.html` and `blaze-html-templates` (see updated readme);
- Support for `{{url-to-meteor-bundled-css}}` placeholder, which can be used in `<link rel="preload">`;
- __Breaking__: `--usebuild` option now accepts `<path>` to the build;
- Update NPM dependencies;
- Use `fs-extra` module to move files around;
- Check that `Meteor` and `Meteor.disconnect` exist in global space;
- If `--url` option is not passed create dummy `sockjs/info` to avoid connect DDP exceptions;
- Closing: #53, #40;
- Solving: #61, #57, #55, #42, #18;
- Taking into account: #59, #35;
@dr-dimitru
Copy link
Collaborator

Hello @brettg2 ,

Thank you for suggesting this out!
Implemented as part of v1.0.0, please let me know if there's any issues.

@dr-dimitru dr-dimitru closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0