Skip to content

Conversation

@justinvp
Copy link
Member

@justinvp justinvp commented Jul 8, 2019

Not ready for review yet. Will mark as ready for review when ready, including before/after gzip sizes.

FYI @cnunciato, @chrsmith

Follow-up from #1213

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/staging was successful.

Resource Changes

    Name                                                                    Type                              Operation
~   docs/reference/pkg/nodejs/pulumi/aws/ec2transitgateway/rss.xml          aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/index.html                                    aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/azure/cognitive/rss.xml                aws:s3/bucketObject:BucketObject  update
~   blog/author/joe-duffy/page/1/index.html                                 aws:s3/bucketObject:BucketObject  update
~   docs/quickstart/azure/install-pulumi/index.html                         aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/batch/v1/index.html         aws:s3/bucketObject:BucketObject  update
~   blog/pulumi-now-supports-atlassian-identity/index.html                  aws:s3/bucketObject:BucketObject  update
~   blog/getting-to-chatops-with-pulumi-webhooks/index.html                 aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/gcp/storage/rss.xml                    aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_aws/elasticloadbalancingv2/index.html  aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/gcp/filestore/index.html               aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/node/v1alpha1/rss.xml       aws:s3/bucketObject:BucketObject  update
~   blog/tag/logging/index.html                                             aws:s3/bucketObject:BucketObject  update
~   docs/reference/tutorials/aws/index.html                                 aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_gcp/accesscontextmanager/index.html    aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_packet/rss.xml                         aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_f5bigip/config/rss.xml                 aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_kubernetes/apiextensions/rss.xml       aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_kubernetes/helm/v2/index.html          aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/aws/dms/rss.xml                        aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/authentication/index.html   aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_aws/kms/index.html                     aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_aws/macie/rss.xml                      aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/aws/ebs/rss.xml                        aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_aws/storagegateway/rss.xml             aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_gcp/composer/index.html                aws:s3/bucketObject:BucketObject  update
~   docs/quickstart/gcp/install-pulumi/index.html                           aws:s3/bucketObject:BucketObject  update
~   blog/tag/aws/page/3/index.html                                          aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/f5bigip/rss.xml                        aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/gcp/dns/rss.xml                        aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/azure/datafactory/index.html           aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/types/version/index.html    aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/aws/codebuild/rss.xml                  aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/node/index.html             aws:s3/bucketObject:BucketObject  update
~   docs/aws/iam/index.html                                                 aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/index.html                                           aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_azure/msi/rss.xml                      aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/python/pulumi_kubernetes/rbac/rss.xml                aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/docker/index.html                      aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/kubernetes/apiregistration/v1/rss.xml  aws:s3/bucketObject:BucketObject  update
~   docs/reference/pkg/nodejs/pulumi/openstack/sharedfilesystem/rss.xml     aws:s3/bucketObject:BucketObject  update
... and 1871 other changes

Copy link
Contributor

@chrsmith chrsmith left a comment

Choose a reason for hiding this comment

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

If this works well, and we are confident this won't remove CSS classes that we do use. (e.g. from styles that get added dynamically) then it seems like a good thing to do.

Though I'd be curious to know what the expected file size savings are. Since if it is minor, I'd be inclined to hold off on hooking this up for now since there is a non-zero risk of adding it.

module.exports = {
plugins: [
// TailwindCSS
// TailwindCSS.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: If a comment is a complete sentence, like on line 11, we'll want proper grammar. (Begin with a capital letter, end with a period.) But for a trivial comment like this, no need to add a period at the end.

preset: 'default',
})
// Use the following plugins when not building for "development":
...process.env.NODE_ENV !== "development" ? [
Copy link
Contributor

Choose a reason for hiding this comment

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

I am I reading this correctly in that the process.env.NODE_ENV !== "development" : [ ... ] : [] is evaluated first, and then the ... operator expands all of the elements? If so, that's super-subtle and confusing.

Would we instead just want to move this into a package level variable? Like:

// Include css-purgecss on non-dev builds to reduce CSS file size.
let plugins = process.env.NODE_ENV === "development" ? [] : [
];

@justinvp
Copy link
Member Author

Replaced by #2444

@justinvp justinvp closed this Feb 18, 2020
@justinvp justinvp deleted the justin/purgecss branch February 18, 2020 23:46
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