Learning GulpInitialize your project directory: 3 4. Install gulp in your project devDependencies: 3 5. Create a gulpfile.js at the root of your project: 3 6. Run gulp: 3 Task dependency 3 Concat js file in sub folder 4. Install gulp in your project devDependencies: $ npm install --save-dev gulp 5. Create a gulpfile.js at the root of your project: var gulp = require('gulp'); gulp.task('default', function() { Browser Sync. bash $ npm install browser-sync --save-dev With that premise, let us open our gulpfile.js and add the watch functionality. Let us require browser sync and define some variables to use0 码力 | 45 页 | 977.19 KB | 1 年前3
BabelJS TutorialBabelJS 66 package.json after installation Let us now create the gulpfile.js, which will help run the task to bundle the modules together. We will use the same files used "font-size:30px;color:green;"); The gulpfile.js is created here. A user will browserfiy and use tranform to babelify. babel- preset-env is used to transpile the code to es5. Gulpfile.js const gulp = require('gulp'); We will add the Preset environment details to .babelrc file as follows: gulpfile.js var gulp =require('gulp'); var babel =require('gulp-babel'); var connect = require("gulp-connect");0 码力 | 173 页 | 2.70 MB | 1 年前3
共 2 条
- 1













