-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #715 from JeroenVinke/fix/webpack
Fix/webpack
- Loading branch information
Showing
10 changed files
with
125 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import project from '../aurelia.json'; | ||
import rename from 'gulp-rename'; | ||
import {CLIOptions} from 'aurelia-cli'; | ||
import gulp from 'gulp'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import through from 'through2'; | ||
|
||
function configureEnvironment() { | ||
let env = CLIOptions.getEnvironment(); | ||
|
||
return gulp.src(`aurelia_project/environments/${env}${project.transpiler.fileExtension}`) | ||
.pipe(rename(`environment${project.transpiler.fileExtension}`)) | ||
.pipe(gulp.dest(project.paths.root)) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
// https://github.com/webpack/watchpack/issues/25#issuecomment-287789288 | ||
var now = Date.now() / 1000; | ||
var then = now - 10; | ||
fs.utimes(file.path, then, then, function (err) { if (err) throw err }); | ||
cb(null, file); | ||
})); | ||
} | ||
|
||
export default configureEnvironment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as project from '../aurelia.json'; | ||
import * as rename from 'gulp-rename'; | ||
import {CLIOptions} from 'aurelia-cli'; | ||
import * as gulp from 'gulp'; | ||
import * as fs from 'fs'; | ||
import path from 'path'; | ||
import * as through from 'through2'; | ||
|
||
function configureEnvironment() { | ||
let env = CLIOptions.getEnvironment(); | ||
|
||
return gulp.src(`aurelia_project/environments/${env}${project.transpiler.fileExtension}`) | ||
.pipe(rename(`environment${project.transpiler.fileExtension}`)) | ||
.pipe(gulp.dest(project.paths.root)) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
// https://github.com/webpack/watchpack/issues/25#issuecomment-287789288 | ||
var now = Date.now() / 1000; | ||
var then = now - 10; | ||
fs.utimes(file.path, then, then, function (err) { if (err) throw err }); | ||
cb(null, file); | ||
})); | ||
} | ||
|
||
export default configureEnvironment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters