Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'd like to be able to quickly and easily get up and running with Hamlet in node.js or the browser.
Where are some good resources for getting started?
From the README
Using Node.js
Install the command line Hamlet compiler
npm install hamlet-cli
Compile your templates and export them
node_modules/.bin/hamlet -d templates
Add hamlet-runtime to your package.json
npm install --save-dev hamlet-runtime
To use the templates in a Node.js style project built with browserify you can require them normally.
// main.js
mainTemplate = require("./templates/main");
document.body.appendChild(mainTemplate(data));
Now use browserify to build the file you'll serve on your page.
browserify main.js > build.js
Additional Resources
To get started I recommend the getting started section of the official readme
For general help or discussion you can talk on the Hamlet.Coffee google group
Specific questions about using Hamlet.coffee can be asked here on SO or on the google group.
Issues should be opened on the git repo https://github.com/dr-coffee-labs/hamlet/issues?state=open
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I aknowledge that this is a common issue, that has been discussed on stack overflow before. However, I have tried to implement the commands from other stack overflow questions and they have not worked.
These are the links I have used:
firebase-tools "-bash: firebase: command not found"
-bash: firebase: command not found
It appeared that I had successfully installed firebase. However all tools used leads to this:
command not found
I then implemented this:
alias firebase="`npm config get prefix`/bin/firebase"
Which did something strange to the terminal. But when I added commands to the new terminal, it still didn't work.
I also implemented the following:
npm get prefix
This returned:
/Users/andrewt/.npm-global
The rest of the guide then said:
And it should output something like /home/your-username/npm-global.
Then in your ~/.bashrc or ~/.bash_profile (if you're in a Mac) file, add:
export PATH="/home/your-username/npm-global/bin:$PATH" # Add npm bin PATH
Note the "/bin" after the npm get prefix result.
But I have no idea what that means, and my attempts to implement it failed.
If you are able to break down how to fix the issue so that I can understand - it would be greatly appreciated. Particularly if you can explain how it is working.
firebaser here
These days, Firebase also providers a standalone/prebuilt binary version of the Firebase tools that is much easier to get started with, and provides the exact same functionality as the NPM module.
If you're only just getting started developing with NPM, I'd recommend using the standalone binary of the Firebase tools for your platform. Find the documentation and link for Mac, Windows, and Linux in the documentation on installing the Firebase CLI.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I know this might be a silly question to some of you, but I am beginner in React, and I wish to create a really simple application.
I found a sample in which every component is saved in a separate js file, which looks very good for modularity and re-usage.
The only thing I need to take care of now is using export/require. However, I don't need to be dependent on nodejs. I just need a simple html/js application that can run on any cheap web server.
I read somewhere that I can use "Browserify", but after looking at it, it seems like a node library.
Is there any library that I can use from a web page (via cdn for example) that allow me to use require? If not, does that mean I can not separate react components in different files?
However, I don't need to be dependent on nodejs.
Use NodeJS. It is how React applications are designed to be built.
I just need a simple html/js application that can run on any cheap web server
NodeJS is only required at build time. You run it on your development workstation. The output is static files that you can upload to any webserver.
(NB: React applications are often designed to make HTTP requests to get dynamic data. Some tutorials cover using Node to build a server to listen for and make responses to those requests. Make sure you don't conflate the program to transpile the React application to ES5 (which runs at build time) with the program to run a webserver (at runtime) even if both are written using Node).
If you don't want to use Node, you can use webpack: https://webpack.github.io/
you will generate a static/bundle.js . If you want to learn more about it, I sugest http://survivejs.com/
What you need is a build step that packs the separate files into one or more packages that can be loaded in the browser.
Browserify can be used to do that, but WebPack is also popular.
These tools require some configuration, so I think that the best way to start is with a tool like create-react-app which is easy to install and has commands for developing as well as packing your app for deployment.
It uses webpack internally (along with some other tools) but saves you the hassle of configuring it yourself. If at any time you need advanced configurations beyond what create-react-app provides, it has an 'eject' command that exposes the raw configuration files.
Getting started is simple (taken from their readme):
npm install -g create-react-app
create-react-app my-app
cd my-app/
npm start
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am in process of learning NodeJS and now diving into database stuff and want to learn MongoDB with Mongoose package.
I am having some difficulties with installing MongoDB on my PC since it is 32bit system and I become curious do I actually need to install it on my PC in order to use it?
Or can I just do "npm install mongodb" and use it within my sample project and then also install "mnogoose", or it is required to have MongoDB installed on my PC as well?
I would be very thankful if someone could help me and explain process a bit. :)
Yes, you'll need to install Mongo.
'npm install mongodb' only installs the mongo driver.
Mongodb from npm install is just, according to the official description:
"The official MongoDB driver for Node.js. Provides a high-level API on top of mongodb-core that is meant for end users."
https://www.npmjs.com/package/mongodb
So you will still need to install the MongoDB server in order to use it within your project. The mongodb package just allows you to access mongodb server from within node.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm building a web application using a MEAN stack: MongoDB, Express, Angular, and Node.js, based on Daftmonk's angular-fullstack Yeoman generator.
Because most of my work is Java, I'm using IntelliJ IDEA however I'd like optimal introspection and workflow for this JavaScript module.
In order to achieve to most possible introspection, and least possible confusion, what plugins and project configuration should I use?
Here's the best I've been able to do so far.
There are some crucial IntelliJ plugins to install:
.gitignore support
AngularJS
Base64 for IDEA and Storm
BashSupport
Bootstrap
CSS Support
Database Support
ddescriber for jasmine
Git Integration
GitHub
HAML
Heroku integration
HTML Tools
Jade
JavaScript Debugger
JavaScript Intention Power Pack
JavaScript Support
JS Toolbox
JUnit
Karma
LESS CSS Compiler
LESS support
Markdown
Mongo Plugin
NodeJS
Require.js plugin
REST Client
Spy-js
SvgViewer 2
Terminal
W3C Validators
YAML
As a peace offering to the mighty IntelliJ, use Java as project SDK:
I prefer to configure four separate modules, to help separate back-end vs. front-end JavaScript dependencies:
Add the bower_components library to the client module, and the node_modules library to the server module:
And be sure to enable JavaScript libraries in the editor.
Per best practices, we do not commit the local IntelliJ IDEA configuration folder (/.idea/) to the repository, instead adding it to the .gitignore file like so:
# IntelliJ IDEA local workspace
.idea
Happy coding!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've been trying to figure out how to convert python files into JavaScript files.
I downloaded the latest pyjamas and I installed it in my c:\Python26\Lib\site-packages folder. I'm running Python 2.6 on Windows 7.
It looks like you should be able to translate a Python file to JavaScript like so:
python -m pyjs.pyjampiler -w directory/of/source -r main.py -o /output/path.js