Git Product home page Git Product logo

Comments (8)

tomlarkworthy avatar tomlarkworthy commented on July 3, 2024

So the typescript compiler should run and generate that file. When I install I see the following output.

larkworthy-macbookpro:dev larkworthy$ npm install -g blaze_compiler

> [email protected] prepublish /Users/larkworthy/dev/blaze_compiler
> grunt compile

Running "typescript:base" (typescript) task
34 files created. js: 17 files, map: 17 files, declaration: 0 files (2376ms)

Done, without errors.
/Users/larkworthy/.nvm/versions/node/v0.12.7/bin/blaze -> /Users/larkworthy/.nvm/versions/node/v0.12.7/lib/node_modules/blaze_compiler/bin/blaze.js
[email protected] /Users/larkworthy/.nvm/versions/node/v0.12.7/lib/node_modules/blaze_compiler
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected])


larkworthy-macbookpro:dev larkworthy$ blaze
run:-
blaze <file>
to generate a rules.json in the current directory, ready for upload to Firebase

Options:
  -v  enable debug output

from blaze_compiler.

tomlarkworthy avatar tomlarkworthy commented on July 3, 2024

can you paste me your output?

from blaze_compiler.

ShamariFeaster avatar ShamariFeaster commented on July 3, 2024

It appears as though the TS compiler is not running.

$ npm install -g blaze_compiler
npm http GET https://registry.npmjs.org/blaze_compiler
npm http 200 https://registry.npmjs.org/blaze_compiler
npm http GET https://registry.npmjs.org/falafel/0.3.1
npm http GET https://registry.npmjs.org/source-processor/0.0.6
npm http GET https://registry.npmjs.org/tv4/1.1.12
npm http GET https://registry.npmjs.org/xregexp/2.0.0
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/source-map-support/0.3.2
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/falafel/0.3.1
npm http 304 https://registry.npmjs.org/source-map-support/0.3.2
npm http 304 https://registry.npmjs.org/xregexp/2.0.0
npm http 304 https://registry.npmjs.org/tv4/1.1.12
npm http 304 https://registry.npmjs.org/source-processor/0.0.6
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/source-map/0.1.32
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/source-map/0.1.32
npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/amdefine
C:\Users\wzhjtn\AppData\Roaming\npm\blaze -> C:\Users\wzhjtn\AppData\Roaming\npm
\node_modules\blaze_compiler\bin\blaze.js
[email protected] C:\Users\wzhjtn\AppData\Roaming\npm\node_modules\blaze_com
piler
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected])

from blaze_compiler.

tomlarkworthy avatar tomlarkworthy commented on July 3, 2024

Oh actually that makes sense it should be done before upload to npm. I am trying it on another computer and I get similar output to yours. I think my first attempt was being clever as it found where the dev install was. I'll figure it out in a moment

from blaze_compiler.

tomlarkworthy avatar tomlarkworthy commented on July 3, 2024

Ok its installing ok. Just noticed you're Windows ... I have never tested that. Maybe you can help me figure it out. If you go to the npm install directory "C:\Users\wzhjtn\AppData\Roaming\npm" and find the blaze install directory. One you find the root of the installation you should be able to "node bin/blaze.js" and re-trigger the error. Its probably the file path seperator. Try fiddling with the source code in bin/blaze.js and see what fixes it, then I can try to roll that out after testing on linux

from blaze_compiler.

ShamariFeaster avatar ShamariFeaster commented on July 3, 2024

Node require always uses forward slashes. You will get into trouble using hard-coded slashes on regular filesystem paths but not require. What seems to be the issue is that I have not compiled the project using grunt. When I tried that, I was informed I don't have the proper dependencies:

C:\Users\wzhjtn\AppData\Roaming\npm\node_modules\blaze_compiler>grunt compile

Local Npm module "grunt-contrib-nodeunit" not found. Is it installed?
Local Npm module "grunt-typescript" not found. Is it installed?
Warning: Task "typescript:base" not found. Use --force to continue.

Aborted due to warnings.

From the documentation, I wasn't aware I had to compile the project from source to use it. Let me do that and get back to you.

EDIT:

So it appears "grunt compile" should be running on your end before you publish to the remote repo. When I do an "npm install -g" my "src" directory contains only typescript files and no ".js" files. Does this indicate, the prepublish compilation is not happening as intended? I'm not certain this is a platform issue.

from blaze_compiler.

ShamariFeaster avatar ShamariFeaster commented on July 3, 2024

Solution: I had to install "grunt-contrib-nodeunit" and "grunt-typescript" in the project's local "node_modules" directory then run "grunt compile" which generated the necessary ".js" files.

After that I was able to successfully compile yaml to a rules file. thanks for your responses. I don't know enough about your project to say there's an error on your end but it appears you are expecting the repo that users pull down from nmp to already have the compiled .js files, which it currently does not.

from blaze_compiler.

tomlarkworthy avatar tomlarkworthy commented on July 3, 2024

Very strange. The npm prepublish hook is designed for this very case. It compiles the source before upload so users do not have to. I tested the download here and I have all the .js files in the freshly downloaded npm :/

from blaze_compiler.

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.