GithubHelp home page GithubHelp logo

Comments (5)

akhileshThapliyal avatar akhileshThapliyal commented on July 28, 2024 1

relative to your shared folder, then you'll need to use such paths for everything else, I could make an option for the builder to configure root path for file resolver if it will help you

Hi @skoropadas, np. I managed it. So I created an angular workspace where I have all the libs and projects co-exist. I am referencing using a relative path to the common macro file in one of the libs. Not sure whether this is optimal approach, but it helps me to keep the code clean, tidy and organised.

from ng-doc.

skoropadas avatar skoropadas commented on July 28, 2024

Yeah, it seems that nunjucks does not support the feature you're looking for. To implement the documentation in this way, I would recommend using an NX monorepo with multiple apps dedicated to documentation. This approach will allow you to have access to the source code and easily share some things between different documentation apps.

I also think that this is a good practice as it enables you to release the documentation and new library versions together. Additionally, it allows you to identify any errors that may arise during the compilation of the documentation app.

from ng-doc.

akhileshThapliyal avatar akhileshThapliyal commented on July 28, 2024

NX monorepo

NX monorepo is similar to Angular workspace. The problem with this is still the same, I need to refer the macros with hardcoded paths like ../../../../ and I cannot configure paths based on a configuration the way we define paths in the compiler option in tsconfig.app :(

from ng-doc.

skoropadas avatar skoropadas commented on July 28, 2024

NX monorepo

NX monorepo is similar to Angular workspace. The problem with this is still the same, I need to refer the macros with hardcoded paths like ../../../../ and I cannot configure paths based on a configuration the way we define paths in the compiler option in tsconfig.app :(

Well there is no workaround for that, because nunjucks uses one file resolver for everything, so if you e.g. start having paths relative to your shared folder, then you'll need to use such paths for everything else, I could make an option for the builder to configure root path for file resolver if it will help you

from ng-doc.

maximLyakhov avatar maximLyakhov commented on July 28, 2024

@skoropadas I have ng project with one library only meant to be published as package.
Currently it's described with storybook.
Tried to install ng-doc, but it partially failed due to absence of app.module.
Will ng-doc project support just libraries in foreseeable future?

from ng-doc.

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.