After installing yeoman and backbone-generator, I generate my project with "yo backbone" but it generates some of the app in the folder test and grunt serve doesn't work.
I reinstalled several times yeoman & generator-backbone but nothing works.
Someone would have the solution to this problem ?
Did you make sure you create a folder for you app, then cd into it and run the generator. You should have your app up and running, for example myApp
// first create your new app folder, then cd into it
mkdir myApp
cd myApp
// scaffold your backbone app
npm install -g generator-backbone
yo backbone
That should be all you need
Related
I am trying to create a react js app, for this reason I have installed node js on my windows machine and executed the command: npm install -g create-react-app
inside a directory 'C:\Users\Desktop\ReactDemo' but the result of command created a directory at AppData\Romaing\npm\create-react-app.
I am surprise why app created in some other directory. My assumption was like if I create an empty directory and from that location in the command line, we init git then that directory becomes git flavored, isn't it.?
Similarly, I am expecting, if I create an empty directory and init react-js flavor that folder should working react-js app, but it isn't instead created a new directory. Can someone please help me understanding how to turn normal directory to working react-js directory.?
npm install -g create-react-app install globally create-react-app and it's not the command to create react app.
If you just want to create some app you could use: npx create-react-app my-app see: https://github.com/facebook/create-react-app
Additionally please keep in mind that react app created by create-react-app needs to have specific naming convention
I have following Angular project structure
I am new to creating gulp tasks. I tried for some simple projects and that worked fine but for this project, I am facing a lot of issues. I am unable to figure out the way to write a gulp task for this app structure.
This project I have to deploy on AWS S3 so for that I need it to build and deploy.
It would be really helpfull for me if anyone could guide me on this.
Below are the steps to build and deploy AngularJs application using gulp :
Prerequisites :
Install Nodejs 6.9.3.
check you npm version using "npm -v" in the command prompt.
Install gulp using "npm install -g gulp".
Set your environment variables for windows.
Add the below code snippet
gulp.task("js", function() {
return gulp
.src([
"./dev/libs/angular/angular.1.4.5.min.js",
"./dev/libs/angular/angular-animate.1.4.5.min.js"
])
.pipe(concat("scripts.js"))
.pipe(hash({
"format": "{name}_{size}.js"
}))
.pipe(gulp.dest("PATH_FOR_BUILD"));
});
For more details Angular JS - Build & deploy using gulp
Using vue cli I can get a simple starter template by the command
vue init webpack-simple
Do we have any similar starter template for angularjs 1.x?
There are a lot of angularjs starter templates, mostly given by the community.
You can use yeoman generators for "vainilla templates"
Run from the terminal:
npm install -g grunt-cli bower yo generator-karma generator-angular
mkdir my-awesome-project-name && cd my-awesome-project-name
yo angular
For webpack, I found this starter template or seeder https://github.com/preboot/angularjs-webpack
You can run this:
git clone https://github.com/preboot/angular-webpack.git my-awesome-app
cd my-awesome-app
rm -rf .git/
npm install && npm start
One simple option is using yeoman which is an scanfolding tool. The url is the following.
http://yeoman.io/generators/
hope it helps.
Is there something like:
rails new AngularApp
So that It generates a template of directories and files with routes, config and views?
As #Matti suggested, Yeoman is one of the best Scaffolding tool for AngularJS. In your term, it the best auto-generator for AngularJS.
To Install Yeoman:
$ npm install -g yo
To generate code:
$ yo angular or simply $ yo
More details : Click Here
If you want to generate template for angular i.e angular 4 use angular cli
provide node is installed in your machine
npm install -g #angular/cli
to create new app
ng new yourAppName
cd yourAppName
ng server
hit the url localhost:4200
I am trying to use yeoman, grunt and bower for my AngularJS development on Windows 7. I am using GitBash to run the commands. I did the following steps
Installed node.js (npm --version 1.4.14)
npm install -g yeoman grunt-cli bower
npm install -g generator-angular
cd c:/wamp/www
mkdir test-ang
cd test-ang
yo angular
When the scaffolding process is complete, I always find that my bower_components folder is outside app. Due to this my index.html is displayed without any styles and javascript as they link to "bower_components/bootstrap/dist/css/bootstrap.css". same thing happends for js files too. If I change it to ../bower_components/bootstrap/dist/css/bootstrap.css" in index.html, then things look fine. But doing grunt serve changes the index.html again
I tried to manually move bower_components inside app folder and edit .bowerrc file accordingly, but it did not help either. Also another interesting thing is, if I do the above listed steps in Virtual box ( running CentOs ) at my work machine, then the bower_components folder is automatically inside app folder.
Has anyone faced this before? Any thoughts or help would be appreciated.