Git Product home page Git Product logo

Comments (4)

michaeltlombardi avatar michaeltlombardi commented on July 30, 2024 1

Speed is one reason to condense, the other is simplicity for users - they only have to review one file for code. The majority of users are not power users and are not using tools with multi-file search-and-edit.

Not sure if it's faster for intellisense, but my tests were faster for import.

FWIW, in my projects for work we condense from multiple files into a single psm1 - our deployed module only has the following in the structure:

ModuleName
├── ModuleName.psd1
└── ModuleName.psm1

If you have formatting/etc, you can deploy with those files too - the point is to reduce cognitive load for average users. We don't include tests either.

from psgitlab.

michaeltlombardi avatar michaeltlombardi commented on July 30, 2024 1

I run pester tests against the pre-compiled version. The compiled/condensed psm1 only exists as an artifact if all tests pass before it.

For non-master branches:
Push to remote -> automatic tests -> report

For master:
Merge to master -> automatic tests -> if successful, build module -> if successful, deploy module

from psgitlab.

ngetchell avatar ngetchell commented on July 30, 2024

I have seen recommendations for including FunctionsToExport in your manifest to speed up with Import-Module process. Would speed also be the reason for merging the PSM1 file? I will check the Import times for a combined PSM1 vs my current setup.

If I missed a reason please let me know.

@McAndersDK do you think this would fit into a Psake build task? My goal would be to keep development easy for people to contribute and I believe separate PS1 files does that best (merging, diffing, etc).

I don't have access to Update-ModuleManifest yet as I am running PS5 RTM and I 'build' from that . Will look into this as soon as I get the next Win 10 build.

  • Check if combined PSM1 is faster for importing module.
  • Check if combined PSM1 is faster for intellisense from the console.
  • Investigate Update-ModuleManifest for dynamically updating manifest information.

from psgitlab.

ngetchell avatar ngetchell commented on July 30, 2024

I'll look into this today. @michaeltlombardi do you run your pester tests against your multiple file folder or your condensed PSM1?

from psgitlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.