gulp

Use Javascript frameworks without build tools like grunt and gulp? [closed]

随声附和 提交于 2019-12-03 15:05:06
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed last year . I'm trying out some modern Javascript frameworks like Angular, React, Vue and Ember, and they all want me to use build tools like npm , grunt , gulp , maven , etc. Web-programming used to be fun. Just change some files, refresh the browser and see if it works. Now every time I change something, I have to build it again, which takes quite some time. I really hate to see

Minify (not transpile) ES2015 code with Gulp

无人久伴 提交于 2019-12-03 15:01:19
问题 How to minify ES2015 code without transpiling it to ES5? The popular gulp-minify and gulp-uglify modules do not work with simply minifying ES2015 code. 回答1: It is now possible to minify ES2015 without transpiling the code. babel minify (previously babili) is a babel preset that does that. To install do: npm install --save-dev babel-preset-minify To use it with gulp you do: var gulp = require('gulp') var babel = require('gulp-babel') gulp.task('default', () => { return gulp.src('src/app.js')

gulp-sourcemaps: Cannot find module './src/init'

我的未来我决定 提交于 2019-12-03 14:59:13
问题 I get an error while installing React-native, I have tried to search for an answer, but I can not find one. When running "react-native init meet" I get this error: This will walk you through creating a new React Native project in /Users/alfred/React/meet Installing react-native package from npm... Setting up new React Native app in /Users/alfred/React/meet module.js:338 throw err; ^ Error: Cannot find module './src/init' at Function.Module._resolveFilename (module.js:336:15) at Function

-bash: gulp: command not found in Mac

半世苍凉 提交于 2019-12-03 14:59:10
问题 I try install gulp in mac like this : Is-iMac:~ itop$ npm root /Users/itop/node_modules Is-iMac:~ itop$ npm config set prefix /usr/local Is-iMac:~ itop$ npm root -g /usr/local/lib/node_modules Is-iMac:~ itop$ sudo npm install -g gulp After Install I see this error In terminal: npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no

使用gulp构建前端(一)

こ雲淡風輕ζ 提交于 2019-12-03 14:30:17
使用gulp构建前端(一) 前端页面越来越多的时候,如何管理其实也是一个非常重要的东西,less文件编译成css文件不一定要借助编译软件,在打包的时候如何对css文件/js文件,进行压缩。其实满足上面三点的软件还是有点多的,但是使用比较简单的gulp就是其中的佼佼者。 话不多说,使用gulp使用的是npm进行管理,所以我们需要去node.js官网去安装,windows下基本是傻瓜式的安装,就不做任何提醒,不过npm随着node.js安装就自动生成了。(查看 node -v ,npm -v)。 安装了npm过后,就开始安装gulp的插件,由于我们需要全局使用gulp的时候,就需要全局安装: npm install gulp -g 建立一些开发目录: mkdir project cd project mkdir site cd site 使用npm init建立package.json(有提示输入) { "name": "chen", "version": "1.0.0", "description": "", "main": "build/index.html", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "chen", "license": "ISC", }

Uglification failed. Unexpected character '`'

狂风中的少年 提交于 2019-12-03 14:19:24
gulp-uglify is unable to uglify this piece of code: var alertString = `<?xml version="1.0" encoding="UTF-8" ?> <document> <alertTemplate> <title>${title}</title> <description>${description}</description> </alertTemplate> </document>` it complains at the character: `. The character is valid for the apple's JS framework. I can't see anything inside the uglify package to ignore those characters and the text string inside it. Am i missing something from the documentation? Gulp-uglify has yet no official support for ECMAScript 2015 (aka ES6, aka Harmony) but with a little modification the on

Tasks for production prepared Ionic app

时光总嘲笑我的痴心妄想 提交于 2019-12-03 14:13:45
I'm trying to figure out what's the best process to pass from the code to the final deployable apk/ipa. So far I have a testsuite using Karma + Jasmine, which transpiles the TypeScript to JS and runs some unit tests. I start that process via gulp. After that all I know is to ionic build android --release what generates (an unsigned yet) apk. But I'm not sure of how ofuscated/minificated the generated apk is. So, keeping in mind the code has to be as private as possible, is the minification and the ofuscation of the ionic build enough or should I do all those prebuild tasks manually via gulp?

How can I set up gulp to run identically in Visual Studio 2017 and msbuild without having to change my build scripts?

纵饮孤独 提交于 2019-12-03 13:48:33
问题 I'm struggling to get set up with gulp in Visual Studio 2017. I'm not sure where I'm going wrong but there are a few things I'm confused about and I can't really find any online resources that are of any use. The build system I'm using is CruiseControl.NET and I would like gulp to work with it. This is what I've done so far: Installed Visual Studio 2017 with .NET Core cross-platform development and Node.js development selected (amongst other options). Created a new project Added a gulpfile.js

gulp压缩js转义es6的常见错误及解决方案

99封情书 提交于 2019-12-03 13:37:33
"babel-cli": "^6.26.0", "babel-core": "^6.26.3", "babel-preset-es2015": "^6.24.1", "gulp-babel": "6", 如上代码所示,安装以上版本的babel插件,bable更新很快,当版本不一致会冲突,导致出现 Plugin/Preset files are not allowed to export objects, only functions 。 gulp压缩js代码如下 const uglify = require('gulp-uglify'); //js压缩 const babel = require("gulp-babel"); // gulp打包manager\page\dist\js gulp.task('revJs', ()=> { return gulp.src([filePath + '/page/dist/js/*.js']) .pipe(babel({//编译ES6 presets: ['es2015'] })) .pipe(uglify())//压缩js .pipe(gulp.dest( 'dist/manager/page/dist/js')) }) 来源: https://www.cnblogs.com/uimeigui/p/11797452.html

Permission denied to Docker daemon socket at unix:///var/run/docker.sock

落爺英雄遲暮 提交于 2019-12-03 13:11:48
问题 I have this Dockerfile : FROM chekote/gulp:latest USER root RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y sudo libltdl-dev ARG dockerUser='my-user-name'; ARG group='docker'; # crate group if not exists RUN if ! grep -q -E "^$group:" /etc/group; then groupadd $group; fi # create user if not exists RUN if ! grep -q -E "^$dockerUser:" /etc/passwd; then useradd -c 'Docker image creator' -m -s '/bin/bash' -g $group $dockerUser; fi # add user to the group (if it was present and