Comments (8)
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.
can you paste me your output?
from blaze_compiler.
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.
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.
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.
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.
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.
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)
- Better error message for missing type when using required HOT 1
- Add duplicate examples warning HOT 1
- Unable to compile with io.js HOT 7
- cannot be cast from JString to JObject HOT 4
- regex constraints not working with nonexamples HOT 2
- Are ACL entries modified by their position HOT 1
- Unexpected implementation level of access rules. HOT 3
- Function output replaces auth.uid if a $uid wildchild is in location HOT 4
- Boolean must be compared to true or false HOT 3
- Doesn't work on Windows HOT 1
- Blaze Ember Cli Addon
- After updating to version 0.0.35, blaze compile never finishes HOT 4
- Support for Firebase rule string methods (toUpperCase, toLowerCase, etc) HOT 3
- Access control location with two $wildchilds returns error HOT 4
- Regular Expression Issue for Email validation \ is getting repeated twice HOT 2
- npm install fails HOT 1
- Functions calls doesn't evaluate the params before passing it HOT 5
- Nested functions to not properly wrap conditions HOT 1
- State of blaze compiler going forward? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blaze_compiler.