Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserved option to disable compression #776

Closed
huseyinkozan opened this issue Jun 21, 2016 · 6 comments
Closed

Reserved option to disable compression #776

huseyinkozan opened this issue Jun 21, 2016 · 6 comments
Assignees

Comments

@huseyinkozan
Copy link

I have trouble at runtime with apidoc. Few days ago I searched the sources for disabling the compression, but cannot find.

Is it possible to add an option to disable copression for the Node files ?

Here the apidoc error while requesting http://192.168.2.2/api/vendor/jquery.min.js?v=1466512139991. It works like this : http://192.168.2.2/api/vendor/jquery.min.js, but couldnt find what is adding non-cache stuff : ^ /

TypeError: o is not a function
   at o (/app/remote-script/node_modules/qs/lib/parse.js:1:960)
   at i (/app/remote-script/node_modules/qs/lib/parse.js:1:1426)
   at Object.module.exports [as parse] (/app/remote-script/node_modules/qs/lib/parse.js:1:2530)
   at s (/app/remote-script/node_modules/express/lib/utils.js:1:305)
   at /app/remote-script/node_modules/express/lib/middleware/query.js:1:344
   at e.handle_request (/app/remote-script/node_modules/express/lib/router/layer.js:1:867)
   at k (/app/remote-script/node_modules/express/lib/router/index.js:1:2971)
   at /app/remote-script/node_modules/express/lib/router/index.js:1:2608
   at Function.e.process_params (/app/remote-script/node_modules/express/lib/router/index.js:1:3963)
   at n (/app/remote-script/node_modules/express/lib/router/index.js:1:2525)
@HipsterBrown
Copy link
Contributor

@huseyinkozan Can I ask why a documentation tool like apidoc would be running on a Tessel? Could this be done as a pre-deploy step?

If this is a needed feature, how do you envision it working with the current t2-cli deploy workflow? Is it a flag passed on t2 run or t2 push, i.e. t2 run index.js --no-compress?

@huseyinkozan
Copy link
Author

huseyinkozan commented Jun 21, 2016

@HipsterBrown You are right about apidoc deployment. Just packing all in one; api, gui, doc.

t2 push index.js --no-compress seems good to me.

@rwaldron rwaldron self-assigned this Jun 21, 2016
@rwaldron
Copy link
Contributor

rwaldron commented Jun 21, 2016

Before I start implementing, I want to know more about this use case. If compression is turned off, it will mean that all of the JS will be deployed without any compression. It's also important to know that the only files that are compressed are those that are discovered via the dependency graph—which means they are require("foo") or require("/path/to/module").

Edit: Can you create a minimal project in a repo that I can clone and deploy?

@huseyinkozan
Copy link
Author

Thank you @rwaldron for asking.

This is the second time that I want to disable the compression. First one was for debugging pusposes. After pushing, I tried to change the sources at the device (t2 root && nano /app/remote-script/index.js). For this case we can say we only need our developed sources, not the dependent libraries. Sometimes it is fast to change the souces at the device. For ex; trials.

Second one was the error at the first post of this issue. It will be very helpful to debug the stuation, if we can disable for all source and dependent files.

I cannot create a reproduce project now. But maybe later, if I have time.

rwaldron added a commit to rwaldron/t2-cli that referenced this issue Jul 18, 2016
…elgh-776

- `t2 run <index.js> --compress=false` will skip the code compression step

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Jul 19, 2016
…elgh-776

- `t2 run <index.js> --compress=false` will skip the code compression step

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Jul 19, 2016
…elgh-776

- `t2 run <index.js> --compress=false` will skip the code compression step

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
rwaldron added a commit to rwaldron/t2-cli that referenced this issue Jul 19, 2016
…elgh-776

- `t2 run <index.js> --compress=false` will skip the code compression step

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
@huseyinkozan
Copy link
Author

Seems only t2 run command line help (t2 run --help) got documented. It also works at t2 push.

@johnnyman727
Copy link
Contributor

@huseyinkozan I made a tracking issue: #808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants