GithubHelp home page GithubHelp logo

curlyfy's People

Contributors

greenkeeperio-bot avatar rstuven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mk-pmb

curlyfy's Issues

webpack usage?

Hi,

Curlyfy looks great; would love to give it a try with webpack/babel. Is there a loader for it?

TypeScript not ingesting output properly (?)

Hi,

I really have no idea what's going on here. The code when run through typescript works just fine. But when run through curlyfy-loader, typescript throws errors.

input (howdy.cts):

export function howdy(): void {
  console.log('Hi there, howdy!')
}

output from curlyfy (runs just fine when put through typescript-loader):

export function howdy(): void {
  console.log('Hi there, howdy!')
}

webpack config:

module.exports = {
  resolve: {
    extensions: ['', '.ts', '.webpack.js', '.web.js', '.js', '.cjs', '.cts']  // note: I use .cts instead of .noncurly.ts, etc.
  },
  module: {
    loaders: [
      { test: /\.noncurly\.js$/,
        exclude: /node_modules/,
        loader: 'babel!curlyfy'
      },
      { test: /\.cjs$/,
        exclude: /node_modules/,
        loader: 'babel!curlyfy'
      },
      { test: /\.ts$/,
        exclude: /node_modules/,
        loader: 'typescript-loader'
      },
      { test: /\.cts$/,
        exclude: /node_modules/,
        loader: 'typescrip-loadert!curlyfy'
      }
    ]
  }
}

Traceback:

Hash: c013f1aa35af69143dd4
Version: webpack 1.9.4
Time: 1701ms
 Asset     Size  Chunks             Chunk Names
out.js  2.45 kB       0  [emitted]  main
   [0] ./index.js 180 bytes {0} [built] [1 error]
    + 3 hidden modules

ERROR in ./howdy.cts
Module build failed: TypeError: Cannot read property 'declarations' of undefined
    at Object.getDeclarationOfKind (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:2826:34)
    at checkFunctionLikeDeclaration (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:16767:43)
    at checkFunctionDeclaration (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:16755:13)
    at checkSourceElement (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:17652:28)
    at Object.forEach (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:586:30)
    at checkSourceFile (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:17781:20)
    at getDiagnostics (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:17810:17)
    at Object.hasSemanticErrors (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:18223:20)
    at Object.emitFiles (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:10849:46)
    at Object.invokeEmitter [as emitFiles] (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:18306:23)
    at Object.getEmitOutput (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/typescript/bin/typescriptServices.js:24693:56)
    at TypeScriptWebpackHost.<anonymous> (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/lib/TypeScriptWebpackHost.js:208:33)
    at tryCatcher (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/bluebird/js/main/promise.js:530:18)
    at Promise._settlePromiseAtPostResolution (/Users/alex/djcode/curlyfiddle/node_modules/typescript-loader/node_modules/bluebird/js/main/promise.js:224:10)
 @ ./index.js 2:12-30

curlyfy had worked at some point, but I can't get it working again...

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.