amd-optimize
amd-optimize copied to clipboard
An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
When I have an arrow function anywhere in my modules, it reports a syntax error `SyntaxError: Unexpected token` and stops executing. Is it using some sort of separate (third party)...
project structure  gulfile.js ``` gulp.task('base', function () { return amdOptimize.src('./js/init') .pipe(concat('base.js')) .pipe(gulpif(con, uglify())) .pipe(gulp.dest('./js/dist')); }); ``` ./js/init.js ``` require.config({ "paths": { 'Datepicker':'modules/datepicker', 'PopUpBox':'modules/popupbox' } }); require(['Datepicker', 'PopUpBox'], function(){ console.log('hello');...
i have a file which is module,in this module,there has require in a method,when amd-optimize,it throws an error,example: E:\mysoft\UPUPW_AP5.6\htdocs\fraudect_report_test\frontend\node_modules\amd-opti mize\lib\trace.js:50 isText = moduleName.indexOf('text!') !== -1; ^ TypeError: Cannot read property...
So if I put angular in the paths, to be loaded externally: ``` 'angular': '//ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js' ``` It won't work. It won't be able to "find" the module. What should happen:...
Sourcemaps aren't being outputted when I use amd-optimize. When I leave it out, sourcemaps work fine. ``` return gulp.src(['source/js/**/*.js']) .pipe(sourcemaps.init()) .pipe(amdOptimize('js/main', config)) //
Lately I used this plugin and I found it does not support the property of "package",refer to http://requirejs.org/docs/api.html#packages . But my configuration of requireJs has this property, how can I...
Using Bower & RequireJS, I have the following directory structure: ``` vendor/ flight/ component.js .... scripts/ common.js (RequireJS config) app/ core/ component_ui/ nav_drawer.js ``` In `scripts/app/core/component_ui/nav_drawer.js`, I have `define(['flight/component'...`. Just...
Getting a define is not defined error. **Gulp:** return gulp.src('src/assets/js/*_/_') // Traces all modules and outputs them in the correct order. .pipe(amdOptimize("app", { paths : { "jquery" : "./bower_components/jquery/dist/jquery" }...
please apply this ``` collectModules = function(module, omitInline) { var collector, outputBuffer; if (omitInline == null) { omitInline = true; } outputBuffer = []; var moduleHash={}; collector = function(currentModule) {...
Hi. When actually does this error happen ? I am sure I am missing something, But any suggestion on this will be highly appreciated. /Users/nododo/https/files/public/UI/node_modules/amd-optimize/lib/trace.js:49 isText = moduleName.indexOf('text!') !== -1;...