GithubHelp home page GithubHelp logo

less-bundle's People

Contributors

rykilleen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

less-bundle's Issues

less-bundle TS errors when building a project having less-bundle as a dependency

We're using less-bundle in a TS package of ours. We're building our package with tsc --build with the following config:

{
  "compilerOptions": {
    "declarationDir": "./dist",
    "emitDeclarationOnly": false,
    "module": "CommonJS",
    "outDir": "./dist",
    "rootDir": "./src",
    "target": "ESNext",
    "composite": true,
    "incremental": true,
    "lib": ["DOM", "ESNext"],
    "importHelpers": true,
    "declarationMap": false,
    "declaration": true,
    "sourceMap": false,
    "strict": true,
    "noEmitOnError": true,
    "noImplicitAny": true,
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "isolatedModules": true,
    "noImplicitThis": true,
    "alwaysStrict": true,
    "noUnusedLocals": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "Node",
    "jsx": "react",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "resolveJsonModule": true
  },
  "include": ["./src"]
}

When launching the build, we're getting TS errors from less-bundle:
image

There is a dedicated parameter in TS to ignore libraries TS errors called skipLibCheck. However the way it works is by ignoring all d.ts declaration files.
As there is none produced by less-bundle, and as the entry file of the library is a index.ts file, we're getting those TS errors with no straightforward way of working around them. To be fair, one could also argue that it is a lack of configuration on TS's side.
Anyway, this keeps us from building our package, and blocks us.

In the meantime, to unblock ourselves, we forked your repo and added to it a configuration that would fit to our situation, by generating declaration files from your code.

Is this a problem your planning on solving?
If not, would you like us to open a PR on this repo with the changes we made on the fork?

@imports with tildes are not matched to the node_modules folder

Importing from node_modules has become a common pattern, and looks like the following:

@import ~@organization/package/components/component/styles/styles.less

Currently, less-bundle takes the path literally.

c:\project\styles\~@organization/package/components/component/styles/styles.less

It'd be great if this package could support substituting node_modules in when appropriate! I'll be submitting a PR shortly that should address the issue.

String as output

I tried this and it worked well but one thing that I want is to return bundled less content/string in callback or we can convert this to use promises that would be awesome.

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.