//bower.json is as follows:
{
"name": "webapp",
"description": "angularjs webapp",
"main": "",
"keywords": [
"angularjs"
],
"license": "MIT",
"homepage": "",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"angular": "^1.6.4",
"angular-ui-router": "ui-router#^0.4.2",
"angular-cookies": "^1.6.4",
"angular-validation": "^1.4.3"
}
}
//packa.json is as follows:
{
"name": "webapp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean": "^0.3.2",
"gulp-concat": "^2.6.1",
"gulp-connect": "^5.0.0",
"gulp-cssmin": "^0.1.7",
"gulp-imagemin": "^3.2.0",
"gulp-less": "^3.3.0",
"gulp-load-plugins": "^1.5.0",
"gulp-uglify": "^2.1.2",
"open": "^0.0.5"
}
}
Please tell me how to open a webapp project configured with gulp bower on someone else's computer
漂亮男人2017-05-19 10:41:15
The first is the environment configuration, because bower and gulp are both based on Nodejs.
So, the first step is to install NodeJS
The second step is to execute the npm install
command under the current project to install the project dependent modules. npm install
命令,安装项目依赖模块。
第三步,bower
这里没有直接使用。TA只是用来安装第三方库的,所以可以选择性安装npm install bower -g
第四步,执行gulp 命令
The third step, bower
is not used directly here. TA is only used to install third-party libraries, so you can selectively install npm install bower -g
gulp command
. There should be a gulpfile under the project project .js files. Check out the code inside and find code similar to the following
gulp.task('compile',function(){})
npm install -g gulp
) 正确安装的情况下,执行 gulp compile
This code is the code for gulp to define tasks. Make sure that gulp (if it prompts that gulp is not a command when executing), please install gulp globally That’s it. 🎜