Skip to content

Output CSS in /static/css and switch to using stylus directly - #2544

Merged
phillipj merged 2 commits into
nodejs:masterfrom
XhmikosR:master-xmr-css-target
Sep 29, 2019
Merged

Output CSS in /static/css and switch to using stylus directly#2544
phillipj merged 2 commits into
nodejs:masterfrom
XhmikosR:master-xmr-css-target

Conversation

@XhmikosR

@XhmikosRXhmikosR commented Sep 8, 2019

Copy link
Copy Markdown
Contributor

Draft because it requires #2461 and #2462.

Fixes#2467

@XhmikosR
XhmikosR marked this pull request as ready for review September 21, 2019 09:41
@XhmikosRXhmikosR mentioned this pull request Sep 28, 2019
@Trott

Copy link
Copy Markdown
Member

@nodejs/website This could use reviews.

Comment threadbuild.js Outdated
Comment threadbuild.js
const labelForBuild = '[stylus] static/css finished'
console.time(labelForBuild)

fs.mkdir(path.join(__dirname, 'build'), () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider the { recursive: true } option of fs.mkdir() to avoid the nested callbacks below? As described by docs;

// Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.
fs.mkdir('/tmp/a/apple', { recursive: true }, (err) => {
if (err) throw err;
});

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I thought this change should be made separately after all the other changes have settled :)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this requires Node.js 10, another reason I didn't make this change yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that requirement a problem though?

As far as I see it, we're running Node.js 10 in CI and $latest when building on the hosting server nodejs/build/setup/www/resources/scripts/build-site.sh.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem for me, it's just that such change should be a clear patch IMO and not sneaked in in other patches, that is all.

@phillipj
phillipj merged commit e172952 into nodejs:masterSep 29, 2019
@phillipj

Copy link
Copy Markdown
Member

Really cool to get rid of seemingly unnecessary abstraction to use stylus 💯

Sign up for freeto 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.

Move CSS/Stylus into static folder

4 participants

@XhmikosR@Trott@phillipj@alexandrtovmach