javascript - 如何在别人电脑上打开,gulp+bower配置的项目?
滿天的星座
滿天的星座 2017-05-19 10:39:15
0
1
574

//bower.json如下:
{
"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如下:
{
"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"

}
}

求教怎么在别人电脑上代开gulp+bower配置的webapp项目

滿天的星座
滿天的星座

全部回复(1)
漂亮男人

首先是环境配置,因为 bower,gulp 都是基于Nodejs的。
所以,第一步是 安装NodeJS

第二步,在当前项目下执行npm install 命令,安装项目依赖模块。npm install 命令,安装项目依赖模块。
第三步,bower 这里没有直接使用。TA只是用来安装第三方库的,所以可以选择性安装npm install bower -g
第四步,执行gulp 命令第三步,bower 这里没有直接使用。TA只是用来安装第三方库的,所以可以选择性安装npm install bower -g

第四步,执行gulp 命令.项目工程下应该有个 gulpfile.js 文件。查看里面的 代码找到如下类似代码

gulp.task('compile',function(){})
npm install -g gulp) 正确安装的情况下,执行 gulp compile这段代码是gulp 定义任务的代码,你确保gulp(如果执行的时候,提示 gulp 不是命令之类的,请全局安装gulp 即可。🎜
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!