gulp

Angular2 lazy loading modules: how to create a build package with SystemJS Builder?

杀马特。学长 韩版系。学妹 提交于 2019-12-05 03:45:02
i'm using Angular2 and SystemJS to create a web application. I have some modules in my app and in the router configuration i use lazy loading to open them. Here is a routing file of my app that lazy loads two modules: const appRoutes: Routes = [ { path: '', component: MainComponent, canActivate: [AuthGuard], children: [ { path: 'dashboard', component: DashboardComponent }, { path: 'first-section', loadChildren: 'app/modules/FIRST-SECTION/first-section.module' }, { path: 'second-section', loadChildren: 'app/modules/SECOND-SECTION/second-section.module' }, { path: 'documents', component:

how can I use babel polyfill to support all IE11 issues with gulp

筅森魡賤 提交于 2019-12-05 03:43:35
I've been piecing together support for IE11 by adding plugins for transform-object-assign and array-includes and now I'm getting a symbol error for using for of loops. Instead of just tackling them one at a time, is it possible for me to work babel polyfill into my build below and future proof it? I've read several related questions but still am not clear on how I'd fit babel-polyfill into the gulp build below: return gulp.src(input) // Grab the input files .pipe($.babel({ presets: ['es2015'], // transform ES6 to ES5 with Babel plugins: ['transform-object-assign','array-includes'] })) .pipe($

Gulp copying empty directories

大憨熊 提交于 2019-12-05 03:27:03
In my gulp build I've made a task that runs after all compiling, uglifying and minification has occurred. This task simply copies everything from the src into the dest directory that hasn't been touched/processed by earlier tasks. The little issue I'm having is that this results in empty directories in the dest directory. Is there a way to tell the gulp.src glob to only include files in the pattern matching (like providing the 'is_file' flag)? Thanks. null Fixed it by adding a filter to the pipeline: var es = require('event-stream'); var onlyDirs = function(es) { return es.map(function(file,

Indented Sass syntax not working with node-sass and gulp-sass

巧了我就是萌 提交于 2019-12-05 02:45:41
Libsass 2.0 brought the indented syntax to libsass users, but so far I've been unable to make it work with node-sass and gulp-sass . I have all of the latest versions: node-sass : 0.93 gulp-sass : 0.7.2 gulp : 3.8.2 This setup compiles .scss files and even .sass files using the bracket syntax but it will not compile the indented syntax. Has anyone successfully compiled the indented syntax with node-sass and gulp? My gulpfile.js var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('sass', function() { return gulp.src('./sites/all/themes/nsfvb/sass/screen.sass') .pipe(sass({

Gulp deploy dist folder of Node app to Heroku

六眼飞鱼酱① 提交于 2019-12-05 02:38:24
I'm reasonably new to node, git, github and Heroku and I'm struggling to work out the best way of sending my application to Heroku without cluttering up the repo with my compiled, minified app and without doing too much in Heroku. My node.js project looks a bit like this: - client ... code - server ... code - node_modules - package.json - gulpfile.js - dist - client - server Everything apart from node_modules and dist goes into github. The gulpfile compiles, minifies and concatenates everything ready for release in dist . How do I push just the dist folder to Heroku, without also putting it

gulp task can't find karma.conf.js

好久不见. 提交于 2019-12-05 02:16:34
I am trying to run karma test via a gulp task. I use https://github.com/karma-runner/gulp-karma and for some reason gulp cannot locate my karma.conf.js. That file is located in the same folder as the gulpfile. The root of the project. No matter what path I put, I get the same error File ./karma.conf.js does not exist. I cannot figure out how to path it correctly. Here is the code for the gulp task. gulp.task('tdd', function (done) { new Server({ configFile: 'karma.conf.js' }, done).start(); }); This is how I spool up karma using Gulp ( and both files are in the same root ). var karma = require

Angular2 with ASP.NET 5 [closed]

依然范特西╮ 提交于 2019-12-05 01:59:31
I am playing around with Angular2 in combination with ASP.NET5, gulp and typescript. Everything works fine when I solve the tutorials for Angular, but I am not sure how to setup the process in combination with ASP.NET 5. I made a project with working typescript compilation and bundling and I now the issues are starting: When I add the tsConfig file to the root of the project, visual studio does not recognizes the file. When I place it to wwwroot/scripts everything is fine (very strange). Angular2 does not support DefinityTyped anymore, the file is empty and contains the hint that I must

Combining Multiple Files with Laravel Mix

久未见 提交于 2019-12-05 01:46:39
I am currently in the process of diving into Laravel Mix and so far, whilst I fully understand what Laravel Mix is and how it works, I am trying to understand a little more about the common practices and 'How-Tos'... For instance, consider this file structure: /resources/assets/js/app.js (all global functions) /resources/assets/js/index/index.js (functions specific to index.js) /resources/assets/js/about/about.js (functions specific to about.js) /resources/assets/js/contact/contact.js (functions specific to contact.js) Now, ideally, I would like the following combined and minified in the

gulp-sass @import CSS file

China☆狼群 提交于 2019-12-05 01:42:01
Using gulp-sass I can include .scss files with @import 'filepath.scss'; But when I try to import normal css files with @import 'filepath.css' , It just added the import line of import url(filepath.css); to the output css file, rather than actually importing the code. How can I import CSS files as well as SCSS files? I want to do this to include files form bower. Here is my gulp function: // include gulp var gulp = require('gulp'); // include deps var minifyCSS = require('gulp-minify-css'), autoprefix = require('gulp-autoprefixer'), rename = require('gulp-rename'), sass = require('gulp-sass');

How can I get gulp-typescript to output to the same directory as the source file?

强颜欢笑 提交于 2019-12-05 01:33:30
I have the following pipeline function typescripts() { return gulp.src(paths.watchedFiles.ts) .pipe(cached('typescripts')) .pipe(plumber()) .pipe(addsrc(paths.ts.include)) //TODO: Need to eliminate the original source path (ex. /users/userName) from the sourcemap file. .pipe(sourcemaps.init()) .pipe(ts(tsProjectMode, undefined, ts.reporter.fullReporter(true))).js .pipe(gulpIgnore.exclude(paths.ts.excludeFromPostCompilePipeline)) .pipe(ngAnnotate({ remove: false, add: true, gulpWarnings: false //typescript removes base path for some reason. Warnings result that we don't want to see. })) .pipe