GithubHelp home page GithubHelp logo

gulp-alias-combo's People

Contributors

petermu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gulp-alias-combo's Issues

Json格式的代码在属性值后面如果存在注释并且注释与属性值之间没有空格时gulp会报错!

如代码:
Jslider._setting = {
isAutoPlay: false, //自动播放
animateType: "card",//动画方式card (这一行注释与值没有空格,在gulp的时候会报错)
onslidestart: null, //滑动开始执行的函数
onslideend: null, //滑动结束后执行的函数
isVertical: true, //判断横向还是竖向切换
animateTime: 3000 //播放时间
}

属性 animateType: "card"与后面的注释不存在空格的情况下在gulp的时候会报错,如下错误:
events.js:183
throw er; // Unhandled 'error' event
^
GulpUglifyError: unable to minify JavaScript

这在日常开发中,很难去把控这个注释的空格情况,这是否有办法解决,求大神们给个解决方案,目前使用的是0.3.3版本!

使用seajs,当js依赖过于复杂时,gulp时报错(RangeError: Maximum call stack size exceeded)!

因为0.3.3版本也存在bug所以准备想还原到0.2.7但是还原不回去只还原到0.2.9但这个版本就出现了下面的问题,之前一直用的0.2.7版本是没有任何问题的并且很稳定,但这个版本还原不回去了,这个模块我要弃用了吗??????

报错如下:
F:\devStatic\node_modules\gulp-alias-combo\index.js:28
content = content.replace(commentReg, '')
^

RangeError: Maximum call stack size exceeded
at String.replace ()
at analyseDeps (F:\devStatic\node_modules\gulp-alias-combo\index.js:28:23)
at F:\devStatic\node_modules\gulp-alias-combo\index.js:35:21
at Array.forEach ()
at analyseDeps (F:\devStatic\node_modules\gulp-alias-combo\index.js:31:14)
at F:\devStatic\node_modules\gulp-alias-combo\index.js:35:21
at Array.forEach ()
at analyseDeps (F:\devStatic\node_modules\gulp-alias-combo\index.js:31:14)
at F:\devStatic\node_modules\gulp-alias-combo\index.js:35:21
at Array.forEach ()

seajs使用alias遇到的问题

@PeterMu

我sea模块的代码:

seajs.config({
  alias: {
    a: "plugin/xx/a.min"
  }
});

define(function(require,exports,module){
  var a = require(a);
  // do something
}

我的gulp配置:

gulp.task("js", function(){
  return gulp.src(paths.js)
        .pipe(changed(output))
        .pipe(aliasCombo({
          baseUrl: "scripts/src/",
          supportRelative: true
        }))
        .pipe(uglify())
        .pipe(gulp.dest(output));
})

我gulp执行任务的时候,出现找不到js的错误,如下:
[D:\ ........\scripts\src\a.min.js] Not Found

我看了下是路径没对,正确的应该是:
D:\ ........\scripts\src\plugin\xx\a.min.js 这样才对

请问一下,我要怎么配置才行呢?

我又来提issue了:当require是相对路径的时候,不支持同目录解析

如果我请求的是一个相对路径,不合并的时候,请求路径变成了baseUrl+dialog.css的形式,实际上这个文件是和目前js同一个目录
define(function(require){
require("./dialog.css");
})

需要写成相对于baseUrl路径才正确
require("gmu/dialog/src/dialog.css");

如果能同目录解析就好了😁~~

css 模块怎么办

项目中,我每个web模块的 css 都是 require的,这个情况怎么提取css。

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.