Coder Social home page Coder Social logo

jgulp's Issues

config.json文件在哪?

gulpfile.js文件中的config = require('./config.json');引用的config.json找不到在哪里。
tiny-lrgulp-webservegulp-livereload三个包的用法不是不懂。=.=

跑不起来哦。

1,安装node.js最新版;
2,下载JGulp最新版ZIP解压;
3,创建config.json并修改key;
4,gulp build 运行出错:

You need to have Ruby and Compass installed and in your system PATH for this task to work.

下载
http://rubyinstaller.org/downloads/,
安装(要翻墙)
gem install compass
5,gulp build 运行出错:

D:\xampp1\htdocs\JGulp-master>gulp build
[15:20:40] Using gulpfile D:\xampp1\htdocs\JGulp-master\gulpfile.js
[15:20:40] Starting 'build'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task trigger
ing instead.
[15:20:40] Starting 'imagemin'...
[15:20:40] Starting 'compass'...
[15:20:40] Finished 'compass' after 4.99 ms
[15:20:40] Starting 'minifyjs'...
[15:20:40] Finished 'minifyjs' after 2.47 ms
[15:20:40] Starting 'alljs'...
[15:20:40] Starting 'buildfiles'...
[15:20:40] Finished 'buildfiles' after 3.12 ms
[15:20:40] Starting 'rename'...
[15:20:40] Finished 'build' after 31 ms
[15:20:40] Finished 'alljs' after 19 ms

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn D:\xampp1\htdocs\JGulp-master\node_modules\gulp-imagemin\node_modul
es\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\vendor\optipn
g.exe ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)

环境:

D:\xampp1\htdocs\JGulp-master>ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]

D:\xampp1\htdocs\JGulp-master>npm -v
2.7.4

D:\xampp1\htdocs\JGulp-master>compass -v
Compass 1.0.3 (Polaris)
Copyright (c) 2008-2015 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compas
s

D:\xampp1\htdocs\JGulp-master>node -v
v0.12.2

D:\xampp1\htdocs\JGulp-master>gulp build2

[15:33:13] Using gulpfile D:\xampp1\htdocs\JGulp-master\gulpfile.js
[15:33:13] Starting 'build2'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task trigger
ing instead.
[15:33:13] Starting 'tinypng'...
[15:33:13] Finished 'tinypng' after 8.55 ms
[15:33:13] Starting 'compass'...
[15:33:13] Finished 'compass' after 4.23 ms
[15:33:13] Starting 'minifyjs'...
[15:33:13] Finished 'minifyjs' after 2.04 ms
[15:33:13] Starting 'alljs'...
[15:33:13] Starting 'buildfiles'...
[15:33:13] Finished 'buildfiles' after 2.98 ms
[15:33:13] Starting 'rename'...
[15:33:13] Finished 'build2' after 28 ms
[15:33:13] Finished 'alljs' after 16 ms
[15:33:14] Finished 'rename' after 46 ms
[15:33:14] LoadError on line ["54"] of C: cannot load such file -- compass-norma
lize
Run with --trace to see the full backtrace

[15:33:14] Plumber found unhandled error:
 Error in plugin 'gulp-compass'
Message:
    Compass failed
Details:
    fileName: D:\xampp1\htdocs\JGulp-master\sass\style.scss
[15:33:21] gulp-tingpng: [compressing] ✔ info.png (done)

关于分开打包的问题

你好,看了下你的gulpfile.js,你是把所有的js的进行打包和压缩,那有没有一种方式,对js,css,img等按照页面分别进行打包,比如js的文件里有index, detail, login等文件夹,每个文件夹都着自己页面的js,分别对index, detail和login里的js进行打包,然后生成:index.min.js, detail.min.js和login.min.js呢

最近我一直在想这个问题,不知道用什么方法进行解决,目前考虑的仅仅是文件夹打包,没有使用seajsrequirejs

我的想法

我看过你的配置,我很喜欢,如果如果可以加入postcss和jade,在我看来更完美了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.