gulp - How to deal with dependencies when deploying a node.js app? -
i'm setting gulp
build file node.js
project , don't have experience either of them.
so i'm doing copying code deployment directory, i'm unsure of how handle dependencies stored in node_modules
. copy of them well, or there more preferred way of doing it?
gulp.task('deliver', function() { gulp.src('src/*.html').pipe(gulp.dest('deployment/')); gulp.src('src/*.js').pipe(gulp.dest('deployment/')); gulp.src('src/games/').pipe(gulp.dest('deployment/')); });
the standard way have package.json file lists dependencies. part of deployment process run npm install
go through package.json , install necessary packages in node_modules folder.
Comments
Post a Comment